2003-07-20 13:41:17 +00:00
|
|
|
/*
|
2017-03-22 18:51:16 +00:00
|
|
|
* Configuration file for Mini-XML, a small XML file parsing library.
|
2003-07-20 13:41:17 +00:00
|
|
|
*
|
2017-03-22 18:51:16 +00:00
|
|
|
* Copyright 2003-2017 by Michael R Sweet.
|
2003-07-20 13:41:17 +00:00
|
|
|
*
|
2010-09-19 05:26:46 +00:00
|
|
|
* These coded instructions, statements, and computer programs are the
|
|
|
|
* property of Michael R Sweet and are protected by Federal copyright
|
|
|
|
* law. Distribution and use rights are outlined in the file "COPYING"
|
|
|
|
* which should have been included with this file. If this file is
|
|
|
|
* missing or damaged, see the license at:
|
2003-07-20 13:41:17 +00:00
|
|
|
*
|
2017-03-22 18:51:16 +00:00
|
|
|
* https://michaelrsweet.github.io/mxml
|
2003-07-20 13:41:17 +00:00
|
|
|
*/
|
|
|
|
|
2003-07-27 23:11:40 +00:00
|
|
|
/*
|
|
|
|
* Include necessary headers...
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
2003-09-28 12:44:39 +00:00
|
|
|
#include <stdarg.h>
|
|
|
|
#include <ctype.h>
|
|
|
|
|
|
|
|
|
2004-05-02 16:04:40 +00:00
|
|
|
/*
|
|
|
|
* Version number...
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define MXML_VERSION ""
|
|
|
|
|
|
|
|
|
2007-09-09 07:27:08 +00:00
|
|
|
/*
|
|
|
|
* Inline function support...
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define inline
|
|
|
|
|
|
|
|
|
2009-04-18 17:05:52 +00:00
|
|
|
/*
|
|
|
|
* Long long support...
|
|
|
|
*/
|
|
|
|
|
|
|
|
#undef HAVE_LONG_LONG
|
|
|
|
|
|
|
|
|
2017-03-31 17:38:06 +00:00
|
|
|
/*
|
2017-04-05 03:32:11 +00:00
|
|
|
* Do we have <zlib.h>?
|
2017-03-31 17:38:06 +00:00
|
|
|
*/
|
|
|
|
|
2017-04-05 03:32:11 +00:00
|
|
|
#undef HAVE_ZLIB_H
|
2017-03-31 17:38:06 +00:00
|
|
|
|
|
|
|
|
2003-09-28 12:44:39 +00:00
|
|
|
/*
|
2017-03-29 23:04:41 +00:00
|
|
|
* Do we have the *printf() functions?
|
2003-09-28 12:44:39 +00:00
|
|
|
*/
|
|
|
|
|
2007-04-18 13:14:10 +00:00
|
|
|
#undef HAVE_SNPRINTF
|
2017-03-29 23:04:41 +00:00
|
|
|
#undef HAVE_VASPRINTF
|
2003-09-28 12:44:39 +00:00
|
|
|
#undef HAVE_VSNPRINTF
|
2003-07-27 23:11:40 +00:00
|
|
|
|
|
|
|
|
2003-07-20 13:41:17 +00:00
|
|
|
/*
|
|
|
|
* Do we have the strXXX() functions?
|
|
|
|
*/
|
|
|
|
|
|
|
|
#undef HAVE_STRDUP
|
2017-03-29 23:04:41 +00:00
|
|
|
#undef HAVE_STRLCPY
|
2003-07-20 13:41:17 +00:00
|
|
|
|
|
|
|
|
2007-09-22 21:00:56 +00:00
|
|
|
/*
|
|
|
|
* Do we have threading support?
|
|
|
|
*/
|
|
|
|
|
|
|
|
#undef HAVE_PTHREAD_H
|
|
|
|
|
|
|
|
|
2003-07-20 13:41:17 +00:00
|
|
|
/*
|
|
|
|
* Define prototypes for string functions as needed...
|
|
|
|
*/
|
|
|
|
|
|
|
|
# ifndef HAVE_STRDUP
|
2005-10-13 18:27:00 +00:00
|
|
|
extern char *_mxml_strdup(const char *);
|
|
|
|
# define strdup _mxml_strdup
|
2003-07-20 13:41:17 +00:00
|
|
|
# endif /* !HAVE_STRDUP */
|
|
|
|
|
2017-03-29 23:04:41 +00:00
|
|
|
# ifndef HAVE_STRLCPY
|
|
|
|
extern size_t _mxml_strlcpy(char *, const char *, size_t);
|
|
|
|
# define strlcpy _mxml_strlcpy
|
|
|
|
# endif /* !HAVE_STRLCPY */
|
|
|
|
|
2005-10-13 18:27:00 +00:00
|
|
|
extern char *_mxml_strdupf(const char *, ...);
|
|
|
|
extern char *_mxml_vstrdupf(const char *, va_list);
|
2003-09-28 12:44:39 +00:00
|
|
|
|
2007-04-18 13:14:10 +00:00
|
|
|
# ifndef HAVE_SNPRINTF
|
|
|
|
extern int _mxml_snprintf(char *, size_t, const char *, ...);
|
|
|
|
# define snprintf _mxml_snprintf
|
|
|
|
# endif /* !HAVE_SNPRINTF */
|
|
|
|
|
2003-09-28 12:44:39 +00:00
|
|
|
# ifndef HAVE_VSNPRINTF
|
2005-10-13 18:27:00 +00:00
|
|
|
extern int _mxml_vsnprintf(char *, size_t, const char *, va_list);
|
|
|
|
# define vsnprintf _mxml_vsnprintf
|
2003-09-28 12:44:39 +00:00
|
|
|
# endif /* !HAVE_VSNPRINTF */
|