From ae2257acce723fc41b685b1aa2ac0407ad78c91d Mon Sep 17 00:00:00 2001 From: Clark Cooper Date: Sun, 22 Oct 2000 19:20:23 +0000 Subject: [PATCH] Changes for compiling under Microsoft Dev Studio. --- expat/lib/Makefile.in | 2 +- expat/lib/expat.dsp | 227 ++++++++++++++++++++++++++++++++++++++++++ expat/lib/expat.h | 9 +- expat/lib/winconfig.h | 27 +++++ expat/lib/xmlparse.c | 19 +++- expat/lib/xmlrole.c | 9 +- expat/lib/xmltok.c | 9 +- 7 files changed, 290 insertions(+), 12 deletions(-) create mode 100644 expat/lib/expat.dsp create mode 100644 expat/lib/winconfig.h diff --git a/expat/lib/Makefile.in b/expat/lib/Makefile.in index 82022c66..24c43d94 100644 --- a/expat/lib/Makefile.in +++ b/expat/lib/Makefile.in @@ -78,7 +78,7 @@ CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = INCLUDES = -I$(srcdir) -I.. -DEFS = @DEFS@ -DPACKAGE='"$(PACKAGE)"' -DVERSION='"$(VERSION)"' +DEFS = @DEFS@ -DPACKAGE='"$(PACKAGE)"' -DVERSION='"$(PACKAGE)_$(VERSION)"' CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ diff --git a/expat/lib/expat.dsp b/expat/lib/expat.dsp new file mode 100644 index 00000000..13950e17 --- /dev/null +++ b/expat/lib/expat.dsp @@ -0,0 +1,227 @@ +# Microsoft Developer Studio Project File - Name="expat" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=expat - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "expat.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "expat.mak" CFG="expat - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "expat - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "expat - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "expat - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# 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" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 + +!ELSEIF "$(CFG)" == "expat - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# 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" /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" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "expat - Win32 Release" +# Name "expat - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\xmlparse.c + +!IF "$(CFG)" == "expat - Win32 Release" + +# ADD CPP /D VERSION="expat_1.95.1" + +!ELSEIF "$(CFG)" == "expat - Win32 Debug" + +# ADD CPP /GX- /Od /D VERSION="\"expat_1.95.1\"" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\xmlrole.c + +!IF "$(CFG)" == "expat - Win32 Release" + +# ADD CPP /D VERSION=\"expat_1.95.1\" + +!ELSEIF "$(CFG)" == "expat - Win32 Debug" + +# ADD CPP /D VERSION=\"expat_1.95.1\" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\xmltok.c + +!IF "$(CFG)" == "expat - Win32 Release" + +# ADD CPP /D VERSION=\"expat_1.95.1\" + +!ELSEIF "$(CFG)" == "expat - Win32 Debug" + +# ADD CPP /D VERSION=\"expat_1.95.1\" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=xmltok_impl.c + +!IF "$(CFG)" == "expat - Win32 Release" + +# ADD CPP /D VERSION=\"expat_1.95.1\" + +!ELSEIF "$(CFG)" == "expat - Win32 Debug" + +# PROP Exclude_From_Build 1 +# ADD CPP /D VERSION=\"expat_1.95.1\" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=xmltok_ns.c + +!IF "$(CFG)" == "expat - Win32 Release" + +# ADD CPP /D VERSION=\"expat_1.95.1\" + +!ELSEIF "$(CFG)" == "expat - Win32 Debug" + +# PROP Exclude_From_Build 1 +# ADD CPP /D VERSION=\"expat_1.95.1\" + +!ENDIF + +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\ascii.h +# End Source File +# Begin Source File + +SOURCE=.\asciitab.h +# End Source File +# Begin Source File + +SOURCE=.\config.h +# End Source File +# Begin Source File + +SOURCE=.\expat.h +# End Source File +# Begin Source File + +SOURCE=.\iasciitab.h +# End Source File +# Begin Source File + +SOURCE=.\latin1tab.h +# End Source File +# Begin Source File + +SOURCE=.\nametab.h +# End Source File +# Begin Source File + +SOURCE=.\utf8tab.h +# End Source File +# Begin Source File + +SOURCE=.\xmlrole.h +# End Source File +# Begin Source File + +SOURCE=.\xmltok.h +# End Source File +# Begin Source File + +SOURCE=.\xmltok_impl.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/expat/lib/expat.h b/expat/lib/expat.h index d43072d8..68cde086 100644 --- a/expat/lib/expat.h +++ b/expat/lib/expat.h @@ -653,7 +653,8 @@ enum XML_Error { /* If XML_Parse or XML_ParseBuffer have returned 0, then XML_GetErrorCode returns information about the error. */ -enum XML_Error XML_GetErrorCode(XML_Parser parser); +enum XML_Error XMLPARSEAPI +XML_GetErrorCode(XML_Parser parser); /* These functions return information about the current parse location. They may be called when XML_Parse or XML_ParseBuffer return 0; @@ -663,9 +664,9 @@ They may also be called from any other callback called to report some parse event; in this the location is the location of the first of the sequence of characters that generated the event. */ -int XML_GetCurrentLineNumber(XML_Parser parser); -int XML_GetCurrentColumnNumber(XML_Parser parser); -long XML_GetCurrentByteIndex(XML_Parser parser); +int XMLPARSEAPI XML_GetCurrentLineNumber(XML_Parser parser); +int XMLPARSEAPI XML_GetCurrentColumnNumber(XML_Parser parser); +long XMLPARSEAPI XML_GetCurrentByteIndex(XML_Parser parser); /* Return the number of bytes in the current event. Returns 0 if the event is in an internal entity. */ diff --git a/expat/lib/winconfig.h b/expat/lib/winconfig.h new file mode 100644 index 00000000..62adba09 --- /dev/null +++ b/expat/lib/winconfig.h @@ -0,0 +1,27 @@ +/*================================================================ +** Copyright 2000, Clark Cooper +** All rights reserved. +** +** This is free software. You are permitted to copy, distribute, or modify +** it under the terms of the MIT/X license (contained in the COPYING file +** with this distribution.) +** +** +*/ + +#ifndef WINCONFIG_H +#define WINCONFIG_H + +#define WIN32_LEAN_AND_MEAN +#include +#undef WIN32_LEAN_AND_MEAN + +#include +#include + +#define XML_NS 1 +#define XML_DTD 1 +#define XML_BYTE_ORDER 12 +#define XML_CONTEXT_BYTES 1024 + +#endif /* ndef WINCONFIG_H */ diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c index 85432d39..228b1d6d 100644 --- a/expat/lib/xmlparse.c +++ b/expat/lib/xmlparse.c @@ -4,8 +4,14 @@ See the file COPYING for copying permission. */ static char RCSId[] - = "$Header: /cvsroot/expat/expat/lib/xmlparse.c,v 1.9 2000/10/20 15:14:36 coopercc Exp $"; + = "$Header: /cvsroot/expat/expat/lib/xmlparse.c,v 1.10 2000/10/20 15:37:28 coopercc Exp $"; +#ifdef COMPILED_FROM_DSP +# include "winconfig.h" +# define XMLPARSEAPI __declspec(dllexport) +# include "expat.h" +# undef XMLPARSEAPI +#else #include #ifdef __declspec @@ -17,6 +23,7 @@ static char RCSId[] #ifdef __declspec # undef XMLPARSEAPI #endif +#endif /* ndef COMPILED_FROM_DSP */ #include @@ -512,6 +519,12 @@ typedef struct { #define paramEntityParsing (((Parser *)parser)->m_paramEntityParsing) #endif /* XML_DTD */ +#ifdef COMPILED_FROM_DSP +BOOL WINAPI DllMain(HINSTANCE h, DWORD r, LPVOID p) { + return TRUE; +} +#endif /* def COMPILED_FROM_DSP */ + #ifdef _MSC_VER #ifdef _DEBUG Parser *asParser(XML_Parser parser) @@ -4554,7 +4567,8 @@ build_node (XML_Parser parser, dest->children = 0; } else { - int i, cn; + unsigned int i; + int cn; dest->numchildren = dtd.scaffold[src_node].childcnt; dest->children = *contpos; *contpos += dest->numchildren; @@ -4570,7 +4584,6 @@ build_node (XML_Parser parser, static XML_Content * build_model (XML_Parser parser) { - int node; XML_Content *ret; XML_Content *cpos; char * str; diff --git a/expat/lib/xmlrole.c b/expat/lib/xmlrole.c index 6c3518fb..c263b895 100644 --- a/expat/lib/xmlrole.c +++ b/expat/lib/xmlrole.c @@ -4,9 +4,14 @@ See the file COPYING for copying permission. */ static char RCSId[] - = "$Header$"; + = "$Header: /cvsroot/expat/expat/lib/xmlrole.c,v 1.4 2000/09/29 14:57:45 coopercc Exp $"; + +#ifdef COMPILED_FROM_DSP +# include "winconfig.h" +#else +# include +#endif /* ndef COMPILED_FROM_DSP */ -#include #include "xmlrole.h" #include "ascii.h" diff --git a/expat/lib/xmltok.c b/expat/lib/xmltok.c index 788e79f9..99797838 100644 --- a/expat/lib/xmltok.c +++ b/expat/lib/xmltok.c @@ -4,9 +4,14 @@ See the file COPYING for copying permission. */ static char RCSId[] - = "$Header$"; + = "$Header: /cvsroot/expat/expat/lib/xmltok.c,v 1.4 2000/09/29 14:57:45 coopercc Exp $"; + +#ifdef COMPILED_FROM_DSP +# include "winconfig.h" +#else +# include +#endif /* ndef COMPILED_FROM_DSP */ -#include #include "xmltok.h" #include "nametab.h" -- 2.40.0