Convert to DLL

pull/193/head
Michael R Sweet 17 years ago
parent 237a4ad90e
commit c1c940970d
  1. 4
      mxml-file.c
  2. 4
      mxml-string.c
  3. 14
      mxmldoc.c
  4. 12
      vcnet/config.h
  5. 14
      vcnet/mxml.sln
  6. 155
      vcnet/mxml.vcproj
  7. 58
      vcnet/mxml1.def
  8. 172
      vcnet/mxml1.vcproj

@ -228,7 +228,7 @@ mxmlLoadString(mxml_node_t *top, /* I - Top node */
* Read the XML data... * Read the XML data...
*/ */
return (mxml_load_data(top, &s, cb, mxml_string_getc, MXML_NO_CALLBACK, return (mxml_load_data(top, (void *)&s, cb, mxml_string_getc, MXML_NO_CALLBACK,
NULL)); NULL));
} }
@ -559,7 +559,7 @@ mxmlSAXLoadString(
* Read the XML data... * Read the XML data...
*/ */
return (mxml_load_data(top, &s, cb, mxml_string_getc, sax_cb, sax_data)); return (mxml_load_data(top, (void *)&s, cb, mxml_string_getc, sax_cb, sax_data));
} }

@ -31,7 +31,7 @@
#include "config.h" #include "config.h"
#ifdef HAVE_SNPRINTF #ifndef HAVE_SNPRINTF
/* /*
* '_mxml_snprintf()' - Format a string. * '_mxml_snprintf()' - Format a string.
*/ */
@ -52,7 +52,7 @@ _mxml_snprintf(char *buffer, /* I - Output buffer */
return (bytes); return (bytes);
} }
#endif /* HAVE_SNPRINTF */ #endif /* !HAVE_SNPRINTF */
/* /*

@ -289,7 +289,7 @@ main(int argc, /* I - Number of command-line args */
* Process XML or source file... * Process XML or source file...
*/ */
len = strlen(argv[i]); len = (int)strlen(argv[i]);
if (len > 4 && !strcmp(argv[i] + len - 4, ".xml")) if (len > 4 && !strcmp(argv[i] + len - 4, ".xml"))
{ {
/* /*
@ -682,18 +682,18 @@ get_text(mxml_node_t *node, /* I - Node to get */
if (current->value.text.whitespace) if (current->value.text.whitespace)
*ptr++ = ' '; *ptr++ = ' ';
len = strlen(current->value.text.string); len = (int)strlen(current->value.text.string);
if (len > (end - ptr)) if (len > (int)(end - ptr))
len = end - ptr; len = (int)(end - ptr);
memcpy(ptr, current->value.text.string, len); memcpy(ptr, current->value.text.string, len);
ptr += len; ptr += len;
} }
else if (current->type == MXML_OPAQUE) else if (current->type == MXML_OPAQUE)
{ {
len = strlen(current->value.opaque); len = (int)strlen(current->value.opaque);
if (len > (end - ptr)) if (len > (int)(end - ptr))
len = end - ptr; len = (int)(end - ptr);
memcpy(ptr, current->value.opaque, len); memcpy(ptr, current->value.opaque, len);
ptr += len; ptr += len;

@ -42,7 +42,14 @@
* Version number... * Version number...
*/ */
#define MXML_VERSION "Mini-XML v2.3.1" #define MXML_VERSION "Mini-XML v2.4"
/*
* Inline function support...
*/
#define inline _inline
/* /*
@ -69,7 +76,8 @@ extern char *_mxml_strdup(const char *);
# define strdup _mxml_strdup # define strdup _mxml_strdup
# endif /* !HAVE_STRDUP */ # endif /* !HAVE_STRDUP */
extern char *_mxml_strdupf(const char *, va_list); extern char *_mxml_strdupf(const char *, ...);
extern char *_mxml_vstrdupf(const char *, va_list);
# ifndef HAVE_SNPRINTF # ifndef HAVE_SNPRINTF
extern int _mxml_snprintf(char *, size_t, const char *, ...); extern int _mxml_snprintf(char *, size_t, const char *, ...);

@ -1,11 +1,11 @@
Microsoft Visual Studio Solution File, Format Version 8.00 Microsoft Visual Studio Solution File, Format Version 8.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mxml", "mxml.vcproj", "{07169A72-08A9-4EC8-BC6C-CCBC1F01EA58}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mxmldoc", "mxmldoc.vcproj", "{D909892E-520A-4322-9A47-DAEBDA9CC7A7}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
{E5AA9476-9751-4654-8109-B1A2112D5E73} = {E5AA9476-9751-4654-8109-B1A2112D5E73}
EndProjectSection EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mxmldoc", "mxmldoc.vcproj", "{D909892E-520A-4322-9A47-DAEBDA9CC7A7}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mxml1", "mxml1.vcproj", "{E5AA9476-9751-4654-8109-B1A2112D5E73}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
{07169A72-08A9-4EC8-BC6C-CCBC1F01EA58} = {07169A72-08A9-4EC8-BC6C-CCBC1F01EA58}
EndProjectSection EndProjectSection
EndProject EndProject
Global Global
@ -14,14 +14,14 @@ Global
Release = Release Release = Release
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution GlobalSection(ProjectConfiguration) = postSolution
{07169A72-08A9-4EC8-BC6C-CCBC1F01EA58}.Debug.ActiveCfg = Debug|Win32
{07169A72-08A9-4EC8-BC6C-CCBC1F01EA58}.Debug.Build.0 = Debug|Win32
{07169A72-08A9-4EC8-BC6C-CCBC1F01EA58}.Release.ActiveCfg = Release|Win32
{07169A72-08A9-4EC8-BC6C-CCBC1F01EA58}.Release.Build.0 = Release|Win32
{D909892E-520A-4322-9A47-DAEBDA9CC7A7}.Debug.ActiveCfg = Debug|Win32 {D909892E-520A-4322-9A47-DAEBDA9CC7A7}.Debug.ActiveCfg = Debug|Win32
{D909892E-520A-4322-9A47-DAEBDA9CC7A7}.Debug.Build.0 = Debug|Win32 {D909892E-520A-4322-9A47-DAEBDA9CC7A7}.Debug.Build.0 = Debug|Win32
{D909892E-520A-4322-9A47-DAEBDA9CC7A7}.Release.ActiveCfg = Release|Win32 {D909892E-520A-4322-9A47-DAEBDA9CC7A7}.Release.ActiveCfg = Release|Win32
{D909892E-520A-4322-9A47-DAEBDA9CC7A7}.Release.Build.0 = Release|Win32 {D909892E-520A-4322-9A47-DAEBDA9CC7A7}.Release.Build.0 = Release|Win32
{E5AA9476-9751-4654-8109-B1A2112D5E73}.Debug.ActiveCfg = Debug|Win32
{E5AA9476-9751-4654-8109-B1A2112D5E73}.Debug.Build.0 = Debug|Win32
{E5AA9476-9751-4654-8109-B1A2112D5E73}.Release.ActiveCfg = Release|Win32
{E5AA9476-9751-4654-8109-B1A2112D5E73}.Release.Build.0 = Release|Win32
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection EndGlobalSection

@ -1,155 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="mxml"
SccProjectName=""
SccLocalPath="">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug"
ConfigurationType="4"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../vcnet,.."
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN"
RuntimeLibrary="3"
UsePrecompiledHeader="2"
PrecompiledHeaderFile=".\Debug/mxml.lib.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
BrowseInformation="1"
SuppressStartupBanner="TRUE"
DebugInformationFormat="1"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="..\mxmld.lib"
SuppressStartupBanner="TRUE"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release"
ConfigurationType="4"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
<Tool
Name="VCCLCompilerTool"
Optimization="4"
InlineFunctionExpansion="2"
ImproveFloatingPointConsistency="TRUE"
FavorSizeOrSpeed="0"
AdditionalIncludeDirectories="../vcnet,.."
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN"
RuntimeLibrary="2"
UsePrecompiledHeader="2"
PrecompiledHeaderFile=".\Release/mxml.lib.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
SuppressStartupBanner="TRUE"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="..\mxml.lib"
SuppressStartupBanner="TRUE"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="">
<File
RelativePath="..\mxml-attr.c">
</File>
<File
RelativePath="..\mxml-entity.c">
</File>
<File
RelativePath="..\mxml-file.c">
</File>
<File
RelativePath="..\mxml-index.c">
</File>
<File
RelativePath="..\mxml-node.c">
</File>
<File
RelativePath="..\mxml-private.c">
</File>
<File
RelativePath="..\mxml-search.c">
</File>
<File
RelativePath="..\mxml-set.c">
</File>
<File
RelativePath="..\mxml-string.c">
</File>
</Filter>
<Filter
Name="Header Files"
Filter="">
<File
RelativePath="..\mxml.h">
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

@ -0,0 +1,58 @@
LIBRARY "MXML1.DLL"
EXPORTS
_mxml_snprintf
_mxml_strdup
_mxml_strdupf
_mxml_vsnprintf
_mxml_vstrdupf
mxmlAdd
mxmlDelete
mxmlElementDeleteAttr
mxmlElementGetAttr
mxmlElementSetAttr
mxmlElementSetAttrf
mxmlEntityAddCallback
mxmlEntityGetName
mxmlEntityGetValue
mxmlEntityRemoveCallback
mxmlFindElement
mxmlIndexDelete
mxmlIndexEnum
mxmlIndexFind
mxmlIndexNew
mxmlIndexReset
mxmlLoadFd
mxmlLoadFile
mxmlLoadString
mxmlNewCDATA
mxmlNewCustom
mxmlNewElement
mxmlNewInteger
mxmlNewOpaque
mxmlNewReal
mxmlNewText
mxmlNewTextf
mxmlNewXML
mxmlRelease
mxmlRemove
mxmlRetain
mxmlSaveAllocString
mxmlSaveFd
mxmlSaveFile
mxmlSaveString
mxmlSAXLoadFd
mxmlSAXLoadFile
mxmlSAXLoadString
mxmlSetCDATA
mxmlSetCustom
mxmlSetCustomHandlers
mxmlSetElement
mxmlSetErrorCallback
mxmlSetInteger
mxmlSetOpaque
mxmlSetReal
mxmlSetText
mxmlSetTextf
mxmlSetWrapMargin
mxmlWalkNext
mxmlWalkPrev

@ -0,0 +1,172 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="mxml1"
ProjectGUID="{E5AA9476-9751-4654-8109-B1A2112D5E73}"
Keyword="Win32Proj">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="Debug"
IntermediateDirectory="Debug"
ConfigurationType="2"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\vcnet;.."
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MXML1_EXPORTS"
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="1"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="4"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="mxml1d.dll"
LinkIncremental="2"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(OutDir)/mxml1.pdb"
SubSystem="2"
ImportLibrary="mxml1d.lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="Release"
IntermediateDirectory="Release"
ConfigurationType="2"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\vcnet;.."
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MXML1_EXPORTS"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="1"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="mxml1.dll"
LinkIncremental="1"
GenerateDebugInformation="TRUE"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="mxml1.lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
<File
RelativePath="..\mxml-attr.c">
</File>
<File
RelativePath="..\mxml-entity.c">
</File>
<File
RelativePath="..\mxml-file.c">
</File>
<File
RelativePath="..\mxml-index.c">
</File>
<File
RelativePath="..\mxml-node.c">
</File>
<File
RelativePath="..\mxml-private.c">
</File>
<File
RelativePath="..\mxml-search.c">
</File>
<File
RelativePath="..\mxml-set.c">
</File>
<File
RelativePath="..\mxml-string.c">
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
<File
RelativePath="..\vcnet\config.h">
</File>
<File
RelativePath="..\mxml-private.h">
</File>
<File
RelativePath="..\mxml.h">
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
<File
RelativePath=".\mxml1.def">
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
Loading…
Cancel
Save