commit -- proof that development work should be done on unix


Subject: commit -- proof that development work should be done on unix
From: Aaron Lehmann (aaronl@vitelus.com)
Date: Thu Feb 22 2001 - 00:53:22 CST


Applied a sooperdooper one-liner to remove legacy XML_Char* casts from the
source tree.

Historically, this was a major area of pain and confusion. Using expat,
XML_Char is defined as a simple char. LibXML2 has no XML_Char type, but
rather xmlChar, which is defined as an unsigned char. The person who
did the original libxml2 support for AbiWord provided the XML_Char type
by #defining it to xmlChar. This turned out to be a grave mistake since
it caused thousands of compiler warnings and ocasionally some errors.
I fixed it recently by redefining XML_Char as 'char' in the libxml2
builds. This turned out to be a much better solution.

We still have some casts to XML_Char* that were put in place to try to ward
off warnings. Now that XML_Char is defined as a 'char' when using either
XML library, this is silly. In this commit, I remove these casts with:

    find . -type f -name '*.c*' -exec sh -c "(echo '1,\$s/(XML_Char *\*) *\"/\"/g';echo wq)|ed {}" \; >/dev/null

The build has been tested with both expat and libxml2.



This archive was generated by hypermail 2b25 : Thu Feb 22 2001 - 00:53:38 CST