xmltchar.h 2.8 KB

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