|
|
|||
File indexing completed on 2026-11-28 10:37:34
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 Copyright (c) 2026 Braian Plaku <braianplaku@gmail.com> 0020 Licensed under the MIT license: 0021 0022 Permission is hereby granted, free of charge, to any person obtaining 0023 a copy of this software and associated documentation files (the 0024 "Software"), to deal in the Software without restriction, including 0025 without limitation the rights to use, copy, modify, merge, publish, 0026 distribute, sublicense, and/or sell copies of the Software, and to permit 0027 persons to whom the Software is furnished to do so, subject to the 0028 following conditions: 0029 0030 The above copyright notice and this permission notice shall be included 0031 in all copies or substantial portions of the Software. 0032 0033 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 0034 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 0035 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 0036 NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 0037 DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 0038 OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 0039 USE OR OTHER DEALINGS IN THE SOFTWARE. 0040 0041 SPDX-License-Identifier: MIT 0042 */ 0043 0044 #ifndef Expat_External_INCLUDED 0045 # define Expat_External_INCLUDED 1 0046 0047 /* External API definitions */ 0048 0049 /* Expat tries very hard to make the API boundary very specifically 0050 defined. There are two macros defined to control this boundary; 0051 each of these can be defined before including this header to 0052 achieve some different behavior, but doing so is not recommended or 0053 tested frequently. 0054 0055 XMLCALL - The calling convention to use for all calls across the 0056 "library boundary." This will default to cdecl, and 0057 try really hard to tell the compiler that's what we 0058 want. 0059 0060 XMLIMPORT - Whatever magic is needed to note that a function is 0061 to be imported from a dynamically loaded library 0062 (.dll, .so, or .sl, depending on your platform). 0063 0064 The XMLCALL macro was added in Expat 1.95.7. The only one which is 0065 expected to be directly useful in client code is XMLCALL. 0066 0067 Note that on at least some Unix versions, the Expat library must be 0068 compiled with the cdecl calling convention as the default since 0069 system headers may assume the cdecl convention. 0070 */ 0071 # ifndef XMLCALL 0072 # if defined(_MSC_VER) 0073 # define XMLCALL __cdecl 0074 # elif defined(__GNUC__) && defined(__i386) && ! defined(__INTEL_COMPILER) 0075 # define XMLCALL __attribute__((cdecl)) 0076 # else 0077 /* For any platform which uses this definition and supports more than 0078 one calling convention, we need to extend this definition to 0079 declare the convention used on that platform, if it's possible to 0080 do so. 0081 0082 If this is the case for your platform, please file a bug report 0083 with information on how to identify your platform via the C 0084 pre-processor and how to specify the same calling convention as the 0085 platform's malloc() implementation. 0086 */ 0087 # define XMLCALL 0088 # endif 0089 # endif /* not defined XMLCALL */ 0090 0091 # if ! defined(XML_STATIC) && ! defined(XMLIMPORT) 0092 # ifndef XML_BUILDING_EXPAT 0093 /* using Expat from an application */ 0094 0095 # if defined(_MSC_VER) && ! defined(__BEOS__) && ! defined(__CYGWIN__) 0096 # define XMLIMPORT __declspec(dllimport) 0097 # endif 0098 0099 # endif 0100 # endif /* not defined XML_STATIC */ 0101 0102 # ifndef XML_ENABLE_VISIBILITY 0103 # define XML_ENABLE_VISIBILITY 0 0104 # endif 0105 0106 # if ! defined(XMLIMPORT) && XML_ENABLE_VISIBILITY 0107 # define XMLIMPORT __attribute__((visibility("default"))) 0108 # endif 0109 0110 /* If we didn't define it above, define it away: */ 0111 # ifndef XMLIMPORT 0112 # define XMLIMPORT 0113 # endif 0114 0115 # if defined(__GNUC__) \ 0116 && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)) 0117 # define XML_ATTR_MALLOC __attribute__((__malloc__)) 0118 # else 0119 # define XML_ATTR_MALLOC 0120 # endif 0121 0122 # if defined(__GNUC__) \ 0123 && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) 0124 # define XML_ATTR_ALLOC_SIZE(x) __attribute__((__alloc_size__(x))) 0125 # else 0126 # define XML_ATTR_ALLOC_SIZE(x) 0127 # endif 0128 0129 /* Marks a function that Expat still provides but that callers should move off 0130 of. */ 0131 # if defined(__clang__) || defined(__GNUC__) 0132 # define XML_ATTR_DEPRECATED(message) \ 0133 __attribute__((__deprecated__(message))) 0134 # elif defined(_MSC_VER) 0135 # define XML_ATTR_DEPRECATED(message) __declspec(deprecated(message)) 0136 # else 0137 # define XML_ATTR_DEPRECATED(message) // empty i.e. no deprecation 0138 # endif 0139 0140 # define XMLPARSEAPI(type) XMLIMPORT type XMLCALL 0141 0142 # ifdef __cplusplus 0143 extern "C" { 0144 # endif 0145 0146 # ifdef XML_UNICODE_WCHAR_T 0147 # ifndef XML_UNICODE 0148 # define XML_UNICODE 0149 # endif 0150 # if defined(__SIZEOF_WCHAR_T__) && (__SIZEOF_WCHAR_T__ != 2) 0151 # error "sizeof(wchar_t) != 2; Need -fshort-wchar for both Expat and libc" 0152 # endif 0153 # endif 0154 0155 # ifdef XML_UNICODE /* Information is UTF-16 encoded. */ 0156 # ifdef XML_UNICODE_WCHAR_T 0157 typedef wchar_t XML_Char; 0158 typedef wchar_t XML_LChar; 0159 # else 0160 typedef unsigned short XML_Char; 0161 typedef char XML_LChar; 0162 # endif /* XML_UNICODE_WCHAR_T */ 0163 # else /* Information is UTF-8 encoded. */ 0164 typedef char XML_Char; 0165 typedef char XML_LChar; 0166 # endif /* XML_UNICODE */ 0167 0168 # ifdef XML_LARGE_SIZE /* Use large integers for file/stream positions. */ 0169 typedef long long XML_Index; 0170 typedef unsigned long long XML_Size; 0171 # else 0172 typedef long XML_Index; 0173 typedef unsigned long XML_Size; 0174 # endif /* XML_LARGE_SIZE */ 0175 0176 # ifdef __cplusplus 0177 } 0178 # endif 0179 0180 #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 |
|