[xml] libxml2 2.1.1

Date view Thread view Subject view Author view

From: Peter Jacobi (pj@walter-graphtek.com)
Date: Fri Jul 14 2000 - 05:39:24 EDT


Hi Daniel, hi all,

I finally switched to libxml2 and can report, that it compiles well (nearly
out of the box) using Watcom C/C++ 11.0b, targetting Win32.

I did some changes to win32config.h, adding these lines:

#define HAVE_STRING_H
#define HAVE_SNPRINTF
#define snprintf _snprintf

I just checked the MSVC documentation and _snprintf available there
too, so this change can probably made in win32config.h.in too.

The _snprintf vs. snprintf alternative seems to be caused by conflicting
standards: AFAIK Ansi/ISO C requires all non-standard functions added
by the compiler to start with "_" , whereas POSIX requires all its
standard functions not to start with "_".

Some minor observations:

A) IS_CHAR etc

entities.c
line 707
line 922
    } else if (IS_CHAR(*cur)) {
IS_CHAR applied to an xmlChar. Is this by design?

In parser.c the same happens in myriads of lines. The result of the NXT,
RAW or CUR macros is fed into the classifiying macros of
parserinternals.h. But NXT and CUR return xmlChar a.k.a unsigned char.
So the look for IS_COMBINING for example, is rather pointless.
Or am I missing something important? (Same in parser.c and xpath.x)

B) stdlib.h string.h

The including of these headers is handled inconsistently:
sax.h includes stdlib.h unguarded by HAVE_STDLIB_H but misses to
include string.h for memcpy. debug.h includes string.h and stdlib.h with
their respective guards. Most other sources include stdlib.h guarded and
string.h unguarded.

Is there any compiler out there, which can handle Ansi/ISO C function
prototypes but doesn't have string.h and stdlib.h?

Regards,
Peter Jacobi

----
Message from the list xml@xmlsoft.org
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@xmlsoft.org


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Aug 02 2000 - 12:30:22 EDT