1 /* 2 __ __ _ 3 ___\ \/ /_ __ __ _| |_ 4 / _ \\ /| '_ \ / _` | __| 5 | __// \| |_) | (_| | |_ 6 \___/_/\_\ .__/ \__,_|\__| 7 |_| XML parser 8 9 Copyright (c) 1997-2000 Thai Open Source Software Center Ltd 10 Copyright (c) 2016-2021 Sebastian Pipping <sebastian (at) pipping.org> 11 Copyright (c) 2017 Rhodri James <rhodri (at) wildebeest.org.uk> 12 Licensed under the MIT license: 13 14 Permission is hereby granted, free of charge, to any person obtaining 15 a copy of this software and associated documentation files (the 16 "Software"), to deal in the Software without restriction, including 17 without limitation the rights to use, copy, modify, merge, publish, 18 distribute, sublicense, and/or sell copies of the Software, and to permit 19 persons to whom the Software is furnished to do so, subject to the 20 following conditions: 21 22 The above copyright notice and this permission notice shall be included 23 in all copies or substantial portions of the Software. 24 25 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 26 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 27 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 28 NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 29 DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 30 OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 31 USE OR OTHER DEALINGS IN THE SOFTWARE. 32 33 SPDX-License-Identifier: MIT 34 */ 35 36 /* Ensures compile-time constants are consistent */ 37 #include "expat_external.h" 38 39 #ifdef XML_UNICODE 40 # ifndef XML_UNICODE_WCHAR_T 41 # error xmlwf requires a 16-bit Unicode-compatible wchar_t 42 # endif 43 # define _PREPEND_BIG_L(x) L##x 44 # define T(x) _PREPEND_BIG_L(x) 45 # define ftprintf fwprintf 46 # define tfopen _wfopen 47 # define fputts fputws 48 # define puttc putwc 49 # define tcscmp wcscmp 50 # define tcscpy wcscpy 51 # define tcscat wcscat 52 # define tcschr wcschr 53 # define tcsrchr wcsrchr 54 # define tcslen wcslen 55 # define tperror _wperror 56 # define topen _wopen 57 # define tmain wmain 58 # define tremove _wremove 59 # define tchar wchar_t 60 # define tcstof wcstof 61 # define tcstoull wcstoull 62 #else /* not XML_UNICODE */ 63 # define T(x) x 64 # define ftprintf fprintf 65 # define tfopen fopen 66 # define fputts fputs 67 # define puttc putc 68 # define tcscmp strcmp 69 # define tcscpy strcpy 70 # define tcscat strcat 71 # define tcschr strchr 72 # define tcsrchr strrchr 73 # define tcslen strlen 74 # define tperror perror 75 # define topen open 76 # define tmain main 77 # define tremove remove 78 # define tchar char 79 # define tcstof strtof 80 # define tcstoull strtoull 81 #endif /* not XML_UNICODE */ 82