|
|
|||
File indexing completed on 2026-01-02 10:14:03
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__) \ 0092 && ! 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 |
|