summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/expat/xmlwf/xmlfile.c
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2025-03-12 17:23:33 +1100
committer Vas Crabb <vas@vastheman.com>2025-03-12 17:23:33 +1100
commit288839a39514c5fa8d105655fa7c11bd6ca0de03 (patch)
tree63cddc1c8579091287a2821c24e2f0ab8ef3c874 /3rdparty/expat/xmlwf/xmlfile.c
parentd69383bfb699daace0b565aa0ecdecdf39a119d1 (diff)
3rdparty/expat: Updated to expat 2.6.4.
Diffstat (limited to '3rdparty/expat/xmlwf/xmlfile.c')
-rw-r--r--3rdparty/expat/xmlwf/xmlfile.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/3rdparty/expat/xmlwf/xmlfile.c b/3rdparty/expat/xmlwf/xmlfile.c
index e3d22c574c5..cd2533e0257 100644
--- a/3rdparty/expat/xmlwf/xmlfile.c
+++ b/3rdparty/expat/xmlwf/xmlfile.c
@@ -7,7 +7,15 @@
|_| XML parser
Copyright (c) 1997-2000 Thai Open Source Software Center Ltd
- Copyright (c) 2000-2017 Expat development team
+ Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
+ Copyright (c) 2002-2003 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
+ Copyright (c) 2004-2006 Karl Waclawek <karl@waclawek.net>
+ Copyright (c) 2005-2007 Steven Solie <steven@solie.ca>
+ Copyright (c) 2016-2023 Sebastian Pipping <sebastian@pipping.org>
+ Copyright (c) 2017 Rhodri James <rhodri@wildebeest.org.uk>
+ Copyright (c) 2019 David Loffredo <loffredo@steptools.com>
+ Copyright (c) 2021 Donghee Na <donghee.na@python.org>
+ Copyright (c) 2024 Hanno Böck <hanno@gentoo.org>
Licensed under the MIT license:
Permission is hereby granted, free of charge, to any person obtaining
@@ -30,6 +38,8 @@
USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+#include "expat_config.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
@@ -38,9 +48,7 @@
#ifdef _WIN32
# include "winconfig.h"
-#elif defined(HAVE_EXPAT_CONFIG_H)
-# include <expat_config.h>
-#endif /* ndef _WIN32 */
+#endif
#include "expat.h"
#include "internal.h" /* for UNUSED_P only */
@@ -64,11 +72,7 @@
# endif
#endif
-#ifdef _DEBUG
-# define READ_SIZE 16
-#else
-# define READ_SIZE (1024 * 8)
-#endif
+int g_read_size_bytes = 1024 * 8;
typedef struct {
XML_Parser parser;
@@ -88,7 +92,8 @@ reportError(XML_Parser parser, const XML_Char *filename) {
filename, XML_GetErrorLineNumber(parser),
XML_GetErrorColumnNumber(parser), message);
else
- ftprintf(stderr, T("%s: (unknown message %d)\n"), filename, code);
+ ftprintf(stderr, T("%s: (unknown message %u)\n"), filename,
+ (unsigned int)code);
}
/* This implementation will give problems on files larger than INT_MAX. */
@@ -188,7 +193,7 @@ processStream(const XML_Char *filename, XML_Parser parser) {
}
for (;;) {
int nread;
- char *buf = (char *)XML_GetBuffer(parser, READ_SIZE);
+ char *buf = (char *)XML_GetBuffer(parser, g_read_size_bytes);
if (! buf) {
if (filename != NULL)
close(fd);
@@ -196,7 +201,7 @@ processStream(const XML_Char *filename, XML_Parser parser) {
filename != NULL ? filename : T("xmlwf"));
return 0;
}
- nread = read(fd, buf, READ_SIZE);
+ nread = read(fd, buf, g_read_size_bytes);
if (nread < 0) {
tperror(filename != NULL ? filename : T("STDIN"));
if (filename != NULL)