|
|
|||
File indexing completed on 2026-08-30 09:12:43
0001 /* 0002 __ __ _ 0003 ___\ \/ /_ __ __ _| |_ 0004 / _ \\ /| '_ \ / _` | __| 0005 | __// \| |_) | (_| | |_ 0006 \___/_/\_\ .__/ \__,_|\__| 0007 |_| XML parser 0008 0009 Copyright (c) 1997-2000 Thai Open Source Software Center Ltd 0010 Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net> 0011 Copyright (c) 2000-2004 Fred L. Drake, Jr. <fdrake@users.sourceforge.net> 0012 Copyright (c) 2001-2002 Greg Stein <gstein@users.sourceforge.net> 0013 Copyright (c) 2002-2006 Karl Waclawek <karl@waclawek.net> 0014 Copyright (c) 2016 Cristian RodrÃguez <crrodriguez@opensuse.org> 0015 Copyright (c) 2016-2025 Sebastian Pipping <sebastian@pipping.org> 0016 Copyright (c) 2017 Rhodri James <rhodri@wildebeest.org.uk> 0017 Copyright (c) 2018 Yury Gribov <tetra2005@gmail.com> 0018 Copyright (c) 2026 Matthew Fernandez <matthew.fernandez@gmail.com> 0019 Licensed under the MIT license: 0020 0021 Permission is hereby granted, free of charge, to any person obtaining 0022 a copy of this software and associated documentation files (the 0023 "Software"), to deal in the Software without restriction, including 0024 without limitation the rights to use, copy, modify, merge, publish, 0025 distribute, sublicense, and/or sell copies of the Software, and to permit 0026 persons to whom the Software is furnished to do so, subject to the 0027 following conditions: 0028 0029 The above copyright notice and this permission notice shall be included 0030 in all copies or substantial portions of the Software. 0031 0032 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 0033 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 0034 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 0035 NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 0036 DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 0037 OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 0038 USE OR OTHER DEALINGS IN THE SOFTWARE. 0039 */ 0040 0041 #ifndef Expat_External_INCLUDED 0042 # define Expat_External_INCLUDED 1 0043 0044 /* External API definitions */ 0045 0046 /* Expat tries very hard to make the API boundary very specifically 0047 defined. There are two macros defined to control this boundary; 0048 each of these can be defined before including this header to 0049 achieve some different behavior, but doing so is not recommended or 0050 tested frequently. 0051 0052 XMLCALL - The calling convention to use for all calls across the 0053 "library boundary." This will default to cdecl, and 0054 try really hard to tell the compiler that's what we 0055 want. 0056 0057 XMLIMPORT - Whatever magic is needed to note that a function is 0058 to be imported from a dynamically loaded library 0059 (.dll, .so, or .sl, depending on your platform). 0060 0061 The XMLCALL macro was added in Expat 1.95.7. The only one which is 0062 expected to be directly useful in client code is XMLCALL. 0063 0064 Note that on at least some Unix versions, the Expat library must be 0065 compiled with the cdecl calling convention as the default since 0066 system headers may assume the cdecl convention. 0067 */ 0068 # ifndef XMLCALL 0069 # if defined(_MSC_VER) 0070 # define XMLCALL __cdecl 0071 # elif defined(__GNUC__) && defined(__i386) && ! defined(__INTEL_COMPILER) 0072 # define XMLCALL __attribute__((cdecl)) 0073 # else 0074 /* For any platform which uses this definition and supports more than 0075 one calling convention, we need to extend this definition to 0076 declare the convention used on that platform, if it's possible to 0077 do so. 0078 0079 If this is the case for your platform, please file a bug report 0080 with information on how to identify your platform via the C 0081 pre-processor and how to specify the same calling convention as the 0082 platform's malloc() implementation. 0083 */ 0084 # define XMLCALL 0085 # endif 0086 # endif /* not defined XMLCALL */ 0087 0088 # if ! defined(XML_STATIC) && ! defined(XMLIMPORT) 0089 # ifndef XML_BUILDING_EXPAT 0090 /* using Expat from an application */ 0091 0092 # if defined(_MSC_VER) && ! defined(__BEOS__) && ! defined(__CYGWIN__) 0093 # define XMLIMPORT __declspec(dllimport) 0094 # endif 0095 0096 # endif 0097 # endif /* not defined XML_STATIC */ 0098 0099 # ifndef XML_ENABLE_VISIBILITY 0100 # define XML_ENABLE_VISIBILITY 0 0101 # endif 0102 0103 # if ! defined(XMLIMPORT) && XML_ENABLE_VISIBILITY 0104 # define XMLIMPORT __attribute__((visibility("default"))) 0105 # endif 0106 0107 /* If we didn't define it above, define it away: */ 0108 # ifndef XMLIMPORT 0109 # define XMLIMPORT 0110 # endif 0111 0112 # if defined(__GNUC__) \ 0113 && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)) 0114 # define XML_ATTR_MALLOC __attribute__((__malloc__)) 0115 # else 0116 # define XML_ATTR_MALLOC 0117 # endif 0118 0119 # if defined(__GNUC__) \ 0120 && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) 0121 # define XML_ATTR_ALLOC_SIZE(x) __attribute__((__alloc_size__(x))) 0122 # else 0123 # define XML_ATTR_ALLOC_SIZE(x) 0124 # endif 0125 0126 # define XMLPARSEAPI(type) XMLIMPORT type XMLCALL 0127 0128 # ifdef __cplusplus 0129 extern "C" { 0130 # endif 0131 0132 # ifdef XML_UNICODE_WCHAR_T 0133 # ifndef XML_UNICODE 0134 # define XML_UNICODE 0135 # endif 0136 # if defined(__SIZEOF_WCHAR_T__) && (__SIZEOF_WCHAR_T__ != 2) 0137 # error "sizeof(wchar_t) != 2; Need -fshort-wchar for both Expat and libc" 0138 # endif 0139 # endif 0140 0141 # ifdef XML_UNICODE /* Information is UTF-16 encoded. */ 0142 # ifdef XML_UNICODE_WCHAR_T 0143 typedef wchar_t XML_Char; 0144 typedef wchar_t XML_LChar; 0145 # else 0146 typedef unsigned short XML_Char; 0147 typedef char XML_LChar; 0148 # endif /* XML_UNICODE_WCHAR_T */ 0149 # else /* Information is UTF-8 encoded. */ 0150 typedef char XML_Char; 0151 typedef char XML_LChar; 0152 # endif /* XML_UNICODE */ 0153 0154 # ifdef XML_LARGE_SIZE /* Use large integers for file/stream positions. */ 0155 typedef long long XML_Index; 0156 typedef unsigned long long XML_Size; 0157 # else 0158 typedef long XML_Index; 0159 typedef unsigned long XML_Size; 0160 # endif /* XML_LARGE_SIZE */ 0161 0162 # ifdef __cplusplus 0163 } 0164 # endif 0165 0166 #endif /* not Expat_External_INCLUDED */
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|