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