diff --git a/mxml-file.c b/mxml-file.c
index 7e6bb11..d44aee7 100644
--- a/mxml-file.c
+++ b/mxml-file.c
@@ -228,7 +228,7 @@ mxmlLoadString(mxml_node_t *top, /* I - Top node */
* 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));
}
@@ -559,7 +559,7 @@ mxmlSAXLoadString(
* 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));
}
diff --git a/mxml-string.c b/mxml-string.c
index f43e40e..bf21aec 100644
--- a/mxml-string.c
+++ b/mxml-string.c
@@ -31,7 +31,7 @@
#include "config.h"
-#ifdef HAVE_SNPRINTF
+#ifndef HAVE_SNPRINTF
/*
* '_mxml_snprintf()' - Format a string.
*/
@@ -52,7 +52,7 @@ _mxml_snprintf(char *buffer, /* I - Output buffer */
return (bytes);
}
-#endif /* HAVE_SNPRINTF */
+#endif /* !HAVE_SNPRINTF */
/*
diff --git a/mxmldoc.c b/mxmldoc.c
index 3de5df0..1e79448 100644
--- a/mxmldoc.c
+++ b/mxmldoc.c
@@ -289,7 +289,7 @@ main(int argc, /* I - Number of command-line args */
* Process XML or source file...
*/
- len = strlen(argv[i]);
+ len = (int)strlen(argv[i]);
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)
*ptr++ = ' ';
- len = strlen(current->value.text.string);
- if (len > (end - ptr))
- len = end - ptr;
+ len = (int)strlen(current->value.text.string);
+ if (len > (int)(end - ptr))
+ len = (int)(end - ptr);
memcpy(ptr, current->value.text.string, len);
ptr += len;
}
else if (current->type == MXML_OPAQUE)
{
- len = strlen(current->value.opaque);
- if (len > (end - ptr))
- len = end - ptr;
+ len = (int)strlen(current->value.opaque);
+ if (len > (int)(end - ptr))
+ len = (int)(end - ptr);
memcpy(ptr, current->value.opaque, len);
ptr += len;
diff --git a/vcnet/config.h b/vcnet/config.h
index 53e277d..b11e5e1 100644
--- a/vcnet/config.h
+++ b/vcnet/config.h
@@ -42,7 +42,14 @@
* 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
# 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
extern int _mxml_snprintf(char *, size_t, const char *, ...);
diff --git a/vcnet/mxml.sln b/vcnet/mxml.sln
index 38cb657..5748484 100644
--- a/vcnet/mxml.sln
+++ b/vcnet/mxml.sln
@@ -1,11 +1,11 @@
Microsoft Visual Studio Solution File, Format Version 8.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mxml", "mxml.vcproj", "{07169A72-08A9-4EC8-BC6C-CCBC1F01EA58}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mxmldoc", "mxmldoc.vcproj", "{D909892E-520A-4322-9A47-DAEBDA9CC7A7}"
ProjectSection(ProjectDependencies) = postProject
- {07169A72-08A9-4EC8-BC6C-CCBC1F01EA58} = {07169A72-08A9-4EC8-BC6C-CCBC1F01EA58}
+ {E5AA9476-9751-4654-8109-B1A2112D5E73} = {E5AA9476-9751-4654-8109-B1A2112D5E73}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mxml1", "mxml1.vcproj", "{E5AA9476-9751-4654-8109-B1A2112D5E73}"
+ ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Global
@@ -14,14 +14,14 @@ Global
Release = Release
EndGlobalSection
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.Build.0 = Debug|Win32
{D909892E-520A-4322-9A47-DAEBDA9CC7A7}.Release.ActiveCfg = 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
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
diff --git a/vcnet/mxml.vcproj b/vcnet/mxml.vcproj
deleted file mode 100644
index 1493e57..0000000
--- a/vcnet/mxml.vcproj
+++ /dev/null
@@ -1,155 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/vcnet/mxml1.def b/vcnet/mxml1.def
new file mode 100644
index 0000000..b9725d3
--- /dev/null
+++ b/vcnet/mxml1.def
@@ -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
diff --git a/vcnet/mxml1.vcproj b/vcnet/mxml1.vcproj
new file mode 100644
index 0000000..d8302e6
--- /dev/null
+++ b/vcnet/mxml1.vcproj
@@ -0,0 +1,172 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+