From fdrake at users.sourceforge.net Tue Oct 7 23:32:27 2003 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Tue Oct 7 23:32:36 2003 Subject: [Expat-checkins] expat/doc reference.html, 1.47, 1.48 style.css, 1.4, 1.5 Message-ID: Update of /cvsroot/expat/expat/doc In directory sc8-pr-cvs1:/tmp/cvs-serv6105 Modified Files: reference.html style.css Log Message: Added documentation for the pre-processor macros used to configure Expat. Index: reference.html =================================================================== RCS file: /cvsroot/expat/expat/doc/reference.html,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- reference.html 28 Aug 2003 13:12:34 -0000 1.47 +++ reference.html 8 Oct 2003 03:32:25 -0000 1.48 @@ -607,6 +607,57 @@

In order to read an external DTD, you also have to set an external entity reference handler as described above.

+

Configuring Expat Using the Pre-Processor

+ +

Expat's feature set can be configured using a small number of +pre-processor definitions. The definition of this symbols does not +affect the set of entry points for Expat, only the behavior of the API +and the definition of character types in the case of +XML_UNICODE_WCHAR_T. The symbols are:

+ +
+
XML_DTD
+
Include support for using and reporting DTD-based content. If +this is defined, default attribute values from the DTD are reported +and attribute value normalization occurs based on the type of +attributes. Callbacks can be registered which report information from +the DTD (including content models and attribute definitions) only if +this is defined. Without this, Expat has a smaller memory footprint +and can be faster.
+ +
XML_NS
+
When defined, support for the Namespaces in XML +specification is included.
+ +
XML_UNICODE
+
When defined, character data reported to the application is +encoded in UTF-16 using wide characters of the type +XML_Char. This is implied if +XML_UNICODE_WCHAR_T is defined. + +
XML_UNICODE_WCHAR_T
+
If defined, causes the XML_Char character type to be +defined using the wchar_t type; otherwise, unsigned +short is used. Defining this implies +XML_UNICODE.
+ +
XML_CONTEXT_BYTES
+
The number of input bytes of markup context which the parser will +ensure are available for reporting via XML_GetInputContext. This is +normally set to 1024. If this is not defined, the input context will +not be available and XML_GetInputContext will always report NULL. Without +this, Expat has a smaller memory footprint and can be faster.
+ +
XML_STATIC
+
On Windows, this should be set if Expat is going to be linked +statically with the code that calls it; this is required to get all +the right MSVC magic annotations correct. This is ignored on other +platforms.
+
+
Index: style.css =================================================================== RCS file: /cvsroot/expat/expat/doc/style.css,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- style.css 26 Aug 2002 17:27:29 -0000 1.4 +++ style.css 8 Oct 2003 03:32:25 -0000 1.5 @@ -49,3 +49,10 @@ dd { margin-bottom: 2em; } + +.cpp-symbols dt { + font-family: monospace; +} +.cpp-symbols dd { + margin-bottom: 1em; +} From fdrake at users.sourceforge.net Thu Oct 9 08:18:10 2003 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Thu Oct 9 08:18:14 2003 Subject: [Expat-checkins] expat Changes,1.35,1.36 Message-ID: Update of /cvsroot/expat/expat In directory sc8-pr-cvs1:/tmp/cvs-serv28203 Modified Files: Changes Log Message: Minor updates before release. Index: Changes =================================================================== RCS file: /cvsroot/expat/expat/Changes,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- Changes 15 Jul 2003 15:20:33 -0000 1.35 +++ Changes 9 Oct 2003 12:18:08 -0000 1.36 @@ -1,8 +1,10 @@ Release 1.95.7 XXX date not determined - Fixed enum XML_Status issue (reported on SourceForge many times), so compilers that are properly picky will be happy. - - Fixed a variety of bugs: see SF issues ... - - Added more regression tests. + - Fixed a variety of bugs: see SF issues 676844, 679754, + 692878, 692964, 695401, 699323. + - Improved hash table lookups. + - Added more regression tests and improved documentation. Release 1.95.6 Tue Jan 28 2003 - Added XML_FreeContentModel(). From fdrake at users.sourceforge.net Thu Oct 9 08:18:43 2003 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Thu Oct 9 08:18:51 2003 Subject: [Expat-checkins] expat expat.spec,1.10,1.11 Message-ID: Update of /cvsroot/expat/expat In directory sc8-pr-cvs1:/tmp/cvs-serv28257 Modified Files: expat.spec Log Message: Minor updates before release. Index: expat.spec =================================================================== RCS file: /cvsroot/expat/expat/expat.spec,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- expat.spec 15 Jul 2003 15:20:34 -0000 1.10 +++ expat.spec 9 Oct 2003 12:18:41 -0000 1.11 @@ -38,7 +38,8 @@ /usr/man/man1/xmlwf.1.gz %changelog -* Tue Jul 15 2003 Fred L. Drake, Jr. +* Fri Oct 10 2003 Fred L. Drake, Jr. +[Release 1.95.7-1] - Updated for the 1.95.7 release. * Sat Jan 25 2003 Fred L. Drake, Jr. From gstein at users.sourceforge.net Thu Oct 9 17:32:30 2003 From: gstein at users.sourceforge.net (Greg Stein) Date: Thu Oct 9 17:44:35 2003 Subject: [Expat-checkins] expat configure.in,1.35,1.36 Message-ID: Update of /cvsroot/expat/expat In directory sc8-pr-cvs1:/tmp/cvs-serv27461 Modified Files: configure.in Log Message: Put in a little protection against the developer not having the check package available. sfbug #664541. * configure.in: look for check.h. This will set up a HAVE_CHECK_H define. * tests/chardata.c, tests/runtests.c: update banner. add test for HAVE_CHECK_H and bail if not present. Index: configure.in =================================================================== RCS file: /cvsroot/expat/expat/configure.in,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- configure.in 15 Jul 2003 17:29:42 -0000 1.35 +++ configure.in 9 Oct 2003 21:32:28 -0000 1.36 @@ -105,6 +105,7 @@ AC_SUBST(FILEMAP) AC_CHECK_FUNCS(memmove bcopy) +AC_CHECK_HEADERS(check.h) dnl some basic configuration AC_DEFINE([XML_NS], 1, From gstein at users.sourceforge.net Thu Oct 9 17:32:30 2003 From: gstein at users.sourceforge.net (Greg Stein) Date: Thu Oct 9 17:44:36 2003 Subject: [Expat-checkins] expat/tests chardata.c, 1.4, 1.5 runtests.c, 1.51, 1.52 Message-ID: Update of /cvsroot/expat/expat/tests In directory sc8-pr-cvs1:/tmp/cvs-serv27461/tests Modified Files: chardata.c runtests.c Log Message: Put in a little protection against the developer not having the check package available. sfbug #664541. * configure.in: look for check.h. This will set up a HAVE_CHECK_H define. * tests/chardata.c, tests/runtests.c: update banner. add test for HAVE_CHECK_H and bail if not present. Index: chardata.c =================================================================== RCS file: /cvsroot/expat/expat/tests/chardata.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- chardata.c 21 May 2002 21:39:18 -0000 1.4 +++ chardata.c 9 Oct 2003 21:32:28 -0000 1.5 @@ -1,7 +1,15 @@ -/* chardata.c - * - * - */ +/* Copyright (c) 1998-2003 Thai Open Source Software Center Ltd + See the file COPYING for copying permission. + + chardata.c +*/ + +#include +#ifdef HAVE_CHECK_H +#include +#else +#error This test suite requires the 'check' unit test framework (http://check.sf.net/) +#endif #include #include Index: runtests.c =================================================================== RCS file: /cvsroot/expat/expat/tests/runtests.c,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- runtests.c 27 Aug 2003 12:34:23 -0000 1.51 +++ runtests.c 9 Oct 2003 21:32:28 -0000 1.52 @@ -1,5 +1,17 @@ -#include +/* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd + See the file COPYING for copying permission. + + runtest.c : run the Expat test suite +*/ + +#include +#ifdef HAVE_CHECK_H #include +#else +#error This test suite requires the 'check' unit test framework (http://check.sf.net/) +#endif + +#include #include #include #include From fdrake at users.sourceforge.net Sat Oct 11 13:50:24 2003 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Sat Oct 11 13:50:59 2003 Subject: [Expat-checkins] expat make-release.sh,1.5,1.6 Message-ID: Update of /cvsroot/expat/expat In directory sc8-pr-cvs1:/tmp/cvs-serv11058 Modified Files: make-release.sh Log Message: - move the CVS repository specification to a variable - use authenticated access for now, since SF's anonymous CVS still isn't in a happy state Index: make-release.sh =================================================================== RCS file: /cvsroot/expat/expat/make-release.sh,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- make-release.sh 20 Jan 2003 15:25:20 -0000 1.5 +++ make-release.sh 11 Oct 2003 17:50:22 -0000 1.6 @@ -7,6 +7,9 @@ # Note: tagname may be HEAD to just grab the head revision (e.g. for testing) # +CVSROOT=':ext:cvs.libexpat.org:/cvsroot/expat' +#CVSROOT=':pserver:anonymous@cvs.libexpat.org:/cvsroot/expat' + if test $# != 1; then echo "USAGE: $0 tagname" exit 1 @@ -19,7 +22,7 @@ fi echo "Checking out into temporary area: $tmpdir" -cvs -d :pserver:anonymous@cvs.libexpat.org:/cvsroot/expat export -r "$1" -d $tmpdir expat || exit 1 +cvs -d "$CVSROOT" export -r "$1" -d $tmpdir expat || exit 1 echo "" echo "----------------------------------------------------------------------" From fdrake at users.sourceforge.net Wed Oct 15 12:25:45 2003 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Wed Oct 15 12:25:53 2003 Subject: [Expat-checkins] expat/doc reference.html,1.48,1.49 Message-ID: Update of /cvsroot/expat/expat/doc In directory sc8-pr-cvs1:/tmp/cvs-serv25971/doc Modified Files: reference.html Log Message: Deal with issue discussed in SF patch #820946: Expat doesn't handle the use of modified default calling conventions in client code. To deal with this issue and generally clean up the mass of macros being used to support bits of the machinery, two new macros are being added: - XMLCALL, which expands to whatever is needed to nail down the calling convention for all calls across the library boundary. This must match the convention used for the system's malloc() implementation. - XMLIMPORT, defined to be whatever magic is needed to mark an entry point as imported from a dynamically loaded module (.dll, .so, .sl, whatever). These macros are used to define the XMLPARSEAPI macro already being used to define the API entry points. In addition, XMLCALL is used to define the types of callback functions, and all example code uses this explicitly in both the distributed applications and the documentation. Index: reference.html =================================================================== RCS file: /cvsroot/expat/expat/doc/reference.html,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- reference.html 8 Oct 2003 03:32:25 -0000 1.48 +++ reference.html 15 Oct 2003 16:25:43 -0000 1.49 @@ -182,7 +182,7 @@
 int Depth;
 
-void
+void XMLCALL
 start(void *data, const char *el, const char **attr) {
   int i;
 
@@ -203,12 +203,28 @@
 

The end tag simply does the bookkeeping work of decrementing Depth.

-void
+void XMLCALL
 end(void *data, const char *el) {
   Depth--;
 }  /* End of end handler */
 
+

Note the XMLCALL annotation used for the callbacks. +This is used to ensure that the Expat and the callbacks are using the +same calling convention in case the compiler options used for Expat +itself and the client code are different. Expat tries not to care +what the default calling convention is, though it may require that it +be compiled with a default convention of "cdecl" on some platforms. +For code which uses Expat, however, the calling convention is +specified by the XMLCALL annotation on most platforms; +callbacks should be defined using this annotation.

+ +

The XMLCALL annotation was added in Expat 1.95.7, but +existing working Expat applications don't need to add it (since they +are already using the "cdecl" calling convention, or they wouldn't be +working). The annotation is only needed if the default calling +convention may be something other than "cdecl".

+

After creating the parser, the main program just has the job of shoveling the document to the parser so that it can do its work.

@@ -360,7 +376,7 @@ /* Other initializations here */ } /* End of init_info */ -void +void XMLCALL rawstart(void *data, const char *el, const char **attr) { Parseinfo *inf = (Parseinfo *) data; @@ -375,7 +391,7 @@ inf->depth++; } /* End of rawstart */ -void +void XMLCALL rawend(void *data, const char *el) { Parseinfo *inf = (Parseinfo *) data; @@ -425,7 +441,7 @@ static int wrong_version; static XML_Parser parser; -static void +static void XMLCALL xmldecl_handler(void *userData, const XML_Char *version, const XML_Char *encoding, @@ -702,9 +718,9 @@
 typedef struct {
-  void *(*malloc_fcn)(size_t size);
-  void *(*realloc_fcn)(void *ptr, size_t size);
-  void (*free_fcn)(void *ptr);
+  void *(XMLCALL *malloc_fcn)(size_t size);
+  void *(XMLCALL *realloc_fcn)(void *ptr, size_t size);
+  void (XMLCALL *free_fcn)(void *ptr);
 } XML_Memory_Handling_Suite;
 
@@ -872,9 +888,9 @@
 typedef void
-(*XML_StartElementHandler)(void *userData,
-                           const XML_Char *name,
-                           const XML_Char **atts);
+(XMLCALL *XML_StartElementHandler)(void *userData,
+                                   const XML_Char *name,
+                                   const XML_Char **atts);
 

Set handler for start (and empty) tags. Attributes are passed to the start handler as a pointer to a vector of char pointers. Each attribute seen in @@ -892,8 +908,8 @@

 typedef void
-(*XML_EndElementHandler)(void *userData,
-                         const XML_Char *name);
+(XMLCALL *XML_EndElementHandler)(void *userData,
+                                 const XML_Char *name);
 

Set handler for end (and empty) tags. As noted above, an empty tag generates a call to both start and end handlers.

@@ -915,9 +931,9 @@
 typedef void
-(*XML_CharacterDataHandler)(void *userData,
-                            const XML_Char *s,
-                            int len);
+(XMLCALL *XML_CharacterDataHandler)(void *userData,
+                                    const XML_Char *s,
+                                    int len);
 

Set a text handler. The string your handler receives is NOT nul-terminated. You have to use the length argument @@ -934,9 +950,9 @@

 typedef void
-(*XML_ProcessingInstructionHandler)(void *userData,
-                                    const XML_Char *target,
-                                    const XML_Char *data);
+(XMLCALL *XML_ProcessingInstructionHandler)(void *userData,
+                                            const XML_Char *target,
+                                            const XML_Char *data);
 
 

Set a handler for processing instructions. The target is the first word @@ -951,8 +967,8 @@

 typedef void
-(*XML_CommentHandler)(void *userData,
-                      const XML_Char *data);
+(XMLCALL *XML_CommentHandler)(void *userData,
+                              const XML_Char *data);
 

Set a handler for comments. The data is all text inside the comment delimiters.

@@ -965,7 +981,7 @@
 typedef void
-(*XML_StartCdataSectionHandler)(void *userData);
+(XMLCALL *XML_StartCdataSectionHandler)(void *userData);
 

Set a handler that gets called at the beginning of a CDATA section.

@@ -977,7 +993,7 @@
 typedef void
-(*XML_EndCdataSectionHandler)(void *userData);
+(XMLCALL *XML_EndCdataSectionHandler)(void *userData);
 

Set a handler that gets called at the end of a CDATA section.

@@ -998,9 +1014,9 @@
 typedef void
-(*XML_DefaultHandler)(void *userData,
-                      const XML_Char *s,
-                      int len);
+(XMLCALL *XML_DefaultHandler)(void *userData,
+                              const XML_Char *s,
+                              int len);
 

Sets a handler for any characters in the document which wouldn't @@ -1028,9 +1044,9 @@

 typedef void
-(*XML_DefaultHandler)(void *userData,
-                      const XML_Char *s,
-                      int len);
+(XMLCALL *XML_DefaultHandler)(void *userData,
+                              const XML_Char *s,
+                              int len);
 

This sets a default handler, but doesn't inhibit the expansion of internal entity references. The entity reference will not be passed @@ -1047,11 +1063,11 @@

 typedef int
-(*XML_ExternalEntityRefHandler)(XML_Parser p,
-                                const XML_Char *context,
-                                const XML_Char *base,
-                                const XML_Char *systemId,
-                                const XML_Char *publicId);
+(XMLCALL *XML_ExternalEntityRefHandler)(XML_Parser p,
+                                        const XML_Char *context,
+                                        const XML_Char *base,
+                                        const XML_Char *systemId,
+                                        const XML_Char *publicId);
 

Set an external entity reference handler. This handler is also called for processing an external DTD subset if parameter entity parsing @@ -1124,9 +1140,9 @@

 typedef void
-(*XML_SkippedEntityHandler)(void *userData,
-                            const XML_Char *entityName,
-                            int is_parameter_entity);
+(XMLCALL *XML_SkippedEntityHandler)(void *userData,
+                                    const XML_Char *entityName,
+                                    int is_parameter_entity);
 

Set a skipped entity handler. This is called in two situations:

    @@ -1151,15 +1167,15 @@
     typedef int
    -(*XML_UnknownEncodingHandler)(void *encodingHandlerData,
    -                              const XML_Char *name,
    -                              XML_Encoding *info);
    +(XMLCALL *XML_UnknownEncodingHandler)(void *encodingHandlerData,
    +                                      const XML_Char *name,
    +                                      XML_Encoding *info);
     
     typedef struct {
       int map[256];
       void *data;
    -  int (*convert)(void *data, const char *s);
    -  void (*release)(void *data);
    +  int (XMLCALL *convert)(void *data, const char *s);
    +  void (XMLCALL *release)(void *data);
     } XML_Encoding;
     

    Set a handler to deal with encodings other than the

     typedef void
    -(*XML_StartNamespaceDeclHandler)(void *userData,
    -                                 const XML_Char *prefix,
    -                                 const XML_Char *uri);
    +(XMLCALL *XML_StartNamespaceDeclHandler)(void *userData,
    +                                         const XML_Char *prefix,
    +                                         const XML_Char *uri);
     

    Set a handler to be called when a namespace is declared. Namespace declarations occur inside start tags. But the namespace declaration start @@ -1215,8 +1231,8 @@

     typedef void
    -(*XML_EndNamespaceDeclHandler)(void *userData,
    -                               const XML_Char *prefix);
    +(XMLCALL *XML_EndNamespaceDeclHandler)(void *userData,
    +                                       const XML_Char *prefix);
     

    Set a handler to be called when leaving the scope of a namespace declaration. This will be called, for each namespace declaration, @@ -1240,10 +1256,10 @@

     typedef void
    -(*XML_XmlDeclHandler) (void            *userData,
    -                       const XML_Char  *version,
    -                       const XML_Char  *encoding,
    -                       int             standalone);
    +(XMLCALL *XML_XmlDeclHandler)(void            *userData,
    +                              const XML_Char  *version,
    +                              const XML_Char  *encoding,
    +                              int             standalone);
     

    Sets a handler that is called for XML declarations and also for text declarations discovered in external entities. The way to @@ -1262,11 +1278,11 @@

     typedef void
    -(*XML_StartDoctypeDeclHandler)(void           *userData,
    -                               const XML_Char *doctypeName,
    -                               const XML_Char *sysid,
    -                               const XML_Char *pubid,
    -                               int            has_internal_subset);
    +(XMLCALL *XML_StartDoctypeDeclHandler)(void           *userData,
    +                                       const XML_Char *doctypeName,
    +                                       const XML_Char *sysid,
    +                                       const XML_Char *pubid,
    +                                       int            has_internal_subset);
     

    Set a handler that is called at the start of a DOCTYPE declaration, before any external or internal subset is parsed. Both sysid @@ -1281,7 +1297,7 @@

     typedef void
    -(*XML_EndDoctypeDeclHandler)(void *userData);
    +(XMLCALL *XML_EndDoctypeDeclHandler)(void *userData);
     

    Set a handler that is called at the end of a DOCTYPE declaration, after parsing any external subset.

    @@ -1303,9 +1319,9 @@
     typedef void
    -(*XML_ElementDeclHandler)(void *userData,
    -                          const XML_Char *name,
    -                          XML_Content *model);
    +(XMLCALL *XML_ElementDeclHandler)(void *userData,
    +                                  const XML_Char *name,
    +                                  XML_Content *model);
     
     enum XML_Content_Type {
    @@ -1374,12 +1390,12 @@
     
     typedef void
    -(*XML_AttlistDeclHandler) (void           *userData,
    -                           const XML_Char *elname,
    -                           const XML_Char *attname,
    -                           const XML_Char *att_type,
    -                           const XML_Char *dflt,
    -                           int            isrequired);
    +(XMLCALL *XML_AttlistDeclHandler)(void           *userData,
    +                                  const XML_Char *elname,
    +                                  const XML_Char *attname,
    +                                  const XML_Char *att_type,
    +                                  const XML_Char *dflt,
    +                                  int            isrequired);
     

    Set a handler for attlist declarations in the DTD. This handler is called for each attribute. So a single attlist declaration @@ -1406,15 +1422,15 @@

     typedef void
    -(*XML_EntityDeclHandler) (void           *userData,
    -                          const XML_Char *entityName,
    -                          int            is_parameter_entity,
    -                          const XML_Char *value,
    -                          int            value_length,
    -                          const XML_Char *base,
    -                          const XML_Char *systemId,
    -                          const XML_Char *publicId,
    -                          const XML_Char *notationName);
    +(XMLCALL *XML_EntityDeclHandler)(void           *userData,
    +                                 const XML_Char *entityName,
    +                                 int            is_parameter_entity,
    +                                 const XML_Char *value,
    +                                 int            value_length, 
    +                                 const XML_Char *base,
    +                                 const XML_Char *systemId,
    +                                 const XML_Char *publicId,
    +                                 const XML_Char *notationName);
     

    Sets a handler that will be called for all entity declarations. The is_parameter_entity argument will be non-zero in the @@ -1439,12 +1455,12 @@

     typedef void
    -(*XML_UnparsedEntityDeclHandler)(void *userData,
    -                                 const XML_Char *entityName,
    -                                 const XML_Char *base,
    -                                 const XML_Char *systemId,
    -                                 const XML_Char *publicId,
    -                                 const XML_Char *notationName);
    +(XMLCALL *XML_UnparsedEntityDeclHandler)(void *userData,
    +                                         const XML_Char *entityName, 
    +                                         const XML_Char *base,
    +                                         const XML_Char *systemId,
    +                                         const XML_Char *publicId,
    +                                         const XML_Char *notationName);
     

    Set a handler that receives declarations of unparsed entities. These are entity declarations that have a notation (NDATA) field:

    @@ -1464,11 +1480,11 @@
     typedef void
    -(*XML_NotationDeclHandler)(void *userData,
    -                           const XML_Char *notationName,
    -                           const XML_Char *base,
    -                           const XML_Char *systemId,
    -                           const XML_Char *publicId);
    +(XMLCALL *XML_NotationDeclHandler)(void *userData, 
    +                                   const XML_Char *notationName,
    +                                   const XML_Char *base,
    +                                   const XML_Char *systemId,
    +                                   const XML_Char *publicId);
     

    Set a handler that receives notation declarations.

    @@ -1480,7 +1496,7 @@
     typedef int 
    -(*XML_NotStandaloneHandler)(void *userData);
    +(XMLCALL *XML_NotStandaloneHandler)(void *userData);
     

    Set a handler that is called if the document is not "standalone". This happens when there is an external subset or a reference to a From fdrake at users.sourceforge.net Wed Oct 15 12:25:45 2003 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Wed Oct 15 12:25:55 2003 Subject: [Expat-checkins] expat/examples elements.c, 1.3, 1.4 outline.c, 1.4, 1.5 Message-ID: Update of /cvsroot/expat/expat/examples In directory sc8-pr-cvs1:/tmp/cvs-serv25971/examples Modified Files: elements.c outline.c Log Message: Deal with issue discussed in SF patch #820946: Expat doesn't handle the use of modified default calling conventions in client code. To deal with this issue and generally clean up the mass of macros being used to support bits of the machinery, two new macros are being added: - XMLCALL, which expands to whatever is needed to nail down the calling convention for all calls across the library boundary. This must match the convention used for the system's malloc() implementation. - XMLIMPORT, defined to be whatever magic is needed to mark an entry point as imported from a dynamically loaded module (.dll, .so, .sl, whatever). These macros are used to define the XMLPARSEAPI macro already being used to define the API entry points. In addition, XMLCALL is used to define the types of callback functions, and all example code uses this explicitly in both the distributed applications and the documentation. Index: elements.c =================================================================== RCS file: /cvsroot/expat/expat/examples/elements.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- elements.c 2 Aug 2002 19:40:09 -0000 1.3 +++ elements.c 15 Oct 2003 16:25:43 -0000 1.4 @@ -7,7 +7,7 @@ #include #include "expat.h" -static void +static void XMLCALL startElement(void *userData, const char *name, const char **atts) { int i; @@ -18,7 +18,7 @@ *depthPtr += 1; } -static void +static void XMLCALL endElement(void *userData, const char *name) { int *depthPtr = userData; Index: outline.c =================================================================== RCS file: /cvsroot/expat/expat/examples/outline.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- outline.c 2 Aug 2002 19:40:09 -0000 1.4 +++ outline.c 15 Oct 2003 16:25:43 -0000 1.5 @@ -30,7 +30,7 @@ int Depth; -static void +static void XMLCALL start(void *data, const char *el, const char **attr) { int i; @@ -48,7 +48,7 @@ Depth++; } -static void +static void XMLCALL end(void *data, const char *el) { Depth--; From fdrake at users.sourceforge.net Wed Oct 15 12:25:46 2003 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Wed Oct 15 12:25:56 2003 Subject: [Expat-checkins] expat/lib expat.h, 1.54, 1.55 xmlparse.c, 1.111, 1.112 Message-ID: Update of /cvsroot/expat/expat/lib In directory sc8-pr-cvs1:/tmp/cvs-serv25971/lib Modified Files: expat.h xmlparse.c Log Message: Deal with issue discussed in SF patch #820946: Expat doesn't handle the use of modified default calling conventions in client code. To deal with this issue and generally clean up the mass of macros being used to support bits of the machinery, two new macros are being added: - XMLCALL, which expands to whatever is needed to nail down the calling convention for all calls across the library boundary. This must match the convention used for the system's malloc() implementation. - XMLIMPORT, defined to be whatever magic is needed to mark an entry point as imported from a dynamically loaded module (.dll, .so, .sl, whatever). These macros are used to define the XMLPARSEAPI macro already being used to define the API entry points. In addition, XMLCALL is used to define the types of callback functions, and all example code uses this explicitly in both the distributed applications and the documentation. Index: expat.h =================================================================== RCS file: /cvsroot/expat/expat/lib/expat.h,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- expat.h 15 Jul 2003 15:20:35 -0000 1.54 +++ expat.h 15 Oct 2003 16:25:43 -0000 1.55 @@ -16,17 +16,64 @@ #include -#ifndef XMLPARSEAPI #if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__) -#ifdef XML_STATIC -#define XMLPARSEAPI(type) type __cdecl -#else -#define XMLPARSEAPI(type) __declspec(dllimport) type __cdecl +#define XML_USE_MSC_EXTENSIONS 1 #endif + +/* Expat tries very hard to make the API buondary very specifically + defined. There are two macros defined to control this boundary; + each of these can be defined before including this header to + achieve some different behavior, but doing so it not recommended or + tested frequently. + + XMLCALL - The calling convention to use for all calls across the + "library boundary." This will default to cdecl, and + try really hard to tell the compiler that's what we + want. + + XMLIMPORT - Whatever magic is needed to note that a function is + to be imported from a dynamically loaded library + (.dll, .so, or .sl, depending on your platform). + + The XMLCALL macro was added in Expat 1.95.7. The only one which is + expected to be directly useful in client code is XMLCALL. + + Note that on at least some Unix versions, the Expat library must be + compiled with the cdecl calling convention as the default since + system headers may assume the cdecl convention. +*/ +#ifndef XMLCALL +#if defined(XML_USE_MSC_EXTENSIONS) +#define XMLCALL __cdecl +#elif defined(__GNUC__) +#define XMLCALL __attribute__((cdecl)) #else -#define XMLPARSEAPI(type) type +/* For any platform which uses this definition and supports more than + one calling convention, we need to extend this definition to + declare the convention used on that platform, if it's possible to + do so. + + If this is the case for your platform, please file a bug report + with information on how to identify your platform via the C + pre-processor and how to specify the same calling convention as the + platform's malloc() implementation. +*/ +#define XMLCALL #endif -#endif /* not defined XMLPARSEAPI */ +#endif /* not defined XMLCALL */ + + +#if !defined(XMLIMPORT) && !defined(XML_STATIC) +#ifdef XML_USE_MSC_EXTENSIONS +#define XMLIMPORT __declspec(dllimport) +#endif +#endif + +#ifndef XMLIMPORT +#define XMLIMPORT +#endif + +#define XMLPARSEAPI(type) XMLIMPORT type XMLCALL #ifdef __cplusplus extern "C" { @@ -157,9 +204,9 @@ description of the model argument. It's the caller's responsibility to free model when finished with it. */ -typedef void (*XML_ElementDeclHandler) (void *userData, - const XML_Char *name, - XML_Content *model); +typedef void (XMLCALL *XML_ElementDeclHandler) (void *userData, + const XML_Char *name, + XML_Content *model); XMLPARSEAPI(void) XML_SetElementDeclHandler(XML_Parser parser, @@ -173,12 +220,13 @@ value will be NULL in the case of "#REQUIRED". If "isrequired" is true and default is non-NULL, then this is a "#FIXED" default. */ -typedef void (*XML_AttlistDeclHandler) (void *userData, - const XML_Char *elname, - const XML_Char *attname, - const XML_Char *att_type, - const XML_Char *dflt, - int isrequired); +typedef void (XMLCALL *XML_AttlistDeclHandler) ( + void *userData, + const XML_Char *elname, + const XML_Char *attname, + const XML_Char *att_type, + const XML_Char *dflt, + int isrequired); XMLPARSEAPI(void) XML_SetAttlistDeclHandler(XML_Parser parser, @@ -192,10 +240,10 @@ was no standalone parameter in the declaration, that it was given as no, or that it was given as yes. */ -typedef void (*XML_XmlDeclHandler) (void *userData, - const XML_Char *version, - const XML_Char *encoding, - int standalone); +typedef void (XMLCALL *XML_XmlDeclHandler) (void *userData, + const XML_Char *version, + const XML_Char *encoding, + int standalone); XMLPARSEAPI(void) XML_SetXmlDeclHandler(XML_Parser parser, @@ -203,9 +251,9 @@ typedef struct { - void *(*malloc_fcn)(size_t size); - void *(*realloc_fcn)(void *ptr, size_t size); - void (*free_fcn)(void *ptr); + void *(XMLCALL *malloc_fcn)(size_t size); + void *(XMLCALL *realloc_fcn)(void *ptr, size_t size); + void (XMLCALL *free_fcn)(void *ptr); } XML_Memory_Handling_Suite; /* Constructs a new parser; encoding is the encoding specified by the @@ -258,29 +306,31 @@ /* atts is array of name/value pairs, terminated by 0; names and values are 0 terminated. */ -typedef void (*XML_StartElementHandler)(void *userData, - const XML_Char *name, - const XML_Char **atts); +typedef void (XMLCALL *XML_StartElementHandler) (void *userData, + const XML_Char *name, + const XML_Char **atts); -typedef void (*XML_EndElementHandler)(void *userData, - const XML_Char *name); +typedef void (XMLCALL *XML_EndElementHandler) (void *userData, + const XML_Char *name); /* s is not 0 terminated. */ -typedef void (*XML_CharacterDataHandler)(void *userData, - const XML_Char *s, - int len); +typedef void (XMLCALL *XML_CharacterDataHandler) (void *userData, + const XML_Char *s, + int len); /* target and data are 0 terminated */ -typedef void (*XML_ProcessingInstructionHandler)(void *userData, - const XML_Char *target, - const XML_Char *data); +typedef void (XMLCALL *XML_ProcessingInstructionHandler) ( + void *userData, + const XML_Char *target, + const XML_Char *data); /* data is 0 terminated */ -typedef void (*XML_CommentHandler)(void *userData, const XML_Char *data); +typedef void (XMLCALL *XML_CommentHandler) (void *userData, + const XML_Char *data); -typedef void (*XML_StartCdataSectionHandler)(void *userData); -typedef void (*XML_EndCdataSectionHandler)(void *userData); +typedef void (XMLCALL *XML_StartCdataSectionHandler) (void *userData); +typedef void (XMLCALL *XML_EndCdataSectionHandler) (void *userData); /* This is called for any characters in the XML document for which there is no applicable handler. This includes both characters that @@ -295,14 +345,15 @@ default handler: for example, a comment might be split between multiple calls. */ -typedef void (*XML_DefaultHandler)(void *userData, - const XML_Char *s, - int len); +typedef void (XMLCALL *XML_DefaultHandler) (void *userData, + const XML_Char *s, + int len); /* This is called for the start of the DOCTYPE declaration, before any DTD or internal subset is parsed. */ -typedef void (*XML_StartDoctypeDeclHandler)(void *userData, +typedef void (XMLCALL *XML_StartDoctypeDeclHandler) ( + void *userData, const XML_Char *doctypeName, const XML_Char *sysid, const XML_Char *pubid, @@ -312,7 +363,7 @@ closing > is encountered, but after processing any external subset. */ -typedef void (*XML_EndDoctypeDeclHandler)(void *userData); +typedef void (XMLCALL *XML_EndDoctypeDeclHandler)(void *userData); /* This is called for entity declarations. The is_parameter_entity argument will be non-zero if the entity is a parameter entity, zero @@ -332,15 +383,16 @@ Note that is_parameter_entity can't be changed to XML_Bool, since that would break binary compatibility. */ -typedef void (*XML_EntityDeclHandler) (void *userData, - const XML_Char *entityName, - int is_parameter_entity, - const XML_Char *value, - int value_length, - const XML_Char *base, - const XML_Char *systemId, - const XML_Char *publicId, - const XML_Char *notationName); +typedef void (XMLCALL *XML_EntityDeclHandler) ( + void *userData, + const XML_Char *entityName, + int is_parameter_entity, + const XML_Char *value, + int value_length, + const XML_Char *base, + const XML_Char *systemId, + const XML_Char *publicId, + const XML_Char *notationName); XMLPARSEAPI(void) XML_SetEntityDeclHandler(XML_Parser parser, @@ -355,22 +407,24 @@ entityName, systemId and notationName arguments will never be NULL. The other arguments may be. */ -typedef void (*XML_UnparsedEntityDeclHandler)(void *userData, - const XML_Char *entityName, - const XML_Char *base, - const XML_Char *systemId, - const XML_Char *publicId, - const XML_Char *notationName); +typedef void (XMLCALL *XML_UnparsedEntityDeclHandler) ( + void *userData, + const XML_Char *entityName, + const XML_Char *base, + const XML_Char *systemId, + const XML_Char *publicId, + const XML_Char *notationName); /* This is called for a declaration of notation. The base argument is whatever was set by XML_SetBase. The notationName will never be NULL. The other arguments can be. */ -typedef void (*XML_NotationDeclHandler)(void *userData, - const XML_Char *notationName, - const XML_Char *base, - const XML_Char *systemId, - const XML_Char *publicId); +typedef void (XMLCALL *XML_NotationDeclHandler) ( + void *userData, + const XML_Char *notationName, + const XML_Char *base, + const XML_Char *systemId, + const XML_Char *publicId); /* When namespace processing is enabled, these are called once for each namespace declaration. The call to the start and end element @@ -378,12 +432,14 @@ declaration handlers. For an xmlns attribute, prefix will be NULL. For an xmlns="" attribute, uri will be NULL. */ -typedef void (*XML_StartNamespaceDeclHandler)(void *userData, - const XML_Char *prefix, - const XML_Char *uri); +typedef void (XMLCALL *XML_StartNamespaceDeclHandler) ( + void *userData, + const XML_Char *prefix, + const XML_Char *uri); -typedef void (*XML_EndNamespaceDeclHandler)(void *userData, - const XML_Char *prefix); +typedef void (XMLCALL *XML_EndNamespaceDeclHandler) ( + void *userData, + const XML_Char *prefix); /* This is called if the document is not standalone, that is, it has an external subset or a reference to a parameter entity, but does not @@ -394,7 +450,7 @@ conditions above this handler will only be called if the referenced entity was actually read. */ -typedef int (*XML_NotStandaloneHandler)(void *userData); +typedef int (XMLCALL *XML_NotStandaloneHandler) (void *userData); /* This is called for a reference to an external parsed general entity. The referenced entity is not automatically parsed. The @@ -430,11 +486,12 @@ Note that unlike other handlers the first argument is the parser, not userData. */ -typedef int (*XML_ExternalEntityRefHandler)(XML_Parser parser, - const XML_Char *context, - const XML_Char *base, - const XML_Char *systemId, - const XML_Char *publicId); +typedef int (XMLCALL *XML_ExternalEntityRefHandler) ( + XML_Parser parser, + const XML_Char *context, + const XML_Char *base, + const XML_Char *systemId, + const XML_Char *publicId); /* This is called in two situations: 1) An entity reference is encountered for which no declaration @@ -446,9 +503,10 @@ the event would be out of sync with the reporting of the declarations or attribute values */ -typedef void (*XML_SkippedEntityHandler)(void *userData, - const XML_Char *entityName, - int is_parameter_entity); +typedef void (XMLCALL *XML_SkippedEntityHandler) ( + void *userData, + const XML_Char *entityName, + int is_parameter_entity); /* This structure is filled in by the XML_UnknownEncodingHandler to provide information to the parser about encodings that are unknown @@ -505,8 +563,8 @@ typedef struct { int map[256]; void *data; - int (*convert)(void *data, const char *s); - void (*release)(void *data); + int (XMLCALL *convert)(void *data, const char *s); + void (XMLCALL *release)(void *data); } XML_Encoding; /* This is called for an encoding that is unknown to the parser. @@ -524,9 +582,10 @@ If info does not describe a suitable encoding, then the parser will return an XML_UNKNOWN_ENCODING error. */ -typedef int (*XML_UnknownEncodingHandler)(void *encodingHandlerData, - const XML_Char *name, - XML_Encoding *info); +typedef int (XMLCALL *XML_UnknownEncodingHandler) ( + void *encodingHandlerData, + const XML_Char *name, + XML_Encoding *info); XMLPARSEAPI(void) XML_SetElementHandler(XML_Parser parser, Index: xmlparse.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmlparse.c,v retrieving revision 1.111 retrieving revision 1.112 diff -u -d -r1.111 -r1.112 --- xmlparse.c 22 Sep 2003 14:14:54 -0000 1.111 +++ xmlparse.c 15 Oct 2003 16:25:43 -0000 1.112 @@ -10,7 +10,6 @@ #include "winconfig.h" #define XMLPARSEAPI(type) type __cdecl #include "expat.h" -#undef XMLPARSEAPI #elif defined(MACOS_CLASSIC) @@ -21,15 +20,10 @@ #include -#ifdef __declspec -#define XMLPARSEAPI(type) type __cdecl -#endif +#define XMLIMPORT #include "expat.h" -#ifdef __declspec -#undef XMLPARSEAPI -#endif #endif /* ndef COMPILED_FROM_DSP */ #ifdef XML_UNICODE @@ -671,13 +665,13 @@ (processor != prologInitProcessor)) #endif /* XML_DTD */ -XML_Parser +XML_Parser XMLCALL XML_ParserCreate(const XML_Char *encodingName) { return XML_ParserCreate_MM(encodingName, NULL, NULL); } -XML_Parser +XML_Parser XMLCALL XML_ParserCreateNS(const XML_Char *encodingName, XML_Char nsSep) { XML_Char tmp[2]; @@ -692,7 +686,7 @@ 'n', 'a', 'm', 'e', 's', 'p', 'a', 'c', 'e', '\0' }; -XML_Parser +XML_Parser XMLCALL XML_ParserCreate_MM(const XML_Char *encodingName, const XML_Memory_Handling_Suite *memsuite, const XML_Char *nameSep) @@ -893,7 +887,7 @@ } } -XML_Bool +XML_Bool XMLCALL XML_ParserReset(XML_Parser parser, const XML_Char *encodingName) { TAG *tStk; @@ -920,7 +914,7 @@ return setContext(parser, implicitContext); } -enum XML_Status +enum XML_Status XMLCALL XML_SetEncoding(XML_Parser parser, const XML_Char *encodingName) { /* Block after XML_Parse()/XML_ParseBuffer() has been called. @@ -939,7 +933,7 @@ return XML_STATUS_OK; } -XML_Parser +XML_Parser XMLCALL XML_ExternalEntityParserCreate(XML_Parser oldParser, const XML_Char *context, const XML_Char *encodingName) @@ -1082,7 +1076,7 @@ } } -void +void XMLCALL XML_ParserFree(XML_Parser parser) { for (;;) { @@ -1123,13 +1117,13 @@ FREE(parser); } -void +void XMLCALL XML_UseParserAsHandlerArg(XML_Parser parser) { handlerArg = parser; } -enum XML_Error +enum XML_Error XMLCALL XML_UseForeignDTD(XML_Parser parser, XML_Bool useDTD) { #ifdef XML_DTD @@ -1143,7 +1137,7 @@ #endif } -void +void XMLCALL XML_SetReturnNSTriplet(XML_Parser parser, int do_nst) { /* block after XML_Parse()/XML_ParseBuffer() has been called */ @@ -1152,7 +1146,7 @@ ns_triplets = do_nst ? XML_TRUE : XML_FALSE; } -void +void XMLCALL XML_SetUserData(XML_Parser parser, void *p) { if (handlerArg == userData) @@ -1161,7 +1155,7 @@ userData = p; } -enum XML_Status +enum XML_Status XMLCALL XML_SetBase(XML_Parser parser, const XML_Char *p) { if (p) { @@ -1175,25 +1169,25 @@ return XML_STATUS_OK; } -const XML_Char * +const XML_Char * XMLCALL XML_GetBase(XML_Parser parser) { return curBase; } -int +int XMLCALL XML_GetSpecifiedAttributeCount(XML_Parser parser) { return nSpecifiedAtts; } -int +int XMLCALL XML_GetIdAttributeIndex(XML_Parser parser) { return idAttIndex; } -void +void XMLCALL XML_SetElementHandler(XML_Parser parser, XML_StartElementHandler start, XML_EndElementHandler end) @@ -1202,40 +1196,40 @@ endElementHandler = end; } -void +void XMLCALL XML_SetStartElementHandler(XML_Parser parser, XML_StartElementHandler start) { startElementHandler = start; } -void +void XMLCALL XML_SetEndElementHandler(XML_Parser parser, XML_EndElementHandler end) { endElementHandler = end; } -void +void XMLCALL XML_SetCharacterDataHandler(XML_Parser parser, XML_CharacterDataHandler handler) { characterDataHandler = handler; } -void +void XMLCALL XML_SetProcessingInstructionHandler(XML_Parser parser, XML_ProcessingInstructionHandler handler) { processingInstructionHandler = handler; } -void +void XMLCALL XML_SetCommentHandler(XML_Parser parser, XML_CommentHandler handler) { commentHandler = handler; } -void +void XMLCALL XML_SetCdataSectionHandler(XML_Parser parser, XML_StartCdataSectionHandler start, XML_EndCdataSectionHandler end) @@ -1244,19 +1238,19 @@ endCdataSectionHandler = end; } -void +void XMLCALL XML_SetStartCdataSectionHandler(XML_Parser parser, XML_StartCdataSectionHandler start) { startCdataSectionHandler = start; } -void +void XMLCALL XML_SetEndCdataSectionHandler(XML_Parser parser, XML_EndCdataSectionHandler end) { endCdataSectionHandler = end; } -void +void XMLCALL XML_SetDefaultHandler(XML_Parser parser, XML_DefaultHandler handler) { @@ -1264,7 +1258,7 @@ defaultExpandInternalEntities = XML_FALSE; } -void +void XMLCALL XML_SetDefaultHandlerExpand(XML_Parser parser, XML_DefaultHandler handler) { @@ -1272,7 +1266,7 @@ defaultExpandInternalEntities = XML_TRUE; } -void +void XMLCALL XML_SetDoctypeDeclHandler(XML_Parser parser, XML_StartDoctypeDeclHandler start, XML_EndDoctypeDeclHandler end) @@ -1281,33 +1275,33 @@ endDoctypeDeclHandler = end; } -void +void XMLCALL XML_SetStartDoctypeDeclHandler(XML_Parser parser, XML_StartDoctypeDeclHandler start) { startDoctypeDeclHandler = start; } -void +void XMLCALL XML_SetEndDoctypeDeclHandler(XML_Parser parser, XML_EndDoctypeDeclHandler end) { endDoctypeDeclHandler = end; } -void +void XMLCALL XML_SetUnparsedEntityDeclHandler(XML_Parser parser, XML_UnparsedEntityDeclHandler handler) { unparsedEntityDeclHandler = handler; } -void +void XMLCALL XML_SetNotationDeclHandler(XML_Parser parser, XML_NotationDeclHandler handler) { notationDeclHandler = handler; } -void +void XMLCALL XML_SetNamespaceDeclHandler(XML_Parser parser, XML_StartNamespaceDeclHandler start, XML_EndNamespaceDeclHandler end) @@ -1316,33 +1310,33 @@ endNamespaceDeclHandler = end; } -void +void XMLCALL XML_SetStartNamespaceDeclHandler(XML_Parser parser, XML_StartNamespaceDeclHandler start) { startNamespaceDeclHandler = start; } -void +void XMLCALL XML_SetEndNamespaceDeclHandler(XML_Parser parser, XML_EndNamespaceDeclHandler end) { endNamespaceDeclHandler = end; } -void +void XMLCALL XML_SetNotStandaloneHandler(XML_Parser parser, XML_NotStandaloneHandler handler) { notStandaloneHandler = handler; } -void +void XMLCALL XML_SetExternalEntityRefHandler(XML_Parser parser, XML_ExternalEntityRefHandler handler) { externalEntityRefHandler = handler; } -void +void XMLCALL XML_SetExternalEntityRefHandlerArg(XML_Parser parser, void *arg) { if (arg) @@ -1351,14 +1345,14 @@ externalEntityRefHandlerArg = parser; } -void +void XMLCALL XML_SetSkippedEntityHandler(XML_Parser parser, XML_SkippedEntityHandler handler) { skippedEntityHandler = handler; } -void +void XMLCALL XML_SetUnknownEncodingHandler(XML_Parser parser, XML_UnknownEncodingHandler handler, void *data) @@ -1367,34 +1361,34 @@ unknownEncodingHandlerData = data; } -void +void XMLCALL XML_SetElementDeclHandler(XML_Parser parser, XML_ElementDeclHandler eldecl) { elementDeclHandler = eldecl; } -void +void XMLCALL XML_SetAttlistDeclHandler(XML_Parser parser, XML_AttlistDeclHandler attdecl) { attlistDeclHandler = attdecl; } -void +void XMLCALL XML_SetEntityDeclHandler(XML_Parser parser, XML_EntityDeclHandler handler) { entityDeclHandler = handler; } -void +void XMLCALL XML_SetXmlDeclHandler(XML_Parser parser, XML_XmlDeclHandler handler) { xmlDeclHandler = handler; } -int +int XMLCALL XML_SetParamEntityParsing(XML_Parser parser, enum XML_ParamEntityParsing peParsing) { @@ -1409,7 +1403,7 @@ #endif } -enum XML_Status +enum XML_Status XMLCALL XML_Parse(XML_Parser parser, const char *s, int len, int isFinal) { if (len == 0) { @@ -1484,7 +1478,7 @@ } } -enum XML_Status +enum XML_Status XMLCALL XML_ParseBuffer(XML_Parser parser, int len, int isFinal) { const char *start = bufferPtr; @@ -1507,7 +1501,7 @@ } } -void * +void * XMLCALL XML_GetBuffer(XML_Parser parser, int len) { if (len > bufferLim - bufferEnd) { @@ -1576,13 +1570,13 @@ return bufferEnd; } -enum XML_Error +enum XML_Error XMLCALL XML_GetErrorCode(XML_Parser parser) { return errorCode; } -long +long XMLCALL XML_GetCurrentByteIndex(XML_Parser parser) { if (eventPtr) @@ -1590,7 +1584,7 @@ return -1; } -int +int XMLCALL XML_GetCurrentByteCount(XML_Parser parser) { if (eventEndPtr && eventPtr) @@ -1598,7 +1592,7 @@ return 0; } -const char * +const char * XMLCALL XML_GetInputContext(XML_Parser parser, int *offset, int *size) { #ifdef XML_CONTEXT_BYTES @@ -1611,7 +1605,7 @@ return (char *) 0; } -int +int XMLCALL XML_GetCurrentLineNumber(XML_Parser parser) { if (eventPtr) { @@ -1621,7 +1615,7 @@ return position.lineNumber + 1; } -int +int XMLCALL XML_GetCurrentColumnNumber(XML_Parser parser) { if (eventPtr) { @@ -1631,31 +1625,31 @@ return position.columnNumber; } -void +void XMLCALL XML_FreeContentModel(XML_Parser parser, XML_Content *model) { FREE(model); } -void * +void * XMLCALL XML_MemMalloc(XML_Parser parser, size_t size) { return MALLOC(size); } -void * +void * XMLCALL XML_MemRealloc(XML_Parser parser, void *ptr, size_t size) { return REALLOC(ptr, size); } -void +void XMLCALL XML_MemFree(XML_Parser parser, void *ptr) { FREE(ptr); } -void +void XMLCALL XML_DefaultCurrent(XML_Parser parser) { if (defaultHandler) { @@ -1669,7 +1663,7 @@ } } -const XML_LChar * +const XML_LChar * XMLCALL XML_ErrorString(enum XML_Error code) { static const XML_LChar *message[] = { @@ -1707,7 +1701,7 @@ return NULL; } -const XML_LChar * +const XML_LChar * XMLCALL XML_ExpatVersion(void) { /* V1 is used to string-ize the version number. However, it would @@ -1727,7 +1721,7 @@ #undef V2 } -XML_Expat_Version +XML_Expat_Version XMLCALL XML_ExpatVersionInfo(void) { XML_Expat_Version version; @@ -1739,7 +1733,7 @@ return version; } -const XML_Feature * +const XML_Feature * XMLCALL XML_GetFeatureList(void) { static XML_Feature features[] = { From fdrake at users.sourceforge.net Wed Oct 15 12:25:46 2003 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Wed Oct 15 12:25:58 2003 Subject: [Expat-checkins] expat/tests runtests.c,1.52,1.53 Message-ID: Update of /cvsroot/expat/expat/tests In directory sc8-pr-cvs1:/tmp/cvs-serv25971/tests Modified Files: runtests.c Log Message: Deal with issue discussed in SF patch #820946: Expat doesn't handle the use of modified default calling conventions in client code. To deal with this issue and generally clean up the mass of macros being used to support bits of the machinery, two new macros are being added: - XMLCALL, which expands to whatever is needed to nail down the calling convention for all calls across the library boundary. This must match the convention used for the system's malloc() implementation. - XMLIMPORT, defined to be whatever magic is needed to mark an entry point as imported from a dynamically loaded module (.dll, .so, .sl, whatever). These macros are used to define the XMLPARSEAPI macro already being used to define the API entry points. In addition, XMLCALL is used to define the types of callback functions, and all example code uses this explicitly in both the distributed applications and the documentation. Index: runtests.c =================================================================== RCS file: /cvsroot/expat/expat/tests/runtests.c,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- runtests.c 9 Oct 2003 21:32:28 -0000 1.52 +++ runtests.c 15 Oct 2003 16:25:43 -0000 1.53 @@ -77,7 +77,7 @@ but it doesn't need to do anything. */ -static void +static void XMLCALL dummy_start_doctype_handler(void *userData, const XML_Char *doctypeName, const XML_Char *sysid, @@ -85,11 +85,11 @@ int has_internal_subset) {} -static void +static void XMLCALL dummy_end_doctype_handler(void *userData) {} -static void +static void XMLCALL dummy_entity_decl_handler(void *userData, const XML_Char *entityName, int is_parameter_entity, @@ -101,7 +101,7 @@ const XML_Char *notationName) {} -static void +static void XMLCALL dummy_notation_decl_handler(void *userData, const XML_Char *notationName, const XML_Char *base, @@ -109,13 +109,13 @@ const XML_Char *publicId) {} -static void +static void XMLCALL dummy_element_decl_handler(void *userData, const XML_Char *name, XML_Content *model) {} -static void +static void XMLCALL dummy_attlist_decl_handler(void *userData, const XML_Char *elname, const XML_Char *attname, @@ -124,15 +124,15 @@ int isrequired) {} -static void +static void XMLCALL dummy_comment_handler(void *userData, const XML_Char *data) {} -static void +static void XMLCALL dummy_pi_handler(void *userData, const XML_Char *target, const XML_Char *data) {} -static void +static void XMLCALL dummy_start_element(void *userData, const XML_Char *name, const XML_Char **atts) {} @@ -192,13 +192,13 @@ } END_TEST -static void +static void XMLCALL accumulate_characters(void *userData, const XML_Char *s, int len) { CharData_AppendXMLChars((CharData *)userData, s, len); } -static void +static void XMLCALL accumulate_attribute(void *userData, const XML_Char *name, const XML_Char **atts) { @@ -429,7 +429,7 @@ } END_TEST -static void +static void XMLCALL start_element_event_handler2(void *userData, const XML_Char *name, const XML_Char **attr) { @@ -442,7 +442,7 @@ CharData_AppendString(storage, buffer); } -static void +static void XMLCALL end_element_event_handler2(void *userData, const XML_Char *name) { CharData *storage = (CharData *) userData; @@ -570,7 +570,7 @@ * Element event tests. */ -static void +static void XMLCALL end_element_event_handler(void *userData, const XML_Char *name) { CharData *storage = (CharData *) userData; @@ -660,7 +660,7 @@ assert(!is_whitespace_normalized("abc\t def", 1)); } -static void +static void XMLCALL check_attr_contains_normalized_whitespace(void *userData, const XML_Char *name, const XML_Char **atts) @@ -721,7 +721,7 @@ END_TEST /* Regression test for SF bug #584832. */ -static int +static int XMLCALL UnknownEncodingHandler(void *data,const XML_Char *encoding,XML_Encoding *info) { if (strcmp(encoding,"unsupported-encoding") == 0) { @@ -750,7 +750,7 @@ END_TEST /* Regression test for SF bug #620106. */ -static int +static int XMLCALL external_entity_loader_set_encoding(XML_Parser parser, const XML_Char *context, const XML_Char *base, @@ -830,7 +830,7 @@ } END_TEST -static int +static int XMLCALL external_entity_loader(XML_Parser parser, const XML_Char *context, const XML_Char *base, @@ -973,7 +973,7 @@ provided as the userData argument; the first is the expected element name, and the second is the expected attribute name. */ -static void +static void XMLCALL triplet_start_checker(void *userData, const XML_Char *name, const XML_Char **atts) { @@ -993,7 +993,7 @@ the expected value. The expected value is passed as the first element in an array of strings passed as the userData argument. */ -static void +static void XMLCALL triplet_end_checker(void *userData, const XML_Char *name) { char **elemstr = (char **)userData; @@ -1021,7 +1021,7 @@ } END_TEST -static void +static void XMLCALL overwrite_start_checker(void *userData, const XML_Char *name, const XML_Char **atts) { @@ -1036,7 +1036,7 @@ CharData_AppendString(storage, "\n"); } -static void +static void XMLCALL overwrite_end_checker(void *userData, const XML_Char *name) { CharData *storage = (CharData *) userData; @@ -1103,7 +1103,7 @@ /* Regression test for SF bug #620343. */ -static void +static void XMLCALL start_element_fail(void *userData, const XML_Char *name, const XML_Char **atts) { @@ -1111,7 +1111,7 @@ fail("should never reach start_element_fail()"); } -static void +static void XMLCALL start_ns_clearing_start_element(void *userData, const XML_Char *prefix, const XML_Char *uri) @@ -1136,7 +1136,7 @@ END_TEST /* Regression test for SF bug #616863. */ -static int +static int XMLCALL external_entity_handler(XML_Parser parser, const XML_Char *context, const XML_Char *base, From fdrake at users.sourceforge.net Wed Oct 15 12:25:46 2003 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Wed Oct 15 12:25:59 2003 Subject: [Expat-checkins] expat/xmlwf xmlwf.c,1.65,1.66 Message-ID: Update of /cvsroot/expat/expat/xmlwf In directory sc8-pr-cvs1:/tmp/cvs-serv25971/xmlwf Modified Files: xmlwf.c Log Message: Deal with issue discussed in SF patch #820946: Expat doesn't handle the use of modified default calling conventions in client code. To deal with this issue and generally clean up the mass of macros being used to support bits of the machinery, two new macros are being added: - XMLCALL, which expands to whatever is needed to nail down the calling convention for all calls across the library boundary. This must match the convention used for the system's malloc() implementation. - XMLIMPORT, defined to be whatever magic is needed to mark an entry point as imported from a dynamically loaded module (.dll, .so, .sl, whatever). These macros are used to define the XMLPARSEAPI macro already being used to define the API entry points. In addition, XMLCALL is used to define the types of callback functions, and all example code uses this explicitly in both the distributed applications and the documentation. Index: xmlwf.c =================================================================== RCS file: /cvsroot/expat/expat/xmlwf/xmlwf.c,v retrieving revision 1.65 retrieving revision 1.66 diff -u -d -r1.65 -r1.66 --- xmlwf.c 5 Sep 2002 01:48:26 -0000 1.65 +++ xmlwf.c 15 Oct 2003 16:25:44 -0000 1.66 @@ -20,7 +20,7 @@ #define NSSEP T('\001') -static void +static void XMLCALL characterData(void *userData, const XML_Char *s, int len) { FILE *fp = userData; @@ -113,7 +113,7 @@ return tcscmp(*(const XML_Char **)att1, *(const XML_Char **)att2); } -static void +static void XMLCALL startElement(void *userData, const XML_Char *name, const XML_Char **atts) { int nAtts; @@ -137,7 +137,7 @@ puttc(T('>'), fp); } -static void +static void XMLCALL endElement(void *userData, const XML_Char *name) { FILE *fp = userData; @@ -159,7 +159,7 @@ return tcscmp(att1, att2); } -static void +static void XMLCALL startElementNS(void *userData, const XML_Char *name, const XML_Char **atts) { int nAtts; @@ -208,7 +208,7 @@ puttc(T('>'), fp); } -static void +static void XMLCALL endElementNS(void *userData, const XML_Char *name) { FILE *fp = userData; @@ -227,7 +227,7 @@ #ifndef W3C14N -static void +static void XMLCALL processingInstruction(void *userData, const XML_Char *target, const XML_Char *data) { @@ -243,54 +243,54 @@ #endif /* not W3C14N */ -static void +static void XMLCALL defaultCharacterData(void *userData, const XML_Char *s, int len) { XML_DefaultCurrent((XML_Parser) userData); } -static void +static void XMLCALL defaultStartElement(void *userData, const XML_Char *name, const XML_Char **atts) { XML_DefaultCurrent((XML_Parser) userData); } -static void +static void XMLCALL defaultEndElement(void *userData, const XML_Char *name) { XML_DefaultCurrent((XML_Parser) userData); } -static void +static void XMLCALL defaultProcessingInstruction(void *userData, const XML_Char *target, const XML_Char *data) { XML_DefaultCurrent((XML_Parser) userData); } -static void +static void XMLCALL nopCharacterData(void *userData, const XML_Char *s, int len) { } -static void +static void XMLCALL nopStartElement(void *userData, const XML_Char *name, const XML_Char **atts) { } -static void +static void XMLCALL nopEndElement(void *userData, const XML_Char *name) { } -static void +static void XMLCALL nopProcessingInstruction(void *userData, const XML_Char *target, const XML_Char *data) { } -static void +static void XMLCALL markup(void *userData, const XML_Char *s, int len) { FILE *fp = XML_GetUserData((XML_Parser) userData); @@ -324,7 +324,7 @@ fputts(T("\n"), XML_GetUserData((XML_Parser) userData)); } -static void +static void XMLCALL metaStartElement(void *userData, const XML_Char *name, const XML_Char **atts) { @@ -359,7 +359,7 @@ fputts(T("/>\n"), fp); } -static void +static void XMLCALL metaEndElement(void *userData, const XML_Char *name) { XML_Parser parser = (XML_Parser) userData; @@ -369,7 +369,7 @@ fputts(T("/>\n"), fp); } -static void +static void XMLCALL metaProcessingInstruction(void *userData, const XML_Char *target, const XML_Char *data) { @@ -382,7 +382,7 @@ fputts(T("/>\n"), fp); } -static void +static void XMLCALL metaComment(void *userData, const XML_Char *data) { XML_Parser parser = (XML_Parser) userData; @@ -394,7 +394,7 @@ fputts(T("/>\n"), fp); } -static void +static void XMLCALL metaStartCdataSection(void *userData) { XML_Parser parser = (XML_Parser) userData; @@ -404,7 +404,7 @@ fputts(T("/>\n"), fp); } -static void +static void XMLCALL metaEndCdataSection(void *userData) { XML_Parser parser = (XML_Parser) userData; @@ -414,7 +414,7 @@ fputts(T("/>\n"), fp); } -static void +static void XMLCALL metaCharacterData(void *userData, const XML_Char *s, int len) { XML_Parser parser = (XML_Parser) userData; @@ -426,7 +426,7 @@ fputts(T("/>\n"), fp); } -static void +static void XMLCALL metaStartDoctypeDecl(void *userData, const XML_Char *doctypeName, const XML_Char *sysid, @@ -440,7 +440,7 @@ fputts(T("/>\n"), fp); } -static void +static void XMLCALL metaEndDoctypeDecl(void *userData) { XML_Parser parser = (XML_Parser) userData; @@ -450,7 +450,7 @@ fputts(T("/>\n"), fp); } -static void +static void XMLCALL metaNotationDecl(void *userData, const XML_Char *notationName, const XML_Char *base, @@ -472,7 +472,7 @@ } -static void +static void XMLCALL metaEntityDecl(void *userData, const XML_Char *entityName, int is_param, @@ -516,7 +516,7 @@ } } -static void +static void XMLCALL metaStartNamespaceDecl(void *userData, const XML_Char *prefix, const XML_Char *uri) @@ -535,7 +535,7 @@ fputts(T("/>\n"), fp); } -static void +static void XMLCALL metaEndNamespaceDecl(void *userData, const XML_Char *prefix) { XML_Parser parser = (XML_Parser) userData; @@ -546,13 +546,13 @@ ftprintf(fp, T("\n"), prefix); } -static int +static int XMLCALL unknownEncodingConvert(void *data, const char *p) { return codepageConvert(*(int *)data, p); } -static int +static int XMLCALL unknownEncoding(void *userData, const XML_Char *name, XML_Encoding *info) { int cp; @@ -588,7 +588,7 @@ return 1; } -static int +static int XMLCALL notStandalone(void *userData) { return 0; From fdrake at users.sourceforge.net Wed Oct 15 12:36:26 2003 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Wed Oct 15 12:36:28 2003 Subject: [Expat-checkins] expat/doc reference.html,1.49,1.50 Message-ID: Update of /cvsroot/expat/expat/doc In directory sc8-pr-cvs1:/tmp/cvs-serv28007 Modified Files: reference.html Log Message: Move "Configuring Expat Using the Pre-Processor" from the "Using" section to the "Building" section. Index: reference.html =================================================================== RCS file: /cvsroot/expat/expat/doc/reference.html,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- reference.html 15 Oct 2003 16:25:43 -0000 1.49 +++ reference.html 15 Oct 2003 16:36:23 -0000 1.50 @@ -276,6 +276,57 @@ /home/me/mystuff/lib and /home/me/mystuff/include respectively.

    +

    Configuring Expat Using the Pre-Processor

    + +

    Expat's feature set can be configured using a small number of +pre-processor definitions. The definition of this symbols does not +affect the set of entry points for Expat, only the behavior of the API +and the definition of character types in the case of +XML_UNICODE_WCHAR_T. The symbols are:

    + +
    +
    XML_DTD
    +
    Include support for using and reporting DTD-based content. If +this is defined, default attribute values from the DTD are reported +and attribute value normalization occurs based on the type of +attributes. Callbacks can be registered which report information from +the DTD (including content models and attribute definitions) only if +this is defined. Without this, Expat has a smaller memory footprint +and can be faster.
    + +
    XML_NS
    +
    When defined, support for the Namespaces in XML +specification is included.
    + +
    XML_UNICODE
    +
    When defined, character data reported to the application is +encoded in UTF-16 using wide characters of the type +XML_Char. This is implied if +XML_UNICODE_WCHAR_T is defined. + +
    XML_UNICODE_WCHAR_T
    +
    If defined, causes the XML_Char character type to be +defined using the wchar_t type; otherwise, unsigned +short is used. Defining this implies +XML_UNICODE.
    + +
    XML_CONTEXT_BYTES
    +
    The number of input bytes of markup context which the parser will +ensure are available for reporting via XML_GetInputContext. This is +normally set to 1024. If this is not defined, the input context will +not be available and XML_GetInputContext will always report NULL. Without +this, Expat has a smaller memory footprint and can be faster.
    + +
    XML_STATIC
    +
    On Windows, this should be set if Expat is going to be linked +statically with the code that calls it; this is required to get all +the right MSVC magic annotations correct. This is ignored on other +platforms.
    +
    +

    Using Expat

    @@ -622,57 +673,6 @@

    In order to read an external DTD, you also have to set an external entity reference handler as described above.

    - -

    Configuring Expat Using the Pre-Processor

    - -

    Expat's feature set can be configured using a small number of -pre-processor definitions. The definition of this symbols does not -affect the set of entry points for Expat, only the behavior of the API -and the definition of character types in the case of -XML_UNICODE_WCHAR_T. The symbols are:

    - -
    -
    XML_DTD
    -
    Include support for using and reporting DTD-based content. If -this is defined, default attribute values from the DTD are reported -and attribute value normalization occurs based on the type of -attributes. Callbacks can be registered which report information from -the DTD (including content models and attribute definitions) only if -this is defined. Without this, Expat has a smaller memory footprint -and can be faster.
    - -
    XML_NS
    -
    When defined, support for the Namespaces in XML -specification is included.
    - -
    XML_UNICODE
    -
    When defined, character data reported to the application is -encoded in UTF-16 using wide characters of the type -XML_Char. This is implied if -XML_UNICODE_WCHAR_T is defined. - -
    XML_UNICODE_WCHAR_T
    -
    If defined, causes the XML_Char character type to be -defined using the wchar_t type; otherwise, unsigned -short is used. Defining this implies -XML_UNICODE.
    - -
    XML_CONTEXT_BYTES
    -
    The number of input bytes of markup context which the parser will -ensure are available for reporting via XML_GetInputContext. This is -normally set to 1024. If this is not defined, the input context will -not be available and XML_GetInputContext will always report NULL. Without -this, Expat has a smaller memory footprint and can be faster.
    - -
    XML_STATIC
    -
    On Windows, this should be set if Expat is going to be linked -statically with the code that calls it; this is required to get all -the right MSVC magic annotations correct. This is ignored on other -platforms.
    -

    From fdrake at users.sourceforge.net Wed Oct 15 14:16:37 2003 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Wed Oct 15 14:16:40 2003 Subject: [Expat-checkins] htdocs index.html,1.42,1.43 style.css,1.6,1.7 Message-ID: Update of /cvsroot/expat/htdocs In directory sc8-pr-cvs1:/tmp/cvs-serv13381 Modified Files: index.html style.css Log Message: Add a news item about the upcoming release, and a pointer to the testing snapshot. Index: index.html =================================================================== RCS file: /cvsroot/expat/htdocs/index.html,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- index.html 4 Aug 2003 14:38:24 -0000 1.42 +++ index.html 15 Oct 2003 18:16:35 -0000 1.43 @@ -52,6 +52,21 @@

    News

    +
    15 October 2003, + Upcoming release. +
    +
    + We're working on getting the long-delayed Expat 1.95.7 out the + door. A snapshot of the current source code is available as expat-2003-10-15.tar.gz; + please give this a try on your platform and report how it works + for you to the expat-discuss mailing list. Our goals for this release are + portability and stability. + +
    +
    28 January 2003, Expat 1.95.6 released.
    Index: style.css =================================================================== RCS file: /cvsroot/expat/htdocs/style.css,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- style.css 5 Sep 2002 03:20:11 -0000 1.6 +++ style.css 15 Oct 2003 18:16:35 -0000 1.7 @@ -19,6 +19,7 @@ dl dt { font-weight: bold; } + .content thead { background-color: rgb(110,139,61); color: rgb(255,236,176); } @@ -34,3 +35,23 @@ .content li { margin: 0em; padding-bottom: 0.75em; } + +/* These margin and padding settings are tedious at best. The idea is + to make sure we can put news items on the site that aren't just a + ordered or unordered list, and have it not look too ugly. +*/ +dl dd ul, +dl dd ul li { padding-left: 0em; + margin-left: 0em; } + +dl dd { margin-left: 2em; } + +dl, ol, ul, +dl dt { margin-top: 0em; + margin-bottom: 0em; + padding-top: 0em; + padding-bottom: 0em; } + +li, +dl dd { margin-top: 0em; + margin-bottom: 0.5em; } From fdrake at users.sourceforge.net Wed Oct 15 14:33:29 2003 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Wed Oct 15 14:33:32 2003 Subject: [Expat-checkins] expat Changes,1.36,1.37 Message-ID: Update of /cvsroot/expat/expat In directory sc8-pr-cvs1:/tmp/cvs-serv16764 Modified Files: Changes Log Message: Update to reflect the addition of the XMLCALL macro. Index: Changes =================================================================== RCS file: /cvsroot/expat/expat/Changes,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- Changes 9 Oct 2003 12:18:08 -0000 1.36 +++ Changes 15 Oct 2003 18:33:27 -0000 1.37 @@ -1,8 +1,13 @@ Release 1.95.7 XXX date not determined - Fixed enum XML_Status issue (reported on SourceForge many times), so compilers that are properly picky will be happy. + - Introduced an XMLCALL macro to control the calling + convention used by the Expat API; this macro should be used + to annotate prototypes and definitions of callback + implementations in code compiled with a calling convention + other than the default convention for the host platform. - Fixed a variety of bugs: see SF issues 676844, 679754, - 692878, 692964, 695401, 699323. + 692878, 692964, 695401, 699323, 820946. - Improved hash table lookups. - Added more regression tests and improved documentation. From fdrake at users.sourceforge.net Wed Oct 15 14:49:56 2003 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Wed Oct 15 14:49:59 2003 Subject: [Expat-checkins] expat/doc reference.html,1.50,1.51 Message-ID: Update of /cvsroot/expat/expat/doc In directory sc8-pr-cvs1:/tmp/cvs-serv19568 Modified Files: reference.html Log Message: - add Expat version number - add notes about safely using XMLCALL with older Expat versions Index: reference.html =================================================================== RCS file: /cvsroot/expat/expat/doc/reference.html,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- reference.html 15 Oct 2003 16:36:23 -0000 1.50 +++ reference.html 15 Oct 2003 18:49:54 -0000 1.51 @@ -15,6 +15,8 @@

    Expat XML Parser

    +

    Release 1.95.7.

    +

    Expat is a library, written in C, for parsing XML documents. It's the underlying XML parser for the open source Mozilla project, Perl's XML::Parser, Python's xml.parsers.expat, and @@ -223,7 +225,23 @@ existing working Expat applications don't need to add it (since they are already using the "cdecl" calling convention, or they wouldn't be working). The annotation is only needed if the default calling -convention may be something other than "cdecl".

    +convention may be something other than "cdecl". To use the annotation +safely with older versions of Expat, you can conditionally define it +after including Expat's header file:

    + +
    +#include <expat.h>
    +
    +#ifndef XMLCALL
    +#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)
    +#define XMLCALL __cdecl
    +#elif defined(__GNUC__)
    +#define XMLCALL __attribute__((cdecl))
    +#else
    +#define XMLCALL
    +#endif
    +#endif
    +

    After creating the parser, the main program just has the job of shoveling the document to the parser so that it can do its work.

    From fdrake at users.sourceforge.net Wed Oct 15 16:02:15 2003 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Wed Oct 15 16:02:18 2003 Subject: [Expat-checkins] htdocs index.html,1.43,1.44 Message-ID: Update of /cvsroot/expat/htdocs In directory sc8-pr-cvs1:/tmp/cvs-serv32647 Modified Files: index.html Log Message: - the "alt" attribute is required on to be valid XHTML strict - minor cleanup Index: index.html =================================================================== RCS file: /cvsroot/expat/htdocs/index.html,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- index.html 15 Oct 2003 18:16:35 -0000 1.43 +++ index.html 15 Oct 2003 20:02:12 -0000 1.44 @@ -6,12 +6,11 @@ - + - +
    (Expat logo)

    Expat is an XML parser library written in C. It is a From fdrake at users.sourceforge.net Wed Oct 15 16:46:55 2003 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Wed Oct 15 16:47:00 2003 Subject: [Expat-checkins] expat/doc reference.html,1.51,1.52 Message-ID: Update of /cvsroot/expat/expat/doc In directory sc8-pr-cvs1:/tmp/cvs-serv9390 Modified Files: reference.html Log Message: - add the XMLCALL annotation consistently in the docs - don't drop the void return for handler setting functions Index: reference.html =================================================================== RCS file: /cvsroot/expat/expat/doc/reference.html,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- reference.html 15 Oct 2003 18:49:54 -0000 1.51 +++ reference.html 15 Oct 2003 20:46:53 -0000 1.52 @@ -33,9 +33,13 @@ from the Expat home page.

    -

    The bulk of this document was originally commissioned as an article by -XML.com. They graciously allowed -Clark Cooper to retain copyright and to distribute it with Expat.

    +

    The bulk of this document was originally commissioned as an article +by XML.com. They graciously allowed +Clark Cooper to retain copyright and to distribute it with Expat. +This version has been substantially extended to include documentation +on features which have been added since the original article was +published, and additional information on using the original +interface.


    Table of Contents

    @@ -233,7 +237,7 @@ #include <expat.h> #ifndef XMLCALL -#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__) +#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__) #define XMLCALL __cdecl #elif defined(__GNUC__) #define XMLCALL __attribute__((cdecl)) @@ -321,7 +325,7 @@
    When defined, character data reported to the application is encoded in UTF-16 using wide characters of the type XML_Char. This is implied if -XML_UNICODE_WCHAR_T is defined. +XML_UNICODE_WCHAR_T is defined.
    XML_UNICODE_WCHAR_T
    If defined, causes the XML_Char character type to be @@ -700,7 +704,7 @@

    Parser Creation

    -XML_Parser
    +XML_Parser XMLCALL
     XML_ParserCreate(const XML_Char *encoding);
     
    @@ -717,7 +721,7 @@
    -XML_Parser
    +XML_Parser XMLCALL
     XML_ParserCreateNS(const XML_Char *encoding,
                        XML_Char sep);
     
    @@ -729,7 +733,7 @@ part of a legal URI.
    -XML_Parser
    +XML_Parser XMLCALL
     XML_ParserCreate_MM(const XML_Char *encoding,
                         const XML_Memory_Handling_Suite *ms,
     		    const XML_Char *sep);
    @@ -751,7 +755,7 @@
     
     
     
    -XML_Parser
    +XML_Parser XMLCALL
     XML_ExternalEntityParserCreate(XML_Parser p,
                                    const XML_Char *context,
                                    const XML_Char *encoding);
    @@ -767,7 +771,7 @@
     
     
     
    -void
    +void XMLCALL
     XML_ParserFree(XML_Parser p);
     
    @@ -776,7 +780,7 @@
    -XML_Bool
    +XML_Bool XMLCALL
     XML_ParserReset(XML_Parser p,
                     const XML_Char *encoding);
     
    @@ -805,7 +809,7 @@ >XML_ExternalEntityParserCreate.

    -enum XML_Status
    +enum XML_Status XMLCALL
     XML_Parse(XML_Parser p,
               const char *s,
               int len,
    @@ -832,7 +836,7 @@
     
     
     
    -enum XML_Status
    +enum XML_Status XMLCALL
     XML_ParseBuffer(XML_Parser p,
                     int len,
                     int isFinal);
    @@ -846,7 +850,7 @@
     
     
     
    -void *
    +void * XMLCALL
     XML_GetBuffer(XML_Parser p,
                   int len);
     
    @@ -901,6 +905,7 @@
    +void XMLCALL
     XML_SetStartElementHandler(XML_Parser p,
                                XML_StartElementHandler start);
     
    @@ -921,6 +926,7 @@
    +void XMLCALL
     XML_SetEndElementHandler(XML_Parser p,
                              XML_EndElementHandler);
     
    @@ -935,6 +941,7 @@
    +void XMLCALL
     XML_SetElementHandler(XML_Parser p,
                           XML_StartElementHandler start,
                           XML_EndElementHandler end);
    @@ -944,6 +951,7 @@
     
     
    +void XMLCALL
     XML_SetCharacterDataHandler(XML_Parser p,
                                 XML_CharacterDataHandler charhndl)
     
    @@ -963,6 +971,7 @@
    +void XMLCALL
     XML_SetProcessingInstructionHandler(XML_Parser p,
                                         XML_ProcessingInstructionHandler proc)
     
    @@ -980,6 +989,7 @@
    +void XMLCALL
     XML_SetCommentHandler(XML_Parser p,
                           XML_CommentHandler cmnt)
     
    @@ -994,6 +1004,7 @@
    +void XMLCALL
     XML_SetStartCdataSectionHandler(XML_Parser p,
                                     XML_StartCdataSectionHandler start);
     
    @@ -1006,6 +1017,7 @@
    +void XMLCALL
     XML_SetEndCdataSectionHandler(XML_Parser p,
                                   XML_EndCdataSectionHandler end);
     
    @@ -1018,6 +1030,7 @@
    +void XMLCALL
     XML_SetCdataSectionHandler(XML_Parser p,
                                XML_StartCdataSectionHandler start,
                                XML_EndCdataSectionHandler end)
    @@ -1027,6 +1040,7 @@
     
     
    +void XMLCALL
     XML_SetDefaultHandler(XML_Parser p,
                           XML_DefaultHandler hndl)
     
    @@ -1057,6 +1071,7 @@
    +void XMLCALL
     XML_SetDefaultHandlerExpand(XML_Parser p,
                                 XML_DefaultHandler hndl)
     
    @@ -1076,6 +1091,7 @@
    +void XMLCALL
     XML_SetExternalEntityRefHandler(XML_Parser p,
                                     XML_ExternalEntityRefHandler hndl)
     
    @@ -1128,6 +1144,7 @@
    +void XMLCALL
     XML_SetExternalEntityRefHandlerArg(XML_Parser p,
                                        void *arg)
     
    @@ -1153,6 +1170,7 @@
    +void XMLCALL
     XML_SetSkippedEntityHandler(XML_Parser p,
                                 XML_SkippedEntityHandler handler)
     
    @@ -1179,6 +1197,7 @@
    +void XMLCALL
     XML_SetUnknownEncodingHandler(XML_Parser p,
                                   XML_UnknownEncodingHandler enchandler,
     			      void *encodingHandlerData)
    @@ -1227,6 +1246,7 @@
     
     
    +void XMLCALL
     XML_SetStartNamespaceDeclHandler(XML_Parser p,
     			         XML_StartNamespaceDeclHandler start);
     
    @@ -1244,6 +1264,7 @@
    +void XMLCALL
     XML_SetEndNamespaceDeclHandler(XML_Parser p,
     			       XML_EndNamespaceDeclHandler end);
     
    @@ -1260,6 +1281,7 @@
    +void XMLCALL
     XML_SetNamespaceDeclHandler(XML_Parser p,
                                 XML_StartNamespaceDeclHandler start,
                                 XML_EndNamespaceDeclHandler end)
    @@ -1269,6 +1291,7 @@
     
     
    +void XMLCALL
     XML_SetXmlDeclHandler(XML_Parser p,
     		      XML_XmlDeclHandler xmldecl);
     
    @@ -1291,6 +1314,7 @@
    +void XMLCALL
     XML_SetStartDoctypeDeclHandler(XML_Parser p,
     			       XML_StartDoctypeDeclHandler start);
     
    @@ -1310,6 +1334,7 @@
    +void XMLCALL
     XML_SetEndDoctypeDeclHandler(XML_Parser p,
     			     XML_EndDoctypeDeclHandler end);
     
    @@ -1323,6 +1348,7 @@
    +void XMLCALL
     XML_SetDoctypeDeclHandler(XML_Parser p,
     			  XML_StartDoctypeDeclHandler start,
     			  XML_EndDoctypeDeclHandler end);
    @@ -1332,6 +1358,7 @@
     
     
    +void XMLCALL
     XML_SetElementDeclHandler(XML_Parser p,
     			  XML_ElementDeclHandler eldecl);
     
    @@ -1403,6 +1430,7 @@
    +void XMLCALL
     XML_SetAttlistDeclHandler(XML_Parser p,
                               XML_AttlistDeclHandler attdecl);
     
    @@ -1435,6 +1463,7 @@
    +void XMLCALL
     XML_SetEntityDeclHandler(XML_Parser p,
     			 XML_EntityDeclHandler handler);
     
    @@ -1468,6 +1497,7 @@
    +void XMLCALL
     XML_SetUnparsedEntityDeclHandler(XML_Parser p,
                                      XML_UnparsedEntityDeclHandler h)
     
    @@ -1493,6 +1523,7 @@
    +void XMLCALL
     XML_SetNotationDeclHandler(XML_Parser p,
                                XML_NotationDeclHandler h)
     
    @@ -1509,6 +1540,7 @@
    +void XMLCALL
     XML_SetNotStandaloneHandler(XML_Parser p,
                                 XML_NotStandaloneHandler h)
     
    @@ -1543,7 +1575,7 @@ called from within a DTD declaration handler.

    -enum XML_Error
    +enum XML_Error XMLCALL
     XML_GetErrorCode(XML_Parser p);
     
    @@ -1551,7 +1583,7 @@
    -const XML_LChar *
    +const XML_LChar * XMLCALL
     XML_ErrorString(enum XML_Error code);
     
    @@ -1561,7 +1593,7 @@
    -long
    +long XMLCALL
     XML_GetCurrentByteIndex(XML_Parser p);
     
    @@ -1572,7 +1604,7 @@
    -int
    +int XMLCALL
     XML_GetCurrentLineNumber(XML_Parser p);
     
    @@ -1581,7 +1613,7 @@
    -int
    +int XMLCALL
     XML_GetCurrentColumnNumber(XML_Parser p);
     
    @@ -1590,7 +1622,7 @@
    -int
    +int XMLCALL
     XML_GetCurrentByteCount(XML_Parser p);
     
    @@ -1602,7 +1634,7 @@
    -const char *
    +const char * XMLCALL
     XML_GetInputContext(XML_Parser p,
                         int *offset,
                         int *size);
    @@ -1630,7 +1662,7 @@
     the parser or can be used to dynamicly set parser options.

    -void
    +void XMLCALL
     XML_SetUserData(XML_Parser p,
                     void *userData);
     
    @@ -1645,7 +1677,7 @@
    -void *
    +void * XMLCALL
     XML_GetUserData(XML_Parser p);
     
    @@ -1654,7 +1686,7 @@
    -void
    +void XMLCALL
     XML_UseParserAsHandlerArg(XML_Parser p);
     
    @@ -1665,7 +1697,7 @@
    -enum XML_Status
    +enum XML_Status XMLCALL
     XML_SetBase(XML_Parser p,
                 const XML_Char *base);
     
    @@ -1677,7 +1709,7 @@
    -const XML_Char *
    +const XML_Char * XMLCALL
     XML_GetBase(XML_Parser p);
     
    @@ -1685,7 +1717,7 @@
    -int
    +int XMLCALL
     XML_GetSpecifiedAttributeCount(XML_Parser p);
     
    @@ -1701,7 +1733,7 @@
    -int
    +int XMLCALL
     XML_GetIdAttributeIndex(XML_Parser p);
     
    @@ -1713,7 +1745,7 @@
    -enum XML_Status
    +enum XML_Status XMLCALL
     XML_SetEncoding(XML_Parser p,
                     const XML_Char *encoding);
     
    @@ -1728,7 +1760,7 @@
    -int
    +int XMLCALL
     XML_SetParamEntityParsing(XML_Parser p,
                               enum XML_ParamEntityParsing code);
     
    @@ -1745,7 +1777,7 @@
    -enum XML_Error
    +enum XML_Error XMLCALL
     XML_UseForeignDTD(XML_Parser parser, XML_Bool useDTD);
     
    @@ -1777,7 +1809,7 @@
    -void
    +void XMLCALL
     XML_SetReturnNSTriplet(XML_Parser parser,
                            int        do_nst);
     
    @@ -1799,7 +1831,7 @@
    -void
    +void XMLCALL
     XML_DefaultCurrent(XML_Parser parser);
     
    @@ -1813,7 +1845,7 @@
    -XML_LChar *
    +XML_LChar * XMLCALL
     XML_ExpatVersion();
     
    @@ -1821,7 +1853,7 @@
    -struct XML_Expat_Version
    +struct XML_Expat_Version XMLCALL
     XML_ExpatVersionInfo();
     
    @@ -1845,7 +1877,7 @@
     
    -const XML_Feature *
    +const XML_Feature * XMLCALL
     XML_GetFeatureList();
     
    @@ -1904,7 +1936,7 @@
     
    -void
    +void XMLCALL
     XML_FreeContentModel(XML_Parser parser, XML_Content *model);
     
    @@ -1923,7 +1955,7 @@ Windows, at least).

    -void *
    +void * XMLCALL
     XML_MemMalloc(XML_Parser parser, size_t size);
     
    @@ -1935,7 +1967,7 @@
    -void *
    +void * XMLCALL
     XML_MemRealloc(XML_Parser parser, void *ptr, size_t size);
     
    @@ -1954,7 +1986,7 @@
    -void
    +void XMLCALL
     XML_MemFree(XML_Parser parser, void *ptr);
     
    From fdrake at users.sourceforge.net Wed Oct 15 16:51:31 2003 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Wed Oct 15 16:51:33 2003 Subject: [Expat-checkins] expat/lib expat.h, 1.55, 1.56 xmlparse.c, 1.112, 1.113 Message-ID: Update of /cvsroot/expat/expat/lib In directory sc8-pr-cvs1:/tmp/cvs-serv10514 Modified Files: expat.h xmlparse.c Log Message: clean up the macro restructuring, and make it play nice on Windows Index: expat.h =================================================================== RCS file: /cvsroot/expat/expat/lib/expat.h,v retrieving revision 1.55 retrieving revision 1.56 diff -u -d -r1.55 -r1.56 --- expat.h 15 Oct 2003 16:25:43 -0000 1.55 +++ expat.h 15 Oct 2003 20:51:28 -0000 1.56 @@ -20,7 +20,7 @@ #define XML_USE_MSC_EXTENSIONS 1 #endif -/* Expat tries very hard to make the API buondary very specifically +/* Expat tries very hard to make the API boundary very specifically defined. There are two macros defined to control this boundary; each of these can be defined before including this header to achieve some different behavior, but doing so it not recommended or @@ -63,15 +63,35 @@ #endif /* not defined XMLCALL */ -#if !defined(XMLIMPORT) && !defined(XML_STATIC) +#if !defined(XML_STATIC) && !defined(XMLIMPORT) +#ifdef XML_BUILDING_EXPAT +/* we're actually building Expat itself */ + +#if defined(__GNUC__) +/* needed in a very obscure case according the the GCC documentation + (Windows NT on PowerPC) */ +#define XMLIMPORT __attribute__((dllexport)) +#endif + +#else +/* using Expat from an application */ + #ifdef XML_USE_MSC_EXTENSIONS #define XMLIMPORT __declspec(dllimport) +#elif defined(__GNUC__) +/* needed in a very obscure case according the the GCC documentation + (Windows NT on PowerPC) */ +#define XMLIMPORT __attribute__((dllimport)) #endif + #endif +#endif /* not defined XML_STATIC */ +/* If we didn't define it above, define it away: */ #ifndef XMLIMPORT #define XMLIMPORT #endif + #define XMLPARSEAPI(type) XMLIMPORT type XMLCALL Index: xmlparse.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmlparse.c,v retrieving revision 1.112 retrieving revision 1.113 diff -u -d -r1.112 -r1.113 --- xmlparse.c 15 Oct 2003 16:25:43 -0000 1.112 +++ xmlparse.c 15 Oct 2003 20:51:28 -0000 1.113 @@ -5,26 +5,17 @@ #include #include /* memset(), memcpy() */ -#ifdef COMPILED_FROM_DSP +#define XML_BUILDING_EXPAT 1 +#ifdef COMPILED_FROM_DSP #include "winconfig.h" -#define XMLPARSEAPI(type) type __cdecl -#include "expat.h" - #elif defined(MACOS_CLASSIC) - #include "macconfig.h" -#include "expat.h" - #else - #include - -#define XMLIMPORT +#endif /* ndef COMPILED_FROM_DSP */ #include "expat.h" - -#endif /* ndef COMPILED_FROM_DSP */ #ifdef XML_UNICODE #define XML_ENCODE_MAX XML_UTF16_ENCODE_MAX From kwaclaw at users.sourceforge.net Wed Oct 15 17:38:18 2003 From: kwaclaw at users.sourceforge.net (Karl Waclawek) Date: Wed Oct 15 17:38:21 2003 Subject: [Expat-checkins] expat/lib expat.dsp,1.9,1.10 expatw.dsp,1.2,1.3 Message-ID: Update of /cvsroot/expat/expat/lib In directory sc8-pr-cvs1:/tmp/cvs-serv21374 Modified Files: expat.dsp expatw.dsp Log Message: Removed unused EXPAT_EXPORTS definition. Index: expat.dsp =================================================================== RCS file: /cvsroot/expat/expat/lib/expat.dsp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- expat.dsp 21 Oct 2002 21:19:41 -0000 1.9 +++ expat.dsp 15 Oct 2003 21:38:15 -0000 1.10 @@ -43,7 +43,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPAT_EXPORTS" /Yu"stdafx.h" /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPAT_EXPORTS" /D "COMPILED_FROM_DSP" /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILED_FROM_DSP" /FD /c # SUBTRACT CPP /YX /Yc /Yu # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 @@ -69,7 +69,7 @@ # PROP Intermediate_Dir "Debug" # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPAT_EXPORTS" /Yu"stdafx.h" /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /D "_DEBUG" /D "COMPILED_FROM_DSP" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPAT_EXPORTS" /FR /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /D "_DEBUG" /D "COMPILED_FROM_DSP" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /FR /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x409 /d "_DEBUG" Index: expatw.dsp =================================================================== RCS file: /cvsroot/expat/expat/lib/expatw.dsp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- expatw.dsp 21 Oct 2002 21:19:41 -0000 1.2 +++ expatw.dsp 15 Oct 2003 21:38:15 -0000 1.3 @@ -43,7 +43,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPAT_EXPORTS" /Yu"stdafx.h" /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /D "NDEBUG" /D "COMPILED_FROM_DSP" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPAT_EXPORTS" /D "XML_UNICODE_WCHAR_T" /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /D "NDEBUG" /D "COMPILED_FROM_DSP" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XML_UNICODE_WCHAR_T" /FD /c # SUBTRACT CPP /YX /Yc /Yu # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 @@ -70,7 +70,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPAT_EXPORTS" /Yu"stdafx.h" /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /D "_DEBUG" /D "COMPILED_FROM_DSP" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPAT_EXPORTS" /D "XML_UNICODE_WCHAR_T" /FR /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /D "_DEBUG" /D "COMPILED_FROM_DSP" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XML_UNICODE_WCHAR_T" /FR /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x409 /d "_DEBUG" From fdrake at users.sourceforge.net Thu Oct 16 00:20:57 2003 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Thu Oct 16 00:21:01 2003 Subject: [Expat-checkins] expat/lib expat.h,1.56,1.57 Message-ID: Update of /cvsroot/expat/expat/lib In directory sc8-pr-cvs1:/tmp/cvs-serv29869 Modified Files: expat.h Log Message: Remove the __attribute__((dllimport)) and __attribute__((dllexport)) declarations; these are needed only on an obscure platform (Windows NT on PowerPC using GCC), and were never in previous releases of Expat. They caused way too many spurious warnings on several platforms where they aren't actually needed but should be ignored silently. Removing these cannot break working code. Index: expat.h =================================================================== RCS file: /cvsroot/expat/expat/lib/expat.h,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- expat.h 15 Oct 2003 20:51:28 -0000 1.56 +++ expat.h 16 Oct 2003 04:20:54 -0000 1.57 @@ -64,24 +64,11 @@ #if !defined(XML_STATIC) && !defined(XMLIMPORT) -#ifdef XML_BUILDING_EXPAT -/* we're actually building Expat itself */ - -#if defined(__GNUC__) -/* needed in a very obscure case according the the GCC documentation - (Windows NT on PowerPC) */ -#define XMLIMPORT __attribute__((dllexport)) -#endif - -#else +#ifndef XML_BUILDING_EXPAT /* using Expat from an application */ #ifdef XML_USE_MSC_EXTENSIONS #define XMLIMPORT __declspec(dllimport) -#elif defined(__GNUC__) -/* needed in a very obscure case according the the GCC documentation - (Windows NT on PowerPC) */ -#define XMLIMPORT __attribute__((dllimport)) #endif #endif From fdrake at users.sourceforge.net Thu Oct 16 00:23:46 2003 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Thu Oct 16 00:23:49 2003 Subject: [Expat-checkins] expat/lib xmlparse.c,1.113,1.114 Message-ID: Update of /cvsroot/expat/expat/lib In directory sc8-pr-cvs1:/tmp/cvs-serv30245 Modified Files: xmlparse.c Log Message: - use spaces instead of tabs consistently - don't allow trailing whitespace at the end of lines - remove blank lines at the end of the file Index: xmlparse.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmlparse.c,v retrieving revision 1.113 retrieving revision 1.114 diff -u -d -r1.113 -r1.114 --- xmlparse.c 15 Oct 2003 20:51:28 -0000 1.113 +++ xmlparse.c 16 Oct 2003 04:23:44 -0000 1.114 @@ -105,7 +105,7 @@ (((h) * 0xF4243) ^ (unsigned char)(c)) #endif -/* For probing (after a collision) we need a step size relative prime +/* For probing (after a collision) we need a step size relative prime to the hash table size, which is a power of 2. We use double-hashing, since we can calculate a second hash value cheaply by taking those bits of the first hash value that were discarded (masked out) when the table @@ -2576,7 +2576,7 @@ ((XML_Char *)s)[-1] = 0; /* clear flag */ id = (ATTRIBUTE_ID *)lookup(&dtd->attributeIds, s, 0); b = id->prefix->binding; - if (!b) + if (!b) return XML_ERROR_UNBOUND_PREFIX; /* as we expand the name we also calculate its hash value */ @@ -2601,9 +2601,9 @@ unsigned char step = 0; unsigned long mask = nsAttsSize - 1; j = uriHash & mask; /* index into hash table */ - while (nsAtts[j].version == version) { + while (nsAtts[j].version == version) { /* for speed we compare stored hash values first */ - if (uriHash == nsAtts[j].hash) { + if (uriHash == nsAtts[j].hash) { const XML_Char *s1 = poolStart(&tempPool); const XML_Char *s2 = nsAtts[j].uriName; /* s1 is null terminated, but not s2 */ @@ -2635,7 +2635,7 @@ nsAtts[j].version = version; nsAtts[j].hash = uriHash; nsAtts[j].uriName = s; - + if (!--nPrefixes) break; } @@ -4776,7 +4776,7 @@ if (type->nDefaultAtts == type->allocDefaultAtts) { if (type->allocDefaultAtts == 0) { type->allocDefaultAtts = 8; - type->defaultAtts = (DEFAULT_ATTRIBUTE *)MALLOC(type->allocDefaultAtts + type->defaultAtts = (DEFAULT_ATTRIBUTE *)MALLOC(type->allocDefaultAtts * sizeof(DEFAULT_ATTRIBUTE)); if (!type->defaultAtts) return 0; @@ -5410,7 +5410,7 @@ /* check for overflow (table is half full) */ if (table->used >> (table->power - 1)) { - unsigned char newPower = table->power + 1; + unsigned char newPower = table->power + 1; size_t newSize = (size_t)1 << newPower; unsigned long newMask = (unsigned long)newSize - 1; size_t tsize = newSize * sizeof(NAMED *); @@ -5643,8 +5643,8 @@ int blockSize = (pool->end - pool->start)*2; pool->blocks = (BLOCK *) pool->mem->realloc_fcn(pool->blocks, - (offsetof(BLOCK, s) - + blockSize * sizeof(XML_Char))); + (offsetof(BLOCK, s) + + blockSize * sizeof(XML_Char))); if (pool->blocks == NULL) return XML_FALSE; pool->blocks->size = blockSize; @@ -5660,7 +5660,7 @@ else blockSize *= 2; tem = (BLOCK *)pool->mem->malloc_fcn(offsetof(BLOCK, s) - + blockSize * sizeof(XML_Char)); + + blockSize * sizeof(XML_Char)); if (!tem) return XML_FALSE; tem->size = blockSize; @@ -5807,5 +5807,3 @@ } return ret; } - - From fdrake at users.sourceforge.net Thu Oct 16 00:32:41 2003 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Thu Oct 16 00:32:44 2003 Subject: [Expat-checkins] expat configure.in,1.36,1.37 Message-ID: Update of /cvsroot/expat/expat In directory sc8-pr-cvs1:/tmp/cvs-serv31658 Modified Files: configure.in Log Message: - reorganize by the components that need what we're checking for - remove the check for memcmp(); we didn't use the result of the check (though we do use memcmp()) Index: configure.in =================================================================== RCS file: /cvsroot/expat/expat/configure.in,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- configure.in 9 Oct 2003 21:32:28 -0000 1.36 +++ configure.in 16 Oct 2003 04:32:39 -0000 1.37 @@ -80,7 +80,6 @@ dnl Checks for header files. AC_HEADER_STDC -AC_CHECK_HEADERS(fcntl.h unistd.h) dnl Checks for typedefs, structures, and compiler characteristics. @@ -89,12 +88,12 @@ AC_C_BIGENDIAN_CROSS AC_C_CONST -AC_TYPE_OFF_T AC_TYPE_SIZE_T +AC_CHECK_FUNCS(memmove bcopy) -dnl Checks for library functions. - -AC_FUNC_MEMCMP +dnl Only needed for xmlwf: +AC_CHECK_HEADERS(fcntl.h unistd.h) +AC_TYPE_OFF_T AC_FUNC_MMAP if test "$ac_cv_func_mmap_fixed_mapped" = "yes"; then @@ -104,10 +103,10 @@ fi AC_SUBST(FILEMAP) -AC_CHECK_FUNCS(memmove bcopy) +dnl Only needed for regression tests: AC_CHECK_HEADERS(check.h) -dnl some basic configuration +dnl Some basic configuration: AC_DEFINE([XML_NS], 1, [Define to make XML Namespaces functionality available.]) AC_DEFINE([XML_DTD], 1, From fdrake at users.sourceforge.net Thu Oct 16 00:51:13 2003 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Thu Oct 16 00:51:17 2003 Subject: [Expat-checkins] expat/lib xmlparse.c, 1.114, 1.115 xmlrole.c, 1.14, 1.15 xmltok.c, 1.28, 1.29 Message-ID: Update of /cvsroot/expat/expat/lib In directory sc8-pr-cvs1:/tmp/cvs-serv1498/lib Modified Files: xmlparse.c xmlrole.c xmltok.c Log Message: Make it possible to avoid the import of expat_config.h. This makes it easier to compile Expat without the autoconf support. This closes SF patch #458907. Index: xmlparse.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmlparse.c,v retrieving revision 1.114 retrieving revision 1.115 diff -u -d -r1.114 -r1.115 --- xmlparse.c 16 Oct 2003 04:23:44 -0000 1.114 +++ xmlparse.c 16 Oct 2003 04:51:11 -0000 1.115 @@ -12,7 +12,9 @@ #elif defined(MACOS_CLASSIC) #include "macconfig.h" #else +#ifdef HAVE_EXPAT_CONFIG_H #include +#endif #endif /* ndef COMPILED_FROM_DSP */ #include "expat.h" Index: xmlrole.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmlrole.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- xmlrole.c 20 Sep 2002 03:42:43 -0000 1.14 +++ xmlrole.c 16 Oct 2003 04:51:11 -0000 1.15 @@ -7,7 +7,9 @@ #elif defined(MACOS_CLASSIC) #include "macconfig.h" #else +#ifdef HAVE_EXPAT_CONFIG_H #include +#endif #endif /* ndef COMPILED_FROM_DSP */ #include "internal.h" Index: xmltok.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmltok.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- xmltok.c 14 Dec 2002 03:12:18 -0000 1.28 +++ xmltok.c 16 Oct 2003 04:51:11 -0000 1.29 @@ -7,7 +7,9 @@ #elif defined(MACOS_CLASSIC) #include "macconfig.h" #else +#ifdef HAVE_EXPAT_CONFIG_H #include +#endif #endif /* ndef COMPILED_FROM_DSP */ #include "internal.h" From fdrake at users.sourceforge.net Thu Oct 16 00:51:13 2003 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Thu Oct 16 00:51:18 2003 Subject: [Expat-checkins] expat Makefile.in,1.42,1.43 Message-ID: Update of /cvsroot/expat/expat In directory sc8-pr-cvs1:/tmp/cvs-serv1498 Modified Files: Makefile.in Log Message: Make it possible to avoid the import of expat_config.h. This makes it easier to compile Expat without the autoconf support. This closes SF patch #458907. Index: Makefile.in =================================================================== RCS file: /cvsroot/expat/expat/Makefile.in,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- Makefile.in 24 Jan 2003 16:21:46 -0000 1.42 +++ Makefile.in 16 Oct 2003 04:51:11 -0000 1.43 @@ -102,7 +102,7 @@ INCLUDES = -I$(srcdir)/lib -I. LDFLAGS = @LDFLAGS@ CPPFLAGS = @CPPFLAGS@ -CFLAGS = @CFLAGS@ +CFLAGS = @CFLAGS@ -DHAVE_EXPAT_CONFIG_H VSNFLAG = -version-info @LIBCURRENT@:@LIBREVISION@:@LIBAGE@ ### autoconf this? From fdrake at users.sourceforge.net Thu Oct 16 00:51:13 2003 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Thu Oct 16 00:51:19 2003 Subject: [Expat-checkins] expat/tests chardata.c, 1.5, 1.6 runtests.c, 1.53, 1.54 Message-ID: Update of /cvsroot/expat/expat/tests In directory sc8-pr-cvs1:/tmp/cvs-serv1498/tests Modified Files: chardata.c runtests.c Log Message: Make it possible to avoid the import of expat_config.h. This makes it easier to compile Expat without the autoconf support. This closes SF patch #458907. Index: chardata.c =================================================================== RCS file: /cvsroot/expat/expat/tests/chardata.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- chardata.c 9 Oct 2003 21:32:28 -0000 1.5 +++ chardata.c 16 Oct 2003 04:51:11 -0000 1.6 @@ -4,7 +4,9 @@ chardata.c */ +#ifdef HAVE_EXPAT_CONFIG_H #include +#endif #ifdef HAVE_CHECK_H #include #else Index: runtests.c =================================================================== RCS file: /cvsroot/expat/expat/tests/runtests.c,v retrieving revision 1.53 retrieving revision 1.54 diff -u -d -r1.53 -r1.54 --- runtests.c 15 Oct 2003 16:25:43 -0000 1.53 +++ runtests.c 16 Oct 2003 04:51:11 -0000 1.54 @@ -4,7 +4,10 @@ runtest.c : run the Expat test suite */ +#ifdef HAVE_EXPAT_CONFIG_H #include +#endif + #ifdef HAVE_CHECK_H #include #else From fdrake at users.sourceforge.net Thu Oct 16 00:51:13 2003 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Thu Oct 16 00:51:20 2003 Subject: [Expat-checkins] expat/xmlwf xmlfile.c,1.12,1.13 Message-ID: Update of /cvsroot/expat/expat/xmlwf In directory sc8-pr-cvs1:/tmp/cvs-serv1498/xmlwf Modified Files: xmlfile.c Log Message: Make it possible to avoid the import of expat_config.h. This makes it easier to compile Expat without the autoconf support. This closes SF patch #458907. Index: xmlfile.c =================================================================== RCS file: /cvsroot/expat/expat/xmlwf/xmlfile.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- xmlfile.c 2 Aug 2002 19:40:09 -0000 1.12 +++ xmlfile.c 16 Oct 2003 04:51:11 -0000 1.13 @@ -10,7 +10,9 @@ #ifdef COMPILED_FROM_DSP #include "winconfig.h" #else +#ifdef HAVE_EXPAT_CONFIG_H #include "expat_config.h" +#endif #endif #include "expat.h" #include "xmlfile.h" From fdrake at users.sourceforge.net Thu Oct 16 01:05:18 2003 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Thu Oct 16 01:05:21 2003 Subject: [Expat-checkins] expat Changes,1.37,1.38 Message-ID: Update of /cvsroot/expat/expat In directory sc8-pr-cvs1:/tmp/cvs-serv3407 Modified Files: Changes Log Message: update to reflect further improvements Index: Changes =================================================================== RCS file: /cvsroot/expat/expat/Changes,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- Changes 15 Oct 2003 18:33:27 -0000 1.37 +++ Changes 16 Oct 2003 05:05:16 -0000 1.38 @@ -6,8 +6,11 @@ to annotate prototypes and definitions of callback implementations in code compiled with a calling convention other than the default convention for the host platform. - - Fixed a variety of bugs: see SF issues 676844, 679754, - 692878, 692964, 695401, 699323, 820946. + - Improved ability to build without the configure-generated + expat_config.h header. This is useful for applications + which embed Expat rather than linking in the library. + - Fixed a variety of bugs: see SF issues 458907, 676844, + 679754, 692878, 692964, 695401, 699323, 699487, 820946. - Improved hash table lookups. - Added more regression tests and improved documentation. From kwaclaw at users.sourceforge.net Thu Oct 16 10:26:48 2003 From: kwaclaw at users.sourceforge.net (Karl Waclawek) Date: Thu Oct 16 10:26:52 2003 Subject: [Expat-checkins] expat/lib xmlparse.c,1.115,1.116 Message-ID: Update of /cvsroot/expat/expat/lib In directory sc8-pr-cvs1:/tmp/cvs-serv23111 Modified Files: xmlparse.c Log Message: Fix for bug #824420. Index: xmlparse.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmlparse.c,v retrieving revision 1.115 retrieving revision 1.116 diff -u -d -r1.115 -r1.116 --- xmlparse.c 16 Oct 2003 04:51:11 -0000 1.115 +++ xmlparse.c 16 Oct 2003 14:26:46 -0000 1.116 @@ -2651,6 +2651,9 @@ for (binding = *bindingsPtr; binding; binding = binding->nextTagBinding) binding->attId->name[-1] = 0; + if (!ns) + return XML_ERROR_NONE; + /* expand the element type name */ if (elementType->prefix) { binding = elementType->prefix->binding; @@ -2667,7 +2670,7 @@ else return XML_ERROR_NONE; prefixLen = 0; - if (ns && ns_triplets && binding->prefix->name) { + if (ns_triplets && binding->prefix->name) { for (; binding->prefix->name[prefixLen++];) ; } From fdrake at users.sourceforge.net Fri Oct 17 17:08:32 2003 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Fri Oct 17 17:08:37 2003 Subject: [Expat-checkins] expat Changes,1.38,1.39 Message-ID: Update of /cvsroot/expat/expat In directory sc8-pr-cvs1:/tmp/cvs-serv3397 Modified Files: Changes Log Message: Updates from last night. Index: Changes =================================================================== RCS file: /cvsroot/expat/expat/Changes,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- Changes 16 Oct 2003 05:05:16 -0000 1.38 +++ Changes 17 Oct 2003 21:08:30 -0000 1.39 @@ -9,8 +9,9 @@ - Improved ability to build without the configure-generated expat_config.h header. This is useful for applications which embed Expat rather than linking in the library. - - Fixed a variety of bugs: see SF issues 458907, 676844, - 679754, 692878, 692964, 695401, 699323, 699487, 820946. + - Fixed a variety of bugs: see SF issues 458907, 609603, + 676844, 679754, 692878, 692964, 695401, 699323, 699487, + 820946. - Improved hash table lookups. - Added more regression tests and improved documentation. From fdrake at users.sourceforge.net Sat Oct 18 00:46:04 2003 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Sat Oct 18 00:46:09 2003 Subject: [Expat-checkins] expat/lib xmlparse.c,1.116,1.117 Message-ID: Update of /cvsroot/expat/expat/lib In directory sc8-pr-cvs1:/tmp/cvs-serv10049 Modified Files: xmlparse.c Log Message: avoid a few additional warnings for some compilers, and others with warnings turned way up high Index: xmlparse.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmlparse.c,v retrieving revision 1.116 retrieving revision 1.117 diff -u -d -r1.116 -r1.117 --- xmlparse.c 16 Oct 2003 14:26:46 -0000 1.116 +++ xmlparse.c 18 Oct 2003 04:46:02 -0000 1.117 @@ -1730,25 +1730,25 @@ XML_GetFeatureList(void) { static XML_Feature features[] = { - {XML_FEATURE_SIZEOF_XML_CHAR, XML_L("sizeof(XML_Char)")}, - {XML_FEATURE_SIZEOF_XML_LCHAR, XML_L("sizeof(XML_LChar)")}, + {XML_FEATURE_SIZEOF_XML_CHAR, XML_L("sizeof(XML_Char)"), 0}, + {XML_FEATURE_SIZEOF_XML_LCHAR, XML_L("sizeof(XML_LChar)"), 0}, #ifdef XML_UNICODE - {XML_FEATURE_UNICODE, XML_L("XML_UNICODE")}, + {XML_FEATURE_UNICODE, XML_L("XML_UNICODE"), 0}, #endif #ifdef XML_UNICODE_WCHAR_T - {XML_FEATURE_UNICODE_WCHAR_T, XML_L("XML_UNICODE_WCHAR_T")}, + {XML_FEATURE_UNICODE_WCHAR_T, XML_L("XML_UNICODE_WCHAR_T"), 0}, #endif #ifdef XML_DTD - {XML_FEATURE_DTD, XML_L("XML_DTD")}, + {XML_FEATURE_DTD, XML_L("XML_DTD"), 0}, #endif #ifdef XML_CONTEXT_BYTES {XML_FEATURE_CONTEXT_BYTES, XML_L("XML_CONTEXT_BYTES"), XML_CONTEXT_BYTES}, #endif #ifdef XML_MIN_SIZE - {XML_FEATURE_MIN_SIZE, XML_L("XML_MIN_SIZE")}, + {XML_FEATURE_MIN_SIZE, XML_L("XML_MIN_SIZE"), 0}, #endif - {XML_FEATURE_END, NULL} + {XML_FEATURE_END, NULL, 0} }; features[0].value = sizeof(XML_Char); @@ -2387,8 +2387,8 @@ BINDING **bindingsPtr) { DTD * const dtd = _dtd; /* save one level of indirection */ - ELEMENT_TYPE *elementType = NULL; - int nDefaultAtts = 0; + ELEMENT_TYPE *elementType; + int nDefaultAtts; const XML_Char **appAtts; /* the attribute list for the application */ int attIndex = 0; int prefixLen; From fdrake at users.sourceforge.net Mon Oct 20 10:40:46 2003 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Mon Oct 20 10:40:53 2003 Subject: [Expat-checkins] expat/doc expat.png, NONE, 1.1 reference.html, 1.52, 1.53 style.css, 1.5, 1.6 Message-ID: Update of /cvsroot/expat/expat/doc In directory sc8-pr-cvs1:/tmp/cvs-serv12393 Modified Files: reference.html style.css Added Files: expat.png Log Message: Steal a bit of look-n-feel from the website; this document was just looking incredibly bland. --- NEW FILE: expat.png --- (This appears to be a binary file; contents omitted.) Index: reference.html =================================================================== RCS file: /cvsroot/expat/expat/doc/reference.html,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- reference.html 15 Oct 2003 20:46:53 -0000 1.52 +++ reference.html 20 Oct 2003 14:40:44 -0000 1.53 @@ -13,9 +13,17 @@ -

    Expat XML Parser

    - -

    Release 1.95.7.

    + + + + + + + + + +
    (Expat logo)
    Release 1.95.7
    +

    Expat is a library, written in C, for parsing XML documents. It's the underlying XML parser for the open source Mozilla project, Perl's @@ -1999,5 +2007,6 @@

    Valid XHTML 1.0!

    +
    Index: style.css =================================================================== RCS file: /cvsroot/expat/expat/doc/style.css,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- style.css 8 Oct 2003 03:32:25 -0000 1.5 +++ style.css 20 Oct 2003 14:40:44 -0000 1.6 @@ -1,5 +1,37 @@ body { - background-color: white + background-color: white; + border: 0px; + margin: 0px; + padding: 0px; +} + +.corner { + width: 200px; + height: 80px; + text-align: center; +} + +.banner { + background-color: rgb(110,139,61); + color: rgb(255,236,176); + padding-left: 2em; +} + +.banner h1 { + font-size: 200%; +} + +.content { + padding: 0em 2em 1em 2em; +} + +.releaseno { + background-color: rgb(110,139,61); + color: rgb(255,236,176); + padding-bottom: 0.3em; + padding-top: 0.5em; + text-align: center; + font-weight: bold; } .noborder { From fdrake at users.sourceforge.net Mon Oct 20 10:50:39 2003 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Mon Oct 20 10:51:01 2003 Subject: [Expat-checkins] expat/doc reference.html,1.53,1.54 Message-ID: Update of /cvsroot/expat/expat/doc In directory sc8-pr-cvs1:/tmp/cvs-serv15738 Modified Files: reference.html Log Message: use indentation consistently Index: reference.html =================================================================== RCS file: /cvsroot/expat/expat/doc/reference.html,v retrieving revision 1.53 retrieving revision 1.54 diff -u -d -r1.53 -r1.54 --- reference.html 20 Oct 2003 14:40:44 -0000 1.53 +++ reference.html 20 Oct 2003 14:50:37 -0000 1.54 @@ -288,9 +288,9 @@ can install Expat with this sequence of commands:

    -   ./configure
    -   make
    -   make install
    +./configure
    +make
    +make install
     

    There are some options that you can provide to this script, but the From fdrake at users.sourceforge.net Mon Oct 20 17:11:29 2003 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Mon Oct 20 17:11:31 2003 Subject: [Expat-checkins] expat Changes,1.39,1.40 expat.spec,1.11,1.12 Message-ID: Update of /cvsroot/expat/expat In directory sc8-pr-cvs1:/tmp/cvs-serv31081 Modified Files: Changes expat.spec Log Message: Set the release date. Index: Changes =================================================================== RCS file: /cvsroot/expat/expat/Changes,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- Changes 17 Oct 2003 21:08:30 -0000 1.39 +++ Changes 20 Oct 2003 21:11:27 -0000 1.40 @@ -1,4 +1,4 @@ -Release 1.95.7 XXX date not determined +Release 1.95.7 Mon Oct 20 2003 - Fixed enum XML_Status issue (reported on SourceForge many times), so compilers that are properly picky will be happy. - Introduced an XMLCALL macro to control the calling Index: expat.spec =================================================================== RCS file: /cvsroot/expat/expat/expat.spec,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- expat.spec 9 Oct 2003 12:18:41 -0000 1.11 +++ expat.spec 20 Oct 2003 21:11:27 -0000 1.12 @@ -38,7 +38,7 @@ /usr/man/man1/xmlwf.1.gz %changelog -* Fri Oct 10 2003 Fred L. Drake, Jr. +* Mon Oct 20 2003 Fred L. Drake, Jr. [Release 1.95.7-1] - Updated for the 1.95.7 release. From fdrake at users.sourceforge.net Mon Oct 20 23:52:13 2003 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Mon Oct 20 23:52:19 2003 Subject: [Expat-checkins] htdocs index.html,1.44,1.45 style.css,1.7,1.8 Message-ID: Update of /cvsroot/expat/htdocs In directory sc8-pr-cvs1:/tmp/cvs-serv1763 Modified Files: index.html style.css Log Message: Add a news item for the Expat 1.95.7 release; not quite ready, but almost. Index: index.html =================================================================== RCS file: /cvsroot/expat/htdocs/index.html,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- index.html 15 Oct 2003 20:02:12 -0000 1.44 +++ index.html 21 Oct 2003 03:52:10 -0000 1.45 @@ -51,11 +51,41 @@

    News

    +
    20 October 2003, + Expat 1.95.7 released. +
    +
    +
      +
    • Fixed enum XML_Status issue (reported on + SourceForge many times), so compilers that are properly + picky will be happy.
    • +
    • Introduced an XMLCALL macro to control the + calling convention used by the Expat API; this macro should + be used to annotate prototypes and definitions of callback + implementations in code compiled with a calling convention + other than the default convention for the host + platform.
    • +
    • Improved ability to build without the + configure-generated expat_config.h header. This is + useful for applications which embed Expat rather than + linking in the library.
    • +
    • Fixed a variety of bugs: see SF issues 458907, 609603, + 676844, 679754, 692878, 692964, 695401, 699323, 699487, + 820946.
    • +
    • Improved hash table lookups.
    • +
    • Added more regression tests and improved documentation.
    • +
    +

    Our plan is to wait for a short while and re-release this + version as the long-awaited Expat 2.0 if no major problems are + identified. If significant problems are found, additional + iterative releases will be made as fixes are made.

    +
    15 October 2003, Upcoming release.
    - We're working on getting the long-delayed Expat 1.95.7 out the +

    We're working on getting the long-delayed Expat 1.95.7 out the door. A snapshot of the current source code is available as expat-2003-10-15.tar.gz; please give this a try on your platform and report how it works @@ -63,8 +93,7 @@ "http://mail.libexpat.org/mailman/listinfo/expat-discuss" >expat-discuss mailing list. Our goals for this release are portability and stability. - -

    +

    28 January 2003, Expat 1.95.6 released. Index: style.css =================================================================== RCS file: /cvsroot/expat/htdocs/style.css,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- style.css 15 Oct 2003 18:16:35 -0000 1.7 +++ style.css 21 Oct 2003 03:52:10 -0000 1.8 @@ -36,6 +36,8 @@ padding-bottom: 0.75em; } +.filename { font-family: sans-serif; } + /* These margin and padding settings are tedious at best. The idea is to make sure we can put news items on the site that aren't just a ordered or unordered list, and have it not look too ugly. @@ -49,6 +51,11 @@ dl, ol, ul, dl dt { margin-top: 0em; margin-bottom: 0em; + padding-top: 0em; + padding-bottom: 0em; } + +p { margin-top: 0em; + margin-bottom: 1em; padding-top: 0em; padding-bottom: 0em; } From fdrake at users.sourceforge.net Tue Oct 21 13:05:46 2003 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Tue Oct 21 13:05:52 2003 Subject: [Expat-checkins] expat expat.spec,1.12,1.13 Message-ID: Update of /cvsroot/expat/expat In directory sc8-pr-cvs1:/tmp/cvs-serv4352 Modified Files: expat.spec Log Message: make sure we pick up the Expat logo in the doc directory Index: expat.spec =================================================================== RCS file: /cvsroot/expat/expat/expat.spec,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- expat.spec 20 Oct 2003 21:11:27 -0000 1.12 +++ expat.spec 21 Oct 2003 17:05:43 -0000 1.13 @@ -31,13 +31,17 @@ install -D xmlwf/xmlwf $RPM_BUILD_ROOT/usr/bin/xmlwf %files -%doc COPYING Changes MANIFEST README doc/reference.html doc/style.css doc/valid-xhtml10.png +%doc COPYING Changes MANIFEST README doc/reference.html doc/style.css doc/*.png /usr/bin/xmlwf /usr/lib /usr/include/expat.h /usr/man/man1/xmlwf.1.gz %changelog +* Tue Oct 21 2003 Fred L. Drake, Jr. +- Update list of documentation files; we missed a .png file in the + previous release. + * Mon Oct 20 2003 Fred L. Drake, Jr. [Release 1.95.7-1] - Updated for the 1.95.7 release. @@ -46,7 +50,7 @@ [Release 1.95.6-1] - Updated for the 1.95.6 release. -* Wed Sep 4 2002 Fred L. Drake, Jr. +* Wed Sep 4 2002 Fred L. Drake, Jr. [Release 1.95.5-1] - Updated for the 1.95.5 release. - Updated URL for Expat home page to point to www.libexpat.org. @@ -76,7 +80,7 @@ - Moved xmlparse.h into "/usr/include/expat" directory to prevent conflict with w3c-libwww-devel package. -* Wed Sep 6 2000 Sean Reifschneider +* Wed Sep 6 2000 Sean Reifschneider - Modified to install into /usr. - Modified to use RPM_BUILD_ROOT instead of writing directly to install location. From fdrake at users.sourceforge.net Thu Oct 23 01:24:13 2003 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Thu Oct 23 01:24:16 2003 Subject: [Expat-checkins] htdocs/dev expat3.html, NONE, 1.1 index.html, 1.9, 1.10 Message-ID: Update of /cvsroot/expat/htdocs/dev In directory sc8-pr-cvs1:/tmp/cvs-serv14188 Modified Files: index.html Added Files: expat3.html Log Message: Started a new page with some notes about what's changing in Expat 3. Largely a placeholder at this point, but this can be used to tell the community about what Expat 3 will "look like." --- NEW FILE: expat3.html --- Changes in Expat 3

    This page describes some of the changes which should be expected in Expat 3. These are intended as notes made by the developers as things get thought through; these can change at any time. This is not a projected feature list for Expat 3; to learn about the target features, please read the Expat Development Roadmap. The changes described here are much more focused on the details of Expat 3, and no attempt has been made to balance the description of small changes with major new feature development.

    This list is not complete; we'll add to this as we think of things and have time to write about them.

    • All structural event callback functions will return an XML_Status value that the parser will check. This will allow an application to stop or suspend processing without having to use setjmp()/longjmp() hackery.
    • The parser will support suspension of parsing to allow an application to pause parsing temporarily. A new XML_Status value, XML_STATUS_SUSPEND, can be returned by the event callbacks to indicate that Expat should suspend parsing; the parser will then return from XML_Parse(), returning XML_STATUS_SUSPEND. Applications can resume parsing by calling XML_ParseResume().
    SourceForge
                 Logo
    Index: index.html =================================================================== RCS file: /cvsroot/expat/htdocs/dev/index.html,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- index.html 5 Sep 2002 03:06:48 -0000 1.9 +++ index.html 23 Oct 2003 05:24:11 -0000 1.10 @@ -19,15 +19,20 @@ of Expat.

      +
    • Development roadmap sketching the directions for future development.
    • + +
    • Changes in Expat 3, some notes about + what's likely to change in Expat 3.
    • CVS instructions for developers and occasional contributors.
    • From kwaclaw at users.sourceforge.net Thu Oct 23 20:39:44 2003 From: kwaclaw at users.sourceforge.net (Karl Waclawek) Date: Thu Oct 23 20:39:48 2003 Subject: [Expat-checkins] expat/bcb5 README.txt, 1.3, 1.4 expatw.mak, 1.7, 1.8 expat.mak, 1.6, 1.7 Message-ID: Update of /cvsroot/expat/expat/bcb5 In directory sc8-pr-cvs1:/tmp/cvs-serv19542 Modified Files: README.txt expatw.mak expat.mak Log Message: Cleaned up make files and improved docs. Index: README.txt =================================================================== RCS file: /cvsroot/expat/expat/bcb5/README.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- README.txt 8 Dec 2002 03:37:41 -0000 1.3 +++ README.txt 24 Oct 2003 00:39:42 -0000 1.4 @@ -63,7 +63,8 @@ Threading -The libexpat libraries are all built with the multi-threaded dynamic RTL's. +The libexpat libraries are all built to link with the multi-threaded dynamic RTL's. +That means they require CC32xxMT.DLL present on the installation target. To create single-threaded libs, do the following: 1. The compiler option for multi-threading must be turned off. Following the Index: expatw.mak =================================================================== RCS file: /cvsroot/expat/expat/bcb5/expatw.mak,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- expatw.mak 9 Dec 2002 17:23:23 -0000 1.7 +++ expatw.mak 24 Oct 2003 00:39:42 -0000 1.8 @@ -36,7 +36,7 @@ PATHRC = .; DEBUGLIBPATH = $(BCB)\lib\debug RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = _WINDOWS;WIN32;NDEBUG;_USRDLL;COMPILED_FROM_DSP;EXPAT_EXPORTS;XML_UNICODE_WCHAR_T +USERDEFINES = _WINDOWS;WIN32;NDEBUG;_USRDLL;COMPILED_FROM_DSP;XML_UNICODE_WCHAR_T SYSDEFINES = _NO_VCL;_ASSERTE;NO_STRICT;_RTLDLL INCLUDEPATH = ..\lib;$(BCB)\include LIBPATH = ..\lib;$(BCB)\lib;$(RELEASELIBPATH) Index: expat.mak =================================================================== RCS file: /cvsroot/expat/expat/bcb5/expat.mak,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- expat.mak 8 Dec 2002 03:37:41 -0000 1.6 +++ expat.mak 24 Oct 2003 00:39:42 -0000 1.7 @@ -36,7 +36,7 @@ PATHRC = .; DEBUGLIBPATH = $(BCB)\lib\debug RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = _WINDOWS;WIN32;NDEBUG;_USRDLL;COMPILED_FROM_DSP;EXPAT_EXPORTS +USERDEFINES = _WINDOWS;WIN32;NDEBUG;_USRDLL;COMPILED_FROM_DSP SYSDEFINES = _NO_VCL;_ASSERTE;NO_STRICT;_RTLDLL INCLUDEPATH = ..\lib;$(BCB)\include LIBPATH = ..\lib;$(BCB)\lib;$(RELEASELIBPATH) From kwaclaw at users.sourceforge.net Thu Oct 23 20:40:56 2003 From: kwaclaw at users.sourceforge.net (Karl Waclawek) Date: Thu Oct 23 20:40:59 2003 Subject: [Expat-checkins] expat/win32 README.txt,1.2,1.3 Message-ID: Update of /cvsroot/expat/expat/win32 In directory sc8-pr-cvs1:/tmp/cvs-serv19723 Modified Files: README.txt Log Message: Corrected docs regarding Win32 builds with MS VC++. Index: README.txt =================================================================== RCS file: /cvsroot/expat/expat/win32/README.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- README.txt 7 Dec 2002 14:18:50 -0000 1.2 +++ README.txt 24 Oct 2003 00:40:54 -0000 1.3 @@ -23,8 +23,9 @@ Dynamic Linking: - By default the Expat Dlls are built to link with the - multi-threaded run-time Dll. The libraries are named + By default the Expat Dlls are built to link statically + with the multi-threaded run-time library. + The libraries are named - libexpat(w).dll - libexpat(w).lib (import library) The "w" indicates the UTF-16 version of the library. @@ -43,7 +44,7 @@ /ML, /MT and /MD for MS VC++. By default, the expat-static and expatw-static projects are set up - to link dynamically against the multithreaded run-time library, + to link statically against the multithreaded run-time library, so they will build libexpatMT.lib or libexpatwMT.lib files. To build the other versions of the static library, From kwaclaw at users.sourceforge.net Sun Oct 26 03:13:57 2003 From: kwaclaw at users.sourceforge.net (Karl Waclawek) Date: Sun Oct 26 03:14:00 2003 Subject: [Expat-checkins] expat/lib xmlparse.c,1.117,1.118 Message-ID: Update of /cvsroot/expat/expat/lib In directory sc8-pr-cvs1:/tmp/cvs-serv13440 Modified Files: xmlparse.c Log Message: Make XML_ParserFree() null-safe, so that it behaves like the standard free() memory deallocation function. Index: xmlparse.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmlparse.c,v retrieving revision 1.117 retrieving revision 1.118 diff -u -d -r1.117 -r1.118 --- xmlparse.c 18 Oct 2003 04:46:02 -0000 1.117 +++ xmlparse.c 26 Oct 2003 08:13:54 -0000 1.118 @@ -1072,6 +1072,8 @@ void XMLCALL XML_ParserFree(XML_Parser parser) { + if (parser == NULL) + return; for (;;) { TAG *p; if (tagStack == NULL) { From fdrake at users.sourceforge.net Tue Oct 28 12:13:13 2003 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Tue Oct 28 12:14:24 2003 Subject: [Expat-checkins] htdocs index.html,1.45,1.46 Message-ID: Update of /cvsroot/expat/htdocs In directory sc8-pr-cvs1:/tmp/cvs-serv21495 Modified Files: index.html Log Message: update the link for tDOM Index: index.html =================================================================== RCS file: /cvsroot/expat/htdocs/index.html,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- index.html 21 Oct 2003 03:52:10 -0000 1.45 +++ index.html 28 Oct 2003 17:13:10 -0000 1.46 @@ -222,7 +222,7 @@ >TclXML project includes a Tcl binding for Expat
    • - tDOM is an alternate package providing XML support for Tcl, based in part on Expat.
    • From fdrake at users.sourceforge.net Tue Oct 28 16:25:45 2003 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Tue Oct 28 16:26:48 2003 Subject: [Expat-checkins] expat/doc reference.html,1.54,1.55 Message-ID: Update of /cvsroot/expat/expat/doc In directory sc8-pr-cvs1:/tmp/cvs-serv14058 Modified Files: reference.html Log Message: extend the "Communicating between handlers" section a bit; needed to mention the need to accumulate data between calls to the character data handler Index: reference.html =================================================================== RCS file: /cvsroot/expat/expat/doc/reference.html,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- reference.html 20 Oct 2003 14:50:37 -0000 1.54 +++ reference.html 28 Oct 2003 21:25:43 -0000 1.55 @@ -502,8 +502,31 @@ without using globals, you'll need to define a data structure to hold the shared variables. You can then tell Expat (with the XML_SetUserData function) to pass a -pointer to this structure to the handlers. This is typically the first -argument received by most handlers.

      +pointer to this structure to the handlers. This is the first +argument received by most handlers. In the reference section, an argument to a callback function is named +userData and have type void * if the user +data is passed; it will have the type XML_Parser if the +parser itself is passed. When the parser is passed, the user data may +be retrieved using XML_GetUserData.

      + +

      One common case where multiple calls to a single handler may need +to communicate using an application data structure is the case when +content passed to the character data handler (set by XML_SetCharacterDataHandler) needs to be accumulated. A +common first-time mistake with any of the event-oriented interfaces to +an XML parser is to expect all the text contained in an element to be +reported by a single call to the character data handler. Expat, like +many other XML parsers, reports such data as a sequence of calls; +there's no way to know when the end of the sequence is reached until a +different callback is made. A buffer referenced by the user data +structure proves both an effective and convenient place to accumulate +character data.

      + + +

      XML Version

      From fdrake at users.sourceforge.net Thu Oct 30 09:58:41 2003 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Thu Oct 30 09:58:47 2003 Subject: [Expat-checkins] expat/lib xmlparse.c,1.118,1.119 Message-ID: Update of /cvsroot/expat/expat/lib In directory sc8-pr-cvs1:/tmp/cvs-serv4344 Modified Files: xmlparse.c Log Message: remove unnecessary typecast Index: xmlparse.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmlparse.c,v retrieving revision 1.118 retrieving revision 1.119 diff -u -d -r1.118 -r1.119 --- xmlparse.c 26 Oct 2003 08:13:54 -0000 1.118 +++ xmlparse.c 30 Oct 2003 14:58:39 -0000 1.119 @@ -2072,7 +2072,7 @@ entity->open = XML_FALSE; if (!context) return XML_ERROR_NO_MEMORY; - if (!externalEntityRefHandler((XML_Parser)externalEntityRefHandlerArg, + if (!externalEntityRefHandler(externalEntityRefHandlerArg, context, entity->base, entity->systemId, From fdrake at users.sourceforge.net Thu Oct 30 14:59:52 2003 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Thu Oct 30 14:59:57 2003 Subject: [Expat-checkins] expat COPYING,1.2,1.3 Message-ID: Update of /cvsroot/expat/expat In directory sc8-pr-cvs1:/tmp/cvs-serv5585 Modified Files: COPYING Log Message: update the dates Index: COPYING =================================================================== RCS file: /cvsroot/expat/expat/COPYING,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- COPYING 20 Apr 2002 21:32:22 -0000 1.2 +++ COPYING 30 Oct 2003 19:59:50 -0000 1.3 @@ -1,6 +1,6 @@ Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd and Clark Cooper -Copyright (c) 2001, 2002 Expat maintainers. +Copyright (c) 2001, 2002, 2003 Expat maintainers. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the