[Expat-checkins] CVS: expat/lib expat.h,1.4,1.5 xmlparse.c,1.4,1.5 xmlrole.c,1.2,1.3 xmlrole.h,1.2,1.3 xmltok.c,1.2,1.3 xmltok.h,1.2,1.3 xmldef.h,1.2,NONE

Clark Cooper coopercc@users.sourceforge.net
Thu, 28 Sep 2000 10:53:04 -0700


Update of /cvsroot/expat/expat/lib
In directory slayer.i.sourceforge.net:/tmp/cvs-serv2284/lib

Modified Files:
	expat.h xmlparse.c xmlrole.c xmlrole.h xmltok.c xmltok.h 
Removed Files:
	xmldef.h 
Log Message:
Fixes to allow DLLs to built under Windows.


Index: expat.h
===================================================================
RCS file: /cvsroot/expat/expat/lib/expat.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** expat.h	2000/09/25 00:58:49	1.4
--- expat.h	2000/09/28 17:53:00	1.5
***************
*** 9,12 ****
--- 9,20 ----
  #include <stdlib.h>
  
+ #ifndef XMLPARSEAPI
+ #  ifdef __declspec
+ #    define XMLPARSEAPI __declspec(dllimport)
+ #  else
+ #    define XMLPARSEAPI /* nothing */
+ #  endif
+ #endif  /* not defined XMLPARSEAPI */
+ 
  #ifdef __cplusplus
  extern "C" {
***************
*** 73,77 ****
  					XML_Content *model);
  
! void 
  XML_SetElementDeclHandler(XML_Parser parser,
  			  XML_ElementDeclHandler eldecl);
--- 81,85 ----
  					XML_Content *model);
  
! void XMLPARSEAPI
  XML_SetElementDeclHandler(XML_Parser parser,
  			  XML_ElementDeclHandler eldecl);
***************
*** 94,98 ****
  					int		isrequired);
  
! void 
  XML_SetAttlistDeclHandler(XML_Parser parser,
  			  XML_AttlistDeclHandler attdecl);
--- 102,106 ----
  					int		isrequired);
  
! void XMLPARSEAPI
  XML_SetAttlistDeclHandler(XML_Parser parser,
  			  XML_AttlistDeclHandler attdecl);
***************
*** 112,116 ****
  				    int			standalone);
  
! void 
  XML_SetXmlDeclHandler(XML_Parser parser,
  		      XML_XmlDeclHandler xmldecl);
--- 120,124 ----
  				    int			standalone);
  
! void XMLPARSEAPI
  XML_SetXmlDeclHandler(XML_Parser parser,
  		      XML_XmlDeclHandler xmldecl);
***************
*** 126,130 ****
  protocol or null if there is none specified. */
  
! XML_Parser 
  XML_ParserCreate(const XML_Char *encoding);
  
--- 134,138 ----
  protocol or null if there is none specified. */
  
! XML_Parser XMLPARSEAPI
  XML_ParserCreate(const XML_Char *encoding);
  
***************
*** 139,143 ****
  passed through without expansion. */
  
! XML_Parser 
  XML_ParserCreateNS(const XML_Char *encoding, XML_Char namespaceSeparator);
  
--- 147,151 ----
  passed through without expansion. */
  
! XML_Parser XMLPARSEAPI
  XML_ParserCreateNS(const XML_Char *encoding, XML_Char namespaceSeparator);
  
***************
*** 153,157 ****
  */
  
! XML_Parser
  XML_ParserCreate_MM(const XML_Char *encoding,
  		    const XML_Memory_Handling_Suite *memsuite,
--- 161,165 ----
  */
  
! XML_Parser XMLPARSEAPI
  XML_ParserCreate_MM(const XML_Char *encoding,
  		    const XML_Memory_Handling_Suite *memsuite,
***************
*** 242,246 ****
  				       const XML_Char *notationName);
  				       
! void 
  XML_SetEntityDeclHandler(XML_Parser parser,
  			 XML_EntityDeclHandler handler);
--- 250,254 ----
  				       const XML_Char *notationName);
  				       
! void XMLPARSEAPI
  XML_SetEntityDeclHandler(XML_Parser parser,
  			 XML_EntityDeclHandler handler);
***************
*** 385,420 ****
  					  XML_Encoding *info);
  
! void 
  XML_SetElementHandler(XML_Parser parser,
  		      XML_StartElementHandler start,
  		      XML_EndElementHandler end);
  
! void 
  XML_SetStartElementHandler(XML_Parser, XML_StartElementHandler);
  
! void 
  XML_SetEndElementHandler(XML_Parser, XML_EndElementHandler);
  
! void 
  XML_SetCharacterDataHandler(XML_Parser parser,
  			    XML_CharacterDataHandler handler);
  
! void 
  XML_SetProcessingInstructionHandler(XML_Parser parser,
  				    XML_ProcessingInstructionHandler handler);
! void 
  XML_SetCommentHandler(XML_Parser parser,
                        XML_CommentHandler handler);
  
! void 
  XML_SetCdataSectionHandler(XML_Parser parser,
  			   XML_StartCdataSectionHandler start,
  			   XML_EndCdataSectionHandler end);
  
! void 
  XML_SetStartCdataSectionHandler(XML_Parser parser,
                                  XML_StartCdataSectionHandler start);
  
! void 
  XML_SetEndCdataSectionHandler(XML_Parser parser,
                                XML_EndCdataSectionHandler end);
--- 393,428 ----
  					  XML_Encoding *info);
  
! void XMLPARSEAPI
  XML_SetElementHandler(XML_Parser parser,
  		      XML_StartElementHandler start,
  		      XML_EndElementHandler end);
  
! void XMLPARSEAPI
  XML_SetStartElementHandler(XML_Parser, XML_StartElementHandler);
  
! void XMLPARSEAPI
  XML_SetEndElementHandler(XML_Parser, XML_EndElementHandler);
  
! void XMLPARSEAPI
  XML_SetCharacterDataHandler(XML_Parser parser,
  			    XML_CharacterDataHandler handler);
  
! void XMLPARSEAPI
  XML_SetProcessingInstructionHandler(XML_Parser parser,
  				    XML_ProcessingInstructionHandler handler);
! void XMLPARSEAPI
  XML_SetCommentHandler(XML_Parser parser,
                        XML_CommentHandler handler);
  
! void XMLPARSEAPI
  XML_SetCdataSectionHandler(XML_Parser parser,
  			   XML_StartCdataSectionHandler start,
  			   XML_EndCdataSectionHandler end);
  
! void XMLPARSEAPI
  XML_SetStartCdataSectionHandler(XML_Parser parser,
                                  XML_StartCdataSectionHandler start);
  
! void XMLPARSEAPI
  XML_SetEndCdataSectionHandler(XML_Parser parser,
                                XML_EndCdataSectionHandler end);
***************
*** 423,427 ****
  The entity reference will be passed to the default handler. */
  
! void 
  XML_SetDefaultHandler(XML_Parser parser,
  		      XML_DefaultHandler handler);
--- 431,435 ----
  The entity reference will be passed to the default handler. */
  
! void XMLPARSEAPI
  XML_SetDefaultHandler(XML_Parser parser,
  		      XML_DefaultHandler handler);
***************
*** 430,476 ****
  The entity reference will not be passed to the default handler. */
  
! void 
  XML_SetDefaultHandlerExpand(XML_Parser parser,
  		            XML_DefaultHandler handler);
  
! void 
  XML_SetDoctypeDeclHandler(XML_Parser parser,
  			  XML_StartDoctypeDeclHandler start,
  			  XML_EndDoctypeDeclHandler end);
  
! void 
  XML_SetStartDoctypeDeclHandler(XML_Parser parser,
  			       XML_StartDoctypeDeclHandler start);
  
! void 
  XML_SetEndDoctypeDeclHandler(XML_Parser parser,
  			     XML_EndDoctypeDeclHandler end);
  
! void 
  XML_SetUnparsedEntityDeclHandler(XML_Parser parser,
  				 XML_UnparsedEntityDeclHandler handler);
  
! void 
  XML_SetNotationDeclHandler(XML_Parser parser,
  			   XML_NotationDeclHandler handler);
  
! void 
  XML_SetNamespaceDeclHandler(XML_Parser parser,
  			    XML_StartNamespaceDeclHandler start,
  			    XML_EndNamespaceDeclHandler end);
  
! void 
  XML_SetStartNamespaceDeclHandler(XML_Parser parser,
  				 XML_StartNamespaceDeclHandler start);
  
! void 
  XML_SetEndNamespaceDeclHandler(XML_Parser parser,
  			       XML_EndNamespaceDeclHandler end);
  
! void 
  XML_SetNotStandaloneHandler(XML_Parser parser,
  			    XML_NotStandaloneHandler handler);
  
! void 
  XML_SetExternalEntityRefHandler(XML_Parser parser,
  				XML_ExternalEntityRefHandler handler);
--- 438,484 ----
  The entity reference will not be passed to the default handler. */
  
! void XMLPARSEAPI
  XML_SetDefaultHandlerExpand(XML_Parser parser,
  		            XML_DefaultHandler handler);
  
! void XMLPARSEAPI
  XML_SetDoctypeDeclHandler(XML_Parser parser,
  			  XML_StartDoctypeDeclHandler start,
  			  XML_EndDoctypeDeclHandler end);
  
! void XMLPARSEAPI
  XML_SetStartDoctypeDeclHandler(XML_Parser parser,
  			       XML_StartDoctypeDeclHandler start);
  
! void XMLPARSEAPI
  XML_SetEndDoctypeDeclHandler(XML_Parser parser,
  			     XML_EndDoctypeDeclHandler end);
  
! void XMLPARSEAPI
  XML_SetUnparsedEntityDeclHandler(XML_Parser parser,
  				 XML_UnparsedEntityDeclHandler handler);
  
! void XMLPARSEAPI
  XML_SetNotationDeclHandler(XML_Parser parser,
  			   XML_NotationDeclHandler handler);
  
! void XMLPARSEAPI
  XML_SetNamespaceDeclHandler(XML_Parser parser,
  			    XML_StartNamespaceDeclHandler start,
  			    XML_EndNamespaceDeclHandler end);
  
! void XMLPARSEAPI
  XML_SetStartNamespaceDeclHandler(XML_Parser parser,
  				 XML_StartNamespaceDeclHandler start);
  
! void XMLPARSEAPI
  XML_SetEndNamespaceDeclHandler(XML_Parser parser,
  			       XML_EndNamespaceDeclHandler end);
  
! void XMLPARSEAPI
  XML_SetNotStandaloneHandler(XML_Parser parser,
  			    XML_NotStandaloneHandler handler);
  
! void XMLPARSEAPI
  XML_SetExternalEntityRefHandler(XML_Parser parser,
  				XML_ExternalEntityRefHandler handler);
***************
*** 479,486 ****
  as the first argument to the external entity ref handler instead
  of the parser object. */
! void 
  XML_SetExternalEntityRefHandlerArg(XML_Parser, void *arg);
  
! void 
  XML_SetUnknownEncodingHandler(XML_Parser parser,
  			      XML_UnknownEncodingHandler handler,
--- 487,494 ----
  as the first argument to the external entity ref handler instead
  of the parser object. */
! void XMLPARSEAPI
  XML_SetExternalEntityRefHandlerArg(XML_Parser, void *arg);
  
! void XMLPARSEAPI
  XML_SetUnknownEncodingHandler(XML_Parser parser,
  			      XML_UnknownEncodingHandler handler,
***************
*** 503,511 ****
  */
  
! void
  XML_SetReturnNSTriplet(XML_Parser parser, int do_nst);
  
  /* This value is passed as the userData argument to callbacks. */
! void 
  XML_SetUserData(XML_Parser parser, void *userData);
  
--- 511,519 ----
  */
  
! void XMLPARSEAPI
  XML_SetReturnNSTriplet(XML_Parser parser, int do_nst);
  
  /* This value is passed as the userData argument to callbacks. */
! void XMLPARSEAPI
  XML_SetUserData(XML_Parser parser, void *userData);
  
***************
*** 517,521 ****
  or XML_ParseBuffer. */
  
! int 
  XML_SetEncoding(XML_Parser parser, const XML_Char *encoding);
  
--- 525,529 ----
  or XML_ParseBuffer. */
  
! int XMLPARSEAPI
  XML_SetEncoding(XML_Parser parser, const XML_Char *encoding);
  
***************
*** 524,528 ****
  The userData will still be accessible using XML_GetUserData. */
  
! void 
  XML_UseParserAsHandlerArg(XML_Parser parser);
  
--- 532,536 ----
  The userData will still be accessible using XML_GetUserData. */
  
! void XMLPARSEAPI 
  XML_UseParserAsHandlerArg(XML_Parser parser);
  
***************
*** 534,541 ****
  Returns zero if out of memory, non-zero otherwise. */
  
! int 
  XML_SetBase(XML_Parser parser, const XML_Char *base);
  
! const XML_Char  *
  XML_GetBase(XML_Parser parser);
  
--- 542,549 ----
  Returns zero if out of memory, non-zero otherwise. */
  
! int XMLPARSEAPI
  XML_SetBase(XML_Parser parser, const XML_Char *base);
  
! const XML_Char  XMLPARSEAPI *
  XML_GetBase(XML_Parser parser);
  
***************
*** 546,550 ****
  XML_StartElementHandler. */
  
! int  XML_GetSpecifiedAttributeCount(XML_Parser parser);
  
  /* Returns the index of the ID attribute passed in the last call to
--- 554,559 ----
  XML_StartElementHandler. */
  
! int XMLPARSEAPI
! XML_GetSpecifiedAttributeCount(XML_Parser parser);
  
  /* Returns the index of the ID attribute passed in the last call to
***************
*** 552,567 ****
  attribute/value pair counts as 2; thus this correspondds to an index
  into the atts array passed to the XML_StartElementHandler. */
! int  XML_GetIdAttributeIndex(XML_Parser parser);
  
  /* Parses some input. Returns 0 if a fatal error is detected.
  The last call to XML_Parse must have isFinal true;
  len may be zero for this call (or any other). */
! int 
  XML_Parse(XML_Parser parser, const char *s, int len, int isFinal);
  
! void  *
  XML_GetBuffer(XML_Parser parser, int len);
  
! int 
  XML_ParseBuffer(XML_Parser parser, int len, int isFinal);
  
--- 561,578 ----
  attribute/value pair counts as 2; thus this correspondds to an index
  into the atts array passed to the XML_StartElementHandler. */
! 
! int XMLPARSEAPI
! XML_GetIdAttributeIndex(XML_Parser parser);
  
  /* Parses some input. Returns 0 if a fatal error is detected.
  The last call to XML_Parse must have isFinal true;
  len may be zero for this call (or any other). */
! int XMLPARSEAPI
  XML_Parse(XML_Parser parser, const char *s, int len, int isFinal);
  
! void XMLPARSEAPI *
  XML_GetBuffer(XML_Parser parser, int len);
  
! int XMLPARSEAPI
  XML_ParseBuffer(XML_Parser parser, int len, int isFinal);
  
***************
*** 579,583 ****
  The handlers and userData are initialized from the parser argument.
  Returns 0 if out of memory.  Otherwise returns a new XML_Parser object. */
! XML_Parser 
  XML_ExternalEntityParserCreate(XML_Parser parser,
  			       const XML_Char *context,
--- 590,594 ----
  The handlers and userData are initialized from the parser argument.
  Returns 0 if out of memory.  Otherwise returns a new XML_Parser object. */
! XML_Parser XMLPARSEAPI
  XML_ExternalEntityParserCreate(XML_Parser parser,
  			       const XML_Char *context,
***************
*** 609,613 ****
  entities is requested; otherwise it will return non-zero. */
  
! int 
  XML_SetParamEntityParsing(XML_Parser parser,
  			  enum XML_ParamEntityParsing parsing);
--- 620,624 ----
  entities is requested; otherwise it will return non-zero. */
  
! int XMLPARSEAPI
  XML_SetParamEntityParsing(XML_Parser parser,
  			  enum XML_ParamEntityParsing parsing);
***************
*** 659,663 ****
  Returns 0 if the event is in an internal entity. */
  
! int  XML_GetCurrentByteCount(XML_Parser parser);
  
  /* If XML_CONTEXT_BYTES is defined, returns the input buffer, sets
--- 670,675 ----
  Returns 0 if the event is in an internal entity. */
  
! int XMLPARSEAPI
! XML_GetCurrentByteCount(XML_Parser parser);
  
  /* If XML_CONTEXT_BYTES is defined, returns the input buffer, sets
***************
*** 670,676 ****
     the handler that makes the call. */
  
! const char  * XML_GetInputContext(XML_Parser parser,
! 					     int *offset,
! 					     int *size);
  
  /* For backwards compatibility with previous versions. */
--- 682,689 ----
     the handler that makes the call. */
  
! const char XMLPARSEAPI *
! XML_GetInputContext(XML_Parser parser,
! 		    int *offset,
! 		    int *size);
  
  /* For backwards compatibility with previous versions. */
***************
*** 680,688 ****
  
  /* Frees memory used by the parser. */
! void 
  XML_ParserFree(XML_Parser parser);
  
  /* Returns a string describing the error. */
! const XML_LChar  *XML_ErrorString(int code);
  
  #ifdef __cplusplus
--- 693,702 ----
  
  /* Frees memory used by the parser. */
! void XMLPARSEAPI
  XML_ParserFree(XML_Parser parser);
  
  /* Returns a string describing the error. */
! const XML_LChar XMLPARSEAPI *
! XML_ErrorString(int code);
  
  #ifdef __cplusplus

Index: xmlparse.c
===================================================================
RCS file: /cvsroot/expat/expat/lib/xmlparse.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** xmlparse.c	2000/09/25 00:58:49	1.4
--- xmlparse.c	2000/09/28 17:53:00	1.5
***************
*** 5,9 ****
--- 5,19 ----
  
  #include <config.h>
+ 
+ #ifdef __declspec
+ #  define XMLPARSEAPI __declspec(dllexport)
+ #endif
+ 
  #include "expat.h"
+ 
+ #ifdef __declspec
+ #  undef XMLPARSEAPI
+ #endif
+ 
  #include <stddef.h>
  

Index: xmlrole.c
===================================================================
RCS file: /cvsroot/expat/expat/lib/xmlrole.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** xmlrole.c	2000/09/21 21:20:18	1.2
--- xmlrole.c	2000/09/28 17:53:00	1.3
***************
*** 5,9 ****
  
  #include <config.h>
- #include "xmldef.h"
  #include "xmlrole.h"
  #include "ascii.h"
--- 5,8 ----

Index: xmlrole.h
===================================================================
RCS file: /cvsroot/expat/expat/lib/xmlrole.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** xmlrole.h	2000/09/21 21:20:18	1.2
--- xmlrole.h	2000/09/28 17:53:00	1.3
***************
*** 86,92 ****
  } PROLOG_STATE;
  
! void XMLTOKAPI XmlPrologStateInit(PROLOG_STATE *);
  #ifdef XML_DTD
! void XMLTOKAPI XmlPrologStateInitExternalEntity(PROLOG_STATE *);
  #endif /* XML_DTD */
  
--- 86,92 ----
  } PROLOG_STATE;
  
! void XmlPrologStateInit(PROLOG_STATE *);
  #ifdef XML_DTD
! void XmlPrologStateInitExternalEntity(PROLOG_STATE *);
  #endif /* XML_DTD */
  

Index: xmltok.c
===================================================================
RCS file: /cvsroot/expat/expat/lib/xmltok.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** xmltok.c	2000/09/21 21:20:18	1.2
--- xmltok.c	2000/09/28 17:53:00	1.3
***************
*** 5,9 ****
  
  #include <config.h>
- #include "xmldef.h"
  #include "xmltok.h"
  #include "nametab.h"
--- 5,8 ----

Index: xmltok.h
===================================================================
RCS file: /cvsroot/expat/expat/lib/xmltok.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** xmltok.h	2000/09/21 21:20:18	1.2
--- xmltok.h	2000/09/28 17:53:00	1.3
***************
*** 11,18 ****
  #endif
  
- #ifndef XMLTOKAPI
- #define XMLTOKAPI /* as nothing */
- #endif
- 
  /* The following token may be returned by XmlContentTok */
  #define XML_TOK_TRAILING_RSQB -5 /* ] or ]] at the end of the scan; might be start of
--- 11,14 ----
***************
*** 255,259 ****
  } INIT_ENCODING;
  
! int XMLTOKAPI XmlParseXmlDecl(int isGeneralTextEntity,
  			      const ENCODING *enc,
  			      const char *ptr,
--- 251,255 ----
  } INIT_ENCODING;
  
! int  XmlParseXmlDecl(int isGeneralTextEntity,
  			      const ENCODING *enc,
  			      const char *ptr,
***************
*** 266,277 ****
  			      int *standalonePtr);
  
! int XMLTOKAPI XmlInitEncoding(INIT_ENCODING *, const ENCODING **, const char *name);
! const ENCODING XMLTOKAPI *XmlGetUtf8InternalEncoding(void);
! const ENCODING XMLTOKAPI *XmlGetUtf16InternalEncoding(void);
! int XMLTOKAPI XmlUtf8Encode(int charNumber, char *buf);
! int XMLTOKAPI XmlUtf16Encode(int charNumber, unsigned short *buf);
  
! int XMLTOKAPI XmlSizeOfUnknownEncoding(void);
! ENCODING XMLTOKAPI *
  XmlInitUnknownEncoding(void *mem,
  		       int *table,
--- 262,273 ----
  			      int *standalonePtr);
  
! int  XmlInitEncoding(INIT_ENCODING *, const ENCODING **, const char *name);
! const ENCODING  *XmlGetUtf8InternalEncoding(void);
! const ENCODING  *XmlGetUtf16InternalEncoding(void);
! int  XmlUtf8Encode(int charNumber, char *buf);
! int  XmlUtf16Encode(int charNumber, unsigned short *buf);
  
! int  XmlSizeOfUnknownEncoding(void);
! ENCODING  *
  XmlInitUnknownEncoding(void *mem,
  		       int *table,
***************
*** 279,283 ****
  		       void *userData);
  
! int XMLTOKAPI XmlParseXmlDeclNS(int isGeneralTextEntity,
  			        const ENCODING *enc,
  			        const char *ptr,
--- 275,279 ----
  		       void *userData);
  
! int  XmlParseXmlDeclNS(int isGeneralTextEntity,
  			        const ENCODING *enc,
  			        const char *ptr,
***************
*** 289,296 ****
  			        const ENCODING **namedEncodingPtr,
  			        int *standalonePtr);
! int XMLTOKAPI XmlInitEncodingNS(INIT_ENCODING *, const ENCODING **, const char *name);
! const ENCODING XMLTOKAPI *XmlGetUtf8InternalEncodingNS(void);
! const ENCODING XMLTOKAPI *XmlGetUtf16InternalEncodingNS(void);
! ENCODING XMLTOKAPI *
  XmlInitUnknownEncodingNS(void *mem,
  		         int *table,
--- 285,292 ----
  			        const ENCODING **namedEncodingPtr,
  			        int *standalonePtr);
! int  XmlInitEncodingNS(INIT_ENCODING *, const ENCODING **, const char *name);
! const ENCODING  *XmlGetUtf8InternalEncodingNS(void);
! const ENCODING  *XmlGetUtf16InternalEncodingNS(void);
! ENCODING  *
  XmlInitUnknownEncodingNS(void *mem,
  		         int *table,

--- xmldef.h DELETED ---