@cpp.js/package-iconv 1.0.0 → 2.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/cppjs.config.js +12 -16
  2. package/package.json +9 -11
  3. package/charset.xcframework/Info.plist +0 -50
  4. package/charset.xcframework/ios-arm64_arm64e/Headers/iconv.h +0 -243
  5. package/charset.xcframework/ios-arm64_arm64e/Headers/libcharset.h +0 -45
  6. package/charset.xcframework/ios-arm64_arm64e/Headers/localcharset.h +0 -137
  7. package/charset.xcframework/ios-arm64_arm64e/libcharset.a +0 -0
  8. package/charset.xcframework/ios-arm64_arm64e_x86_64-simulator/Headers/iconv.h +0 -243
  9. package/charset.xcframework/ios-arm64_arm64e_x86_64-simulator/Headers/libcharset.h +0 -45
  10. package/charset.xcframework/ios-arm64_arm64e_x86_64-simulator/Headers/localcharset.h +0 -137
  11. package/charset.xcframework/ios-arm64_arm64e_x86_64-simulator/libcharset.a +0 -0
  12. package/dist/prebuilt/Android-arm64-v8a/include/iconv.h +0 -243
  13. package/dist/prebuilt/Android-arm64-v8a/include/libcharset.h +0 -45
  14. package/dist/prebuilt/Android-arm64-v8a/include/localcharset.h +0 -137
  15. package/dist/prebuilt/Android-arm64-v8a/lib/libcharset.la +0 -41
  16. package/dist/prebuilt/Android-arm64-v8a/lib/libcharset.so +0 -0
  17. package/dist/prebuilt/Android-arm64-v8a/lib/libiconv.la +0 -41
  18. package/dist/prebuilt/Android-arm64-v8a/lib/libiconv.so +0 -0
  19. package/dist/prebuilt/Android-arm64-v8a/share/doc/iconv.1.html +0 -217
  20. package/dist/prebuilt/Android-arm64-v8a/share/doc/iconv.3.html +0 -255
  21. package/dist/prebuilt/Android-arm64-v8a/share/doc/iconv_close.3.html +0 -89
  22. package/dist/prebuilt/Android-arm64-v8a/share/doc/iconv_open.3.html +0 -352
  23. package/dist/prebuilt/Android-arm64-v8a/share/doc/iconv_open_into.3.html +0 -132
  24. package/dist/prebuilt/Android-arm64-v8a/share/doc/iconvctl.3.html +0 -244
  25. package/dist/prebuilt/Android-arm64-v8a/share/man/man1/iconv.1 +0 -112
  26. package/dist/prebuilt/Android-arm64-v8a/share/man/man3/iconv.3 +0 -129
  27. package/dist/prebuilt/Android-arm64-v8a/share/man/man3/iconv_close.3 +0 -31
  28. package/dist/prebuilt/Android-arm64-v8a/share/man/man3/iconv_open.3 +0 -260
  29. package/dist/prebuilt/Android-arm64-v8a/share/man/man3/iconv_open_into.3 +0 -47
  30. package/dist/prebuilt/Android-arm64-v8a/share/man/man3/iconvctl.3 +0 -112
  31. package/dist/prebuilt/Android-x86_64/include/iconv.h +0 -243
  32. package/dist/prebuilt/Android-x86_64/include/libcharset.h +0 -45
  33. package/dist/prebuilt/Android-x86_64/include/localcharset.h +0 -137
  34. package/dist/prebuilt/Android-x86_64/lib/libcharset.la +0 -41
  35. package/dist/prebuilt/Android-x86_64/lib/libcharset.so +0 -0
  36. package/dist/prebuilt/Android-x86_64/lib/libiconv.la +0 -41
  37. package/dist/prebuilt/Android-x86_64/lib/libiconv.so +0 -0
  38. package/dist/prebuilt/Android-x86_64/share/doc/iconv.1.html +0 -217
  39. package/dist/prebuilt/Android-x86_64/share/doc/iconv.3.html +0 -255
  40. package/dist/prebuilt/Android-x86_64/share/doc/iconv_close.3.html +0 -89
  41. package/dist/prebuilt/Android-x86_64/share/doc/iconv_open.3.html +0 -352
  42. package/dist/prebuilt/Android-x86_64/share/doc/iconv_open_into.3.html +0 -132
  43. package/dist/prebuilt/Android-x86_64/share/doc/iconvctl.3.html +0 -244
  44. package/dist/prebuilt/Android-x86_64/share/man/man1/iconv.1 +0 -112
  45. package/dist/prebuilt/Android-x86_64/share/man/man3/iconv.3 +0 -129
  46. package/dist/prebuilt/Android-x86_64/share/man/man3/iconv_close.3 +0 -31
  47. package/dist/prebuilt/Android-x86_64/share/man/man3/iconv_open.3 +0 -260
  48. package/dist/prebuilt/Android-x86_64/share/man/man3/iconv_open_into.3 +0 -47
  49. package/dist/prebuilt/Android-x86_64/share/man/man3/iconvctl.3 +0 -112
  50. package/dist/prebuilt/CMakeLists.txt +0 -44
  51. package/dist/prebuilt/Emscripten-x86_64/include/iconv.h +0 -243
  52. package/dist/prebuilt/Emscripten-x86_64/include/libcharset.h +0 -45
  53. package/dist/prebuilt/Emscripten-x86_64/include/localcharset.h +0 -137
  54. package/dist/prebuilt/Emscripten-x86_64/lib/libcharset.a +0 -0
  55. package/dist/prebuilt/Emscripten-x86_64/lib/libcharset.la +0 -41
  56. package/dist/prebuilt/Emscripten-x86_64/lib/libiconv.a +0 -0
  57. package/dist/prebuilt/Emscripten-x86_64/lib/libiconv.la +0 -41
  58. package/dist/prebuilt/Emscripten-x86_64/share/doc/iconv.1.html +0 -217
  59. package/dist/prebuilt/Emscripten-x86_64/share/doc/iconv.3.html +0 -255
  60. package/dist/prebuilt/Emscripten-x86_64/share/doc/iconv_close.3.html +0 -89
  61. package/dist/prebuilt/Emscripten-x86_64/share/doc/iconv_open.3.html +0 -352
  62. package/dist/prebuilt/Emscripten-x86_64/share/doc/iconv_open_into.3.html +0 -132
  63. package/dist/prebuilt/Emscripten-x86_64/share/doc/iconvctl.3.html +0 -244
  64. package/dist/prebuilt/Emscripten-x86_64/share/locale/af/LC_MESSAGES/libiconv.mo +0 -0
  65. package/dist/prebuilt/Emscripten-x86_64/share/locale/be/LC_MESSAGES/libiconv.mo +0 -0
  66. package/dist/prebuilt/Emscripten-x86_64/share/locale/bg/LC_MESSAGES/libiconv.mo +0 -0
  67. package/dist/prebuilt/Emscripten-x86_64/share/locale/ca/LC_MESSAGES/libiconv.mo +0 -0
  68. package/dist/prebuilt/Emscripten-x86_64/share/locale/cs/LC_MESSAGES/libiconv.mo +0 -0
  69. package/dist/prebuilt/Emscripten-x86_64/share/locale/da/LC_MESSAGES/libiconv.mo +0 -0
  70. package/dist/prebuilt/Emscripten-x86_64/share/locale/de/LC_MESSAGES/libiconv.mo +0 -0
  71. package/dist/prebuilt/Emscripten-x86_64/share/locale/el/LC_MESSAGES/libiconv.mo +0 -0
  72. package/dist/prebuilt/Emscripten-x86_64/share/locale/eo/LC_MESSAGES/libiconv.mo +0 -0
  73. package/dist/prebuilt/Emscripten-x86_64/share/locale/es/LC_MESSAGES/libiconv.mo +0 -0
  74. package/dist/prebuilt/Emscripten-x86_64/share/locale/et/LC_MESSAGES/libiconv.mo +0 -0
  75. package/dist/prebuilt/Emscripten-x86_64/share/locale/fi/LC_MESSAGES/libiconv.mo +0 -0
  76. package/dist/prebuilt/Emscripten-x86_64/share/locale/fr/LC_MESSAGES/libiconv.mo +0 -0
  77. package/dist/prebuilt/Emscripten-x86_64/share/locale/ga/LC_MESSAGES/libiconv.mo +0 -0
  78. package/dist/prebuilt/Emscripten-x86_64/share/locale/gl/LC_MESSAGES/libiconv.mo +0 -0
  79. package/dist/prebuilt/Emscripten-x86_64/share/locale/hr/LC_MESSAGES/libiconv.mo +0 -0
  80. package/dist/prebuilt/Emscripten-x86_64/share/locale/hu/LC_MESSAGES/libiconv.mo +0 -0
  81. package/dist/prebuilt/Emscripten-x86_64/share/locale/id/LC_MESSAGES/libiconv.mo +0 -0
  82. package/dist/prebuilt/Emscripten-x86_64/share/locale/it/LC_MESSAGES/libiconv.mo +0 -0
  83. package/dist/prebuilt/Emscripten-x86_64/share/locale/ja/LC_MESSAGES/libiconv.mo +0 -0
  84. package/dist/prebuilt/Emscripten-x86_64/share/locale/ka/LC_MESSAGES/libiconv.mo +0 -0
  85. package/dist/prebuilt/Emscripten-x86_64/share/locale/ko/LC_MESSAGES/libiconv.mo +0 -0
  86. package/dist/prebuilt/Emscripten-x86_64/share/locale/lt/LC_MESSAGES/libiconv.mo +0 -0
  87. package/dist/prebuilt/Emscripten-x86_64/share/locale/nl/LC_MESSAGES/libiconv.mo +0 -0
  88. package/dist/prebuilt/Emscripten-x86_64/share/locale/pl/LC_MESSAGES/libiconv.mo +0 -0
  89. package/dist/prebuilt/Emscripten-x86_64/share/locale/pt_BR/LC_MESSAGES/libiconv.mo +0 -0
  90. package/dist/prebuilt/Emscripten-x86_64/share/locale/rm/LC_MESSAGES/libiconv.mo +0 -0
  91. package/dist/prebuilt/Emscripten-x86_64/share/locale/ro/LC_MESSAGES/libiconv.mo +0 -0
  92. package/dist/prebuilt/Emscripten-x86_64/share/locale/ru/LC_MESSAGES/libiconv.mo +0 -0
  93. package/dist/prebuilt/Emscripten-x86_64/share/locale/sk/LC_MESSAGES/libiconv.mo +0 -0
  94. package/dist/prebuilt/Emscripten-x86_64/share/locale/sl/LC_MESSAGES/libiconv.mo +0 -0
  95. package/dist/prebuilt/Emscripten-x86_64/share/locale/sq/LC_MESSAGES/libiconv.mo +0 -0
  96. package/dist/prebuilt/Emscripten-x86_64/share/locale/sr/LC_MESSAGES/libiconv.mo +0 -0
  97. package/dist/prebuilt/Emscripten-x86_64/share/locale/sv/LC_MESSAGES/libiconv.mo +0 -0
  98. package/dist/prebuilt/Emscripten-x86_64/share/locale/tr/LC_MESSAGES/libiconv.mo +0 -0
  99. package/dist/prebuilt/Emscripten-x86_64/share/locale/uk/LC_MESSAGES/libiconv.mo +0 -0
  100. package/dist/prebuilt/Emscripten-x86_64/share/locale/vi/LC_MESSAGES/libiconv.mo +0 -0
  101. package/dist/prebuilt/Emscripten-x86_64/share/locale/wa/LC_MESSAGES/libiconv.mo +0 -0
  102. package/dist/prebuilt/Emscripten-x86_64/share/locale/zh_CN/LC_MESSAGES/libiconv.mo +0 -0
  103. package/dist/prebuilt/Emscripten-x86_64/share/locale/zh_TW/LC_MESSAGES/libiconv.mo +0 -0
  104. package/dist/prebuilt/Emscripten-x86_64/share/man/man1/iconv.1 +0 -112
  105. package/dist/prebuilt/Emscripten-x86_64/share/man/man3/iconv.3 +0 -129
  106. package/dist/prebuilt/Emscripten-x86_64/share/man/man3/iconv_close.3 +0 -31
  107. package/dist/prebuilt/Emscripten-x86_64/share/man/man3/iconv_open.3 +0 -260
  108. package/dist/prebuilt/Emscripten-x86_64/share/man/man3/iconv_open_into.3 +0 -47
  109. package/dist/prebuilt/Emscripten-x86_64/share/man/man3/iconvctl.3 +0 -112
  110. package/dist/prebuilt/iOS-iphoneos/include/iconv.h +0 -243
  111. package/dist/prebuilt/iOS-iphoneos/include/libcharset.h +0 -45
  112. package/dist/prebuilt/iOS-iphoneos/include/localcharset.h +0 -137
  113. package/dist/prebuilt/iOS-iphoneos/lib/libcharset.a +0 -0
  114. package/dist/prebuilt/iOS-iphoneos/lib/libcharset.la +0 -41
  115. package/dist/prebuilt/iOS-iphoneos/lib/libiconv.a +0 -0
  116. package/dist/prebuilt/iOS-iphoneos/lib/libiconv.la +0 -41
  117. package/dist/prebuilt/iOS-iphoneos/share/doc/iconv.1.html +0 -217
  118. package/dist/prebuilt/iOS-iphoneos/share/doc/iconv.3.html +0 -255
  119. package/dist/prebuilt/iOS-iphoneos/share/doc/iconv_close.3.html +0 -89
  120. package/dist/prebuilt/iOS-iphoneos/share/doc/iconv_open.3.html +0 -352
  121. package/dist/prebuilt/iOS-iphoneos/share/doc/iconv_open_into.3.html +0 -132
  122. package/dist/prebuilt/iOS-iphoneos/share/doc/iconvctl.3.html +0 -244
  123. package/dist/prebuilt/iOS-iphoneos/share/man/man1/iconv.1 +0 -112
  124. package/dist/prebuilt/iOS-iphoneos/share/man/man3/iconv.3 +0 -129
  125. package/dist/prebuilt/iOS-iphoneos/share/man/man3/iconv_close.3 +0 -31
  126. package/dist/prebuilt/iOS-iphoneos/share/man/man3/iconv_open.3 +0 -260
  127. package/dist/prebuilt/iOS-iphoneos/share/man/man3/iconv_open_into.3 +0 -47
  128. package/dist/prebuilt/iOS-iphoneos/share/man/man3/iconvctl.3 +0 -112
  129. package/dist/prebuilt/iOS-iphonesimulator/include/iconv.h +0 -243
  130. package/dist/prebuilt/iOS-iphonesimulator/include/libcharset.h +0 -45
  131. package/dist/prebuilt/iOS-iphonesimulator/include/localcharset.h +0 -137
  132. package/dist/prebuilt/iOS-iphonesimulator/lib/libcharset.a +0 -0
  133. package/dist/prebuilt/iOS-iphonesimulator/lib/libcharset.la +0 -41
  134. package/dist/prebuilt/iOS-iphonesimulator/lib/libiconv.a +0 -0
  135. package/dist/prebuilt/iOS-iphonesimulator/lib/libiconv.la +0 -41
  136. package/dist/prebuilt/iOS-iphonesimulator/share/doc/iconv.1.html +0 -217
  137. package/dist/prebuilt/iOS-iphonesimulator/share/doc/iconv.3.html +0 -255
  138. package/dist/prebuilt/iOS-iphonesimulator/share/doc/iconv_close.3.html +0 -89
  139. package/dist/prebuilt/iOS-iphonesimulator/share/doc/iconv_open.3.html +0 -352
  140. package/dist/prebuilt/iOS-iphonesimulator/share/doc/iconv_open_into.3.html +0 -132
  141. package/dist/prebuilt/iOS-iphonesimulator/share/doc/iconvctl.3.html +0 -244
  142. package/dist/prebuilt/iOS-iphonesimulator/share/man/man1/iconv.1 +0 -112
  143. package/dist/prebuilt/iOS-iphonesimulator/share/man/man3/iconv.3 +0 -129
  144. package/dist/prebuilt/iOS-iphonesimulator/share/man/man3/iconv_close.3 +0 -31
  145. package/dist/prebuilt/iOS-iphonesimulator/share/man/man3/iconv_open.3 +0 -260
  146. package/dist/prebuilt/iOS-iphonesimulator/share/man/man3/iconv_open_into.3 +0 -47
  147. package/dist/prebuilt/iOS-iphonesimulator/share/man/man3/iconvctl.3 +0 -112
  148. package/iconv.xcframework/Info.plist +0 -50
  149. package/iconv.xcframework/ios-arm64_arm64e/Headers/iconv.h +0 -243
  150. package/iconv.xcframework/ios-arm64_arm64e/Headers/libcharset.h +0 -45
  151. package/iconv.xcframework/ios-arm64_arm64e/Headers/localcharset.h +0 -137
  152. package/iconv.xcframework/ios-arm64_arm64e/libiconv.a +0 -0
  153. package/iconv.xcframework/ios-arm64_arm64e_x86_64-simulator/Headers/iconv.h +0 -243
  154. package/iconv.xcframework/ios-arm64_arm64e_x86_64-simulator/Headers/libcharset.h +0 -45
  155. package/iconv.xcframework/ios-arm64_arm64e_x86_64-simulator/Headers/localcharset.h +0 -137
  156. package/iconv.xcframework/ios-arm64_arm64e_x86_64-simulator/libiconv.a +0 -0
@@ -1,243 +0,0 @@
1
- /* Copyright (C) 1999-2024 Free Software Foundation, Inc.
2
- This file is part of the GNU LIBICONV Library.
3
-
4
- The GNU LIBICONV Library is free software; you can redistribute it
5
- and/or modify it under the terms of the GNU Lesser General Public
6
- License as published by the Free Software Foundation; either version 2.1
7
- of the License, or (at your option) any later version.
8
-
9
- The GNU LIBICONV Library is distributed in the hope that it will be
10
- useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
- Lesser General Public License for more details.
13
-
14
- You should have received a copy of the GNU Lesser General Public
15
- License along with the GNU LIBICONV Library; see the file COPYING.LIB.
16
- If not, see <https://www.gnu.org/licenses/>. */
17
-
18
- /* When installed, this file is called "iconv.h". */
19
-
20
- #ifndef _LIBICONV_H
21
- #define _LIBICONV_H
22
-
23
- #ifdef __cplusplus
24
- extern "C" {
25
- #endif
26
-
27
- #define _LIBICONV_VERSION 0x0112 /* version number: (major<<8) + minor */
28
- extern int _libiconv_version; /* Likewise */
29
-
30
- #ifdef __cplusplus
31
- }
32
- #endif
33
-
34
- /* We would like to #include any system header file which could define
35
- iconv_t, in order to eliminate the risk that the user gets compilation
36
- errors because some other system header file includes /usr/include/iconv.h
37
- which defines iconv_t or declares iconv after this file.
38
- But gcc's #include_next is not portable. Thus, once libiconv's iconv.h
39
- has been installed in /usr/local/include, there is no way any more to
40
- include the original /usr/include/iconv.h. We simply have to get away
41
- without it.
42
- The risk that a system header file does
43
- #include "iconv.h" or #include_next "iconv.h"
44
- is small. They all do #include <iconv.h>. */
45
-
46
- /* Define iconv_t ourselves. */
47
- #undef iconv_t
48
- #define iconv_t libiconv_t
49
- typedef void* iconv_t;
50
-
51
- /* Get size_t declaration.
52
- Get wchar_t declaration if it exists. */
53
- #include <stddef.h>
54
-
55
- /* Get errno declaration and values. */
56
- #include <errno.h>
57
- /* Some systems, like SunOS 4, don't have EILSEQ. Some systems, like BSD/OS,
58
- have EILSEQ in a different header. On these systems, define EILSEQ
59
- ourselves. */
60
- #ifndef EILSEQ
61
- #define EILSEQ
62
- #endif
63
-
64
-
65
- #ifdef __cplusplus
66
- extern "C" {
67
- #endif
68
-
69
-
70
- /* Allocates descriptor for code conversion from encoding ‘fromcode’ to
71
- encoding ‘tocode’. */
72
- #define iconv_open libiconv_open
73
- extern iconv_t iconv_open (const char* tocode, const char* fromcode);
74
-
75
- /* Converts, using conversion descriptor ‘cd’, at most ‘*inbytesleft’ bytes
76
- starting at ‘*inbuf’, writing at most ‘*outbytesleft’ bytes starting at
77
- ‘*outbuf’.
78
- Decrements ‘*inbytesleft’ and increments ‘*inbuf’ by the same amount.
79
- Decrements ‘*outbytesleft’ and increments ‘*outbuf’ by the same amount. */
80
- #define iconv libiconv
81
- extern size_t iconv (iconv_t cd, char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft);
82
-
83
- /* Frees resources allocated for conversion descriptor ‘cd’. */
84
- #define iconv_close libiconv_close
85
- extern int iconv_close (iconv_t cd);
86
-
87
-
88
- #ifdef __cplusplus
89
- }
90
- #endif
91
-
92
-
93
- /* Nonstandard extensions. */
94
-
95
- #if 1
96
- #if 0
97
- /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
98
- <wchar.h>.
99
- BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
100
- included before <wchar.h>. */
101
- #include <stddef.h>
102
- #include <stdio.h>
103
- #include <time.h>
104
- #endif
105
- #include <wchar.h>
106
- #endif
107
-
108
- #ifdef __cplusplus
109
- extern "C" {
110
- #endif
111
-
112
- /* A type that holds all memory needed by a conversion descriptor.
113
- A pointer to such an object can be used as an iconv_t. */
114
- typedef struct {
115
- void* dummy1[28];
116
- #if 1
117
- mbstate_t dummy2;
118
- #endif
119
- } iconv_allocation_t;
120
-
121
- /* Allocates descriptor for code conversion from encoding ‘fromcode’ to
122
- encoding ‘tocode’ into preallocated memory. Returns an error indicator
123
- (0 or -1 with errno set). */
124
- #define iconv_open_into libiconv_open_into
125
- extern int iconv_open_into (const char* tocode, const char* fromcode,
126
- iconv_allocation_t* resultp);
127
-
128
- /* Control of attributes. */
129
- #define iconvctl libiconvctl
130
- extern int iconvctl (iconv_t cd, int request, void* argument);
131
-
132
- /* Hook performed after every successful conversion of a Unicode character. */
133
- typedef void (*iconv_unicode_char_hook) (unsigned int uc, void* data);
134
- /* Hook performed after every successful conversion of a wide character. */
135
- typedef void (*iconv_wide_char_hook) (wchar_t wc, void* data);
136
- /* Set of hooks. */
137
- struct iconv_hooks {
138
- iconv_unicode_char_hook uc_hook;
139
- iconv_wide_char_hook wc_hook;
140
- void* data;
141
- };
142
-
143
- /* Fallback function. Invoked when a small number of bytes could not be
144
- converted to a Unicode character. This function should process all
145
- bytes from inbuf and may produce replacement Unicode characters by calling
146
- the write_replacement callback repeatedly. */
147
- typedef void (*iconv_unicode_mb_to_uc_fallback)
148
- (const char* inbuf, size_t inbufsize,
149
- void (*write_replacement) (const unsigned int *buf, size_t buflen,
150
- void* callback_arg),
151
- void* callback_arg,
152
- void* data);
153
- /* Fallback function. Invoked when a Unicode character could not be converted
154
- to the target encoding. This function should process the character and
155
- may produce replacement bytes (in the target encoding) by calling the
156
- write_replacement callback repeatedly. */
157
- typedef void (*iconv_unicode_uc_to_mb_fallback)
158
- (unsigned int code,
159
- void (*write_replacement) (const char *buf, size_t buflen,
160
- void* callback_arg),
161
- void* callback_arg,
162
- void* data);
163
- /* Fallback function. Invoked when a number of bytes could not be converted to
164
- a wide character. This function should process all bytes from inbuf and may
165
- produce replacement wide characters by calling the write_replacement
166
- callback repeatedly. */
167
- typedef void (*iconv_wchar_mb_to_wc_fallback)
168
- (const char* inbuf, size_t inbufsize,
169
- void (*write_replacement) (const wchar_t *buf, size_t buflen,
170
- void* callback_arg),
171
- void* callback_arg,
172
- void* data);
173
- /* Fallback function. Invoked when a wide character could not be converted to
174
- the target encoding. This function should process the character and may
175
- produce replacement bytes (in the target encoding) by calling the
176
- write_replacement callback repeatedly. */
177
- typedef void (*iconv_wchar_wc_to_mb_fallback)
178
- (wchar_t code,
179
- void (*write_replacement) (const char *buf, size_t buflen,
180
- void* callback_arg),
181
- void* callback_arg,
182
- void* data);
183
- /* Set of fallbacks. */
184
- struct iconv_fallbacks {
185
- iconv_unicode_mb_to_uc_fallback mb_to_uc_fallback;
186
- iconv_unicode_uc_to_mb_fallback uc_to_mb_fallback;
187
- iconv_wchar_mb_to_wc_fallback mb_to_wc_fallback;
188
- iconv_wchar_wc_to_mb_fallback wc_to_mb_fallback;
189
- void* data;
190
- };
191
-
192
- /* Surfaces.
193
- The concept of surfaces is described in the 'recode' manual. */
194
- #define ICONV_SURFACE_NONE 0
195
- /* In EBCDIC encodings, 0x15 (which encodes the "newline function", see the
196
- Unicode standard, chapter 5) maps to U+000A instead of U+0085. This is
197
- for interoperability with C programs and Unix environments on z/OS. */
198
- #define ICONV_SURFACE_EBCDIC_ZOS_UNIX 1
199
-
200
- /* Requests for iconvctl. */
201
- #define ICONV_TRIVIALP 0 /* int *argument */
202
- #define ICONV_GET_TRANSLITERATE 1 /* int *argument */
203
- #define ICONV_SET_TRANSLITERATE 2 /* const int *argument */
204
- #define ICONV_GET_DISCARD_ILSEQ 3 /* int *argument */
205
- #define ICONV_SET_DISCARD_ILSEQ 4 /* const int *argument */
206
- #define ICONV_SET_HOOKS 5 /* const struct iconv_hooks *argument */
207
- #define ICONV_SET_FALLBACKS 6 /* const struct iconv_fallbacks *argument */
208
- #define ICONV_GET_FROM_SURFACE 7 /* unsigned int *argument */
209
- #define ICONV_SET_FROM_SURFACE 8 /* const unsigned int *argument */
210
- #define ICONV_GET_TO_SURFACE 9 /* unsigned int *argument */
211
- #define ICONV_SET_TO_SURFACE 10 /* const unsigned int *argument */
212
- #define ICONV_GET_DISCARD_INVALID 11 /* int *argument */
213
- #define ICONV_SET_DISCARD_INVALID 12 /* const int *argument */
214
- #define ICONV_GET_DISCARD_NON_IDENTICAL 13 /* int *argument */
215
- #define ICONV_SET_DISCARD_NON_IDENTICAL 14 /* const int *argument */
216
-
217
- /* Listing of locale independent encodings. */
218
- #define iconvlist libiconvlist
219
- extern void iconvlist (int (*do_one) (unsigned int namescount,
220
- const char * const * names,
221
- void* data),
222
- void* data);
223
-
224
- /* Canonicalize an encoding name.
225
- The result is either a canonical encoding name, or name itself. */
226
- extern const char * iconv_canonicalize (const char * name);
227
-
228
- /* Support for relocatable packages. */
229
-
230
- /* Sets the original and the current installation prefix of the package.
231
- Relocation simply replaces a pathname starting with the original prefix
232
- by the corresponding pathname with the current prefix instead. Both
233
- prefixes should be directory names without trailing slash (i.e. use ""
234
- instead of "/"). */
235
- extern void libiconv_set_relocation_prefix (const char *orig_prefix,
236
- const char *curr_prefix);
237
-
238
- #ifdef __cplusplus
239
- }
240
- #endif
241
-
242
-
243
- #endif /* _LIBICONV_H */
@@ -1,45 +0,0 @@
1
- /* Copyright (C) 2003 Free Software Foundation, Inc.
2
- This file is part of the GNU CHARSET Library.
3
-
4
- The GNU CHARSET Library is free software; you can redistribute it and/or
5
- modify it under the terms of the GNU Lesser General Public License as
6
- published by the Free Software Foundation; either version 2 of the
7
- License, or (at your option) any later version.
8
-
9
- The GNU CHARSET Library is distributed in the hope that it will be useful,
10
- but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
- Lesser General Public License for more details.
13
-
14
- You should have received a copy of the GNU Lesser General Public License
15
- along with the GNU CHARSET Library; see the file COPYING.LIB. If not,
16
- see <https://www.gnu.org/licenses/>. */
17
-
18
- #ifndef _LIBCHARSET_H
19
- #define _LIBCHARSET_H
20
-
21
- #include <localcharset.h>
22
-
23
-
24
- #ifdef __cplusplus
25
- extern "C" {
26
- #endif
27
-
28
-
29
- /* Support for relocatable packages. */
30
-
31
- /* Sets the original and the current installation prefix of the package.
32
- Relocation simply replaces a pathname starting with the original prefix
33
- by the corresponding pathname with the current prefix instead. Both
34
- prefixes should be directory names without trailing slash (i.e. use ""
35
- instead of "/"). */
36
- extern void libcharset_set_relocation_prefix (const char *orig_prefix,
37
- const char *curr_prefix);
38
-
39
-
40
- #ifdef __cplusplus
41
- }
42
- #endif
43
-
44
-
45
- #endif /* _LIBCHARSET_H */
@@ -1,137 +0,0 @@
1
- /* Determine a canonical name for the current locale's character encoding.
2
- Copyright (C) 2000-2003, 2009-2019 Free Software Foundation, Inc.
3
- This file is part of the GNU CHARSET Library.
4
-
5
- This program is free software; you can redistribute it and/or modify it
6
- under the terms of the GNU Lesser General Public License as published
7
- by the Free Software Foundation; either version 2, or (at your option)
8
- any later version.
9
-
10
- This program is distributed in the hope that it will be useful,
11
- but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
- Lesser General Public License for more details.
14
-
15
- You should have received a copy of the GNU Lesser General Public License
16
- along with this program; if not, see <https://www.gnu.org/licenses/>. */
17
-
18
- #ifndef _LOCALCHARSET_H
19
- #define _LOCALCHARSET_H
20
-
21
-
22
- #ifdef __cplusplus
23
- extern "C" {
24
- #endif
25
-
26
-
27
- /* Determine the current locale's character encoding, and canonicalize it
28
- into one of the canonical names listed below.
29
- The result must not be freed; it is statically allocated. The result
30
- becomes invalid when setlocale() is used to change the global locale, or
31
- when the value of one of the environment variables LC_ALL, LC_CTYPE, LANG
32
- is changed; threads in multithreaded programs should not do this.
33
- If the canonical name cannot be determined, the result is a non-canonical
34
- name. */
35
- extern const char * locale_charset (void);
36
-
37
- /* About GNU canonical names for character encodings:
38
-
39
- Every canonical name must be supported by GNU libiconv. Support by GNU libc
40
- is also desirable.
41
-
42
- The name is case insensitive. Usually an upper case MIME charset name is
43
- preferred.
44
-
45
- The current list of these GNU canonical names is:
46
-
47
- name MIME? used by which systems
48
- (darwin = Mac OS X, windows = native Windows)
49
-
50
- ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin minix cygwin
51
- ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
52
- ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
53
- ISO-8859-3 Y glibc solaris cygwin
54
- ISO-8859-4 Y hpux osf solaris freebsd netbsd openbsd darwin
55
- ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
56
- ISO-8859-6 Y glibc aix hpux solaris cygwin
57
- ISO-8859-7 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
58
- ISO-8859-8 Y glibc aix hpux osf solaris cygwin zos
59
- ISO-8859-9 Y glibc aix hpux irix osf solaris freebsd darwin cygwin zos
60
- ISO-8859-13 glibc hpux solaris freebsd netbsd openbsd darwin cygwin
61
- ISO-8859-14 glibc cygwin
62
- ISO-8859-15 glibc aix irix osf solaris freebsd netbsd openbsd darwin cygwin
63
- KOI8-R Y glibc hpux solaris freebsd netbsd openbsd darwin
64
- KOI8-U Y glibc freebsd netbsd openbsd darwin cygwin
65
- KOI8-T glibc
66
- CP437 dos
67
- CP775 dos
68
- CP850 aix osf dos
69
- CP852 dos
70
- CP855 dos
71
- CP856 aix
72
- CP857 dos
73
- CP861 dos
74
- CP862 dos
75
- CP864 dos
76
- CP865 dos
77
- CP866 freebsd netbsd openbsd darwin dos
78
- CP869 dos
79
- CP874 windows dos
80
- CP922 aix
81
- CP932 aix cygwin windows dos
82
- CP943 aix zos
83
- CP949 osf darwin windows dos
84
- CP950 windows dos
85
- CP1046 aix
86
- CP1124 aix
87
- CP1125 dos
88
- CP1129 aix
89
- CP1131 freebsd darwin
90
- CP1250 windows
91
- CP1251 glibc hpux solaris freebsd netbsd openbsd darwin cygwin windows
92
- CP1252 aix windows
93
- CP1253 windows
94
- CP1254 windows
95
- CP1255 glibc windows
96
- CP1256 windows
97
- CP1257 windows
98
- GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin cygwin zos
99
- EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin
100
- EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin zos
101
- EUC-TW glibc aix hpux irix osf solaris netbsd
102
- BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin cygwin zos
103
- BIG5-HKSCS glibc hpux solaris netbsd darwin
104
- GBK glibc aix osf solaris freebsd darwin cygwin windows dos
105
- GB18030 glibc hpux solaris freebsd netbsd darwin
106
- SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin
107
- JOHAB glibc solaris windows
108
- TIS-620 glibc aix hpux osf solaris cygwin zos
109
- VISCII Y glibc
110
- TCVN5712-1 glibc
111
- ARMSCII-8 glibc freebsd netbsd darwin
112
- GEORGIAN-PS glibc cygwin
113
- PT154 glibc netbsd cygwin
114
- HP-ROMAN8 hpux
115
- HP-ARABIC8 hpux
116
- HP-GREEK8 hpux
117
- HP-HEBREW8 hpux
118
- HP-TURKISH8 hpux
119
- HP-KANA8 hpux
120
- DEC-KANJI osf
121
- DEC-HANYU osf
122
- UTF-8 Y glibc aix hpux osf solaris netbsd darwin cygwin zos
123
-
124
- Note: Names which are not marked as being a MIME name should not be used in
125
- Internet protocols for information interchange (mail, news, etc.).
126
-
127
- Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications
128
- must understand both names and treat them as equivalent.
129
- */
130
-
131
-
132
- #ifdef __cplusplus
133
- }
134
- #endif
135
-
136
-
137
- #endif /* _LOCALCHARSET_H */
@@ -1,243 +0,0 @@
1
- /* Copyright (C) 1999-2024 Free Software Foundation, Inc.
2
- This file is part of the GNU LIBICONV Library.
3
-
4
- The GNU LIBICONV Library is free software; you can redistribute it
5
- and/or modify it under the terms of the GNU Lesser General Public
6
- License as published by the Free Software Foundation; either version 2.1
7
- of the License, or (at your option) any later version.
8
-
9
- The GNU LIBICONV Library is distributed in the hope that it will be
10
- useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
- Lesser General Public License for more details.
13
-
14
- You should have received a copy of the GNU Lesser General Public
15
- License along with the GNU LIBICONV Library; see the file COPYING.LIB.
16
- If not, see <https://www.gnu.org/licenses/>. */
17
-
18
- /* When installed, this file is called "iconv.h". */
19
-
20
- #ifndef _LIBICONV_H
21
- #define _LIBICONV_H
22
-
23
- #ifdef __cplusplus
24
- extern "C" {
25
- #endif
26
-
27
- #define _LIBICONV_VERSION 0x0112 /* version number: (major<<8) + minor */
28
- extern int _libiconv_version; /* Likewise */
29
-
30
- #ifdef __cplusplus
31
- }
32
- #endif
33
-
34
- /* We would like to #include any system header file which could define
35
- iconv_t, in order to eliminate the risk that the user gets compilation
36
- errors because some other system header file includes /usr/include/iconv.h
37
- which defines iconv_t or declares iconv after this file.
38
- But gcc's #include_next is not portable. Thus, once libiconv's iconv.h
39
- has been installed in /usr/local/include, there is no way any more to
40
- include the original /usr/include/iconv.h. We simply have to get away
41
- without it.
42
- The risk that a system header file does
43
- #include "iconv.h" or #include_next "iconv.h"
44
- is small. They all do #include <iconv.h>. */
45
-
46
- /* Define iconv_t ourselves. */
47
- #undef iconv_t
48
- #define iconv_t libiconv_t
49
- typedef void* iconv_t;
50
-
51
- /* Get size_t declaration.
52
- Get wchar_t declaration if it exists. */
53
- #include <stddef.h>
54
-
55
- /* Get errno declaration and values. */
56
- #include <errno.h>
57
- /* Some systems, like SunOS 4, don't have EILSEQ. Some systems, like BSD/OS,
58
- have EILSEQ in a different header. On these systems, define EILSEQ
59
- ourselves. */
60
- #ifndef EILSEQ
61
- #define EILSEQ
62
- #endif
63
-
64
-
65
- #ifdef __cplusplus
66
- extern "C" {
67
- #endif
68
-
69
-
70
- /* Allocates descriptor for code conversion from encoding ‘fromcode’ to
71
- encoding ‘tocode’. */
72
- #define iconv_open libiconv_open
73
- extern iconv_t iconv_open (const char* tocode, const char* fromcode);
74
-
75
- /* Converts, using conversion descriptor ‘cd’, at most ‘*inbytesleft’ bytes
76
- starting at ‘*inbuf’, writing at most ‘*outbytesleft’ bytes starting at
77
- ‘*outbuf’.
78
- Decrements ‘*inbytesleft’ and increments ‘*inbuf’ by the same amount.
79
- Decrements ‘*outbytesleft’ and increments ‘*outbuf’ by the same amount. */
80
- #define iconv libiconv
81
- extern size_t iconv (iconv_t cd, char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft);
82
-
83
- /* Frees resources allocated for conversion descriptor ‘cd’. */
84
- #define iconv_close libiconv_close
85
- extern int iconv_close (iconv_t cd);
86
-
87
-
88
- #ifdef __cplusplus
89
- }
90
- #endif
91
-
92
-
93
- /* Nonstandard extensions. */
94
-
95
- #if 1
96
- #if 0
97
- /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
98
- <wchar.h>.
99
- BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
100
- included before <wchar.h>. */
101
- #include <stddef.h>
102
- #include <stdio.h>
103
- #include <time.h>
104
- #endif
105
- #include <wchar.h>
106
- #endif
107
-
108
- #ifdef __cplusplus
109
- extern "C" {
110
- #endif
111
-
112
- /* A type that holds all memory needed by a conversion descriptor.
113
- A pointer to such an object can be used as an iconv_t. */
114
- typedef struct {
115
- void* dummy1[28];
116
- #if 1
117
- mbstate_t dummy2;
118
- #endif
119
- } iconv_allocation_t;
120
-
121
- /* Allocates descriptor for code conversion from encoding ‘fromcode’ to
122
- encoding ‘tocode’ into preallocated memory. Returns an error indicator
123
- (0 or -1 with errno set). */
124
- #define iconv_open_into libiconv_open_into
125
- extern int iconv_open_into (const char* tocode, const char* fromcode,
126
- iconv_allocation_t* resultp);
127
-
128
- /* Control of attributes. */
129
- #define iconvctl libiconvctl
130
- extern int iconvctl (iconv_t cd, int request, void* argument);
131
-
132
- /* Hook performed after every successful conversion of a Unicode character. */
133
- typedef void (*iconv_unicode_char_hook) (unsigned int uc, void* data);
134
- /* Hook performed after every successful conversion of a wide character. */
135
- typedef void (*iconv_wide_char_hook) (wchar_t wc, void* data);
136
- /* Set of hooks. */
137
- struct iconv_hooks {
138
- iconv_unicode_char_hook uc_hook;
139
- iconv_wide_char_hook wc_hook;
140
- void* data;
141
- };
142
-
143
- /* Fallback function. Invoked when a small number of bytes could not be
144
- converted to a Unicode character. This function should process all
145
- bytes from inbuf and may produce replacement Unicode characters by calling
146
- the write_replacement callback repeatedly. */
147
- typedef void (*iconv_unicode_mb_to_uc_fallback)
148
- (const char* inbuf, size_t inbufsize,
149
- void (*write_replacement) (const unsigned int *buf, size_t buflen,
150
- void* callback_arg),
151
- void* callback_arg,
152
- void* data);
153
- /* Fallback function. Invoked when a Unicode character could not be converted
154
- to the target encoding. This function should process the character and
155
- may produce replacement bytes (in the target encoding) by calling the
156
- write_replacement callback repeatedly. */
157
- typedef void (*iconv_unicode_uc_to_mb_fallback)
158
- (unsigned int code,
159
- void (*write_replacement) (const char *buf, size_t buflen,
160
- void* callback_arg),
161
- void* callback_arg,
162
- void* data);
163
- /* Fallback function. Invoked when a number of bytes could not be converted to
164
- a wide character. This function should process all bytes from inbuf and may
165
- produce replacement wide characters by calling the write_replacement
166
- callback repeatedly. */
167
- typedef void (*iconv_wchar_mb_to_wc_fallback)
168
- (const char* inbuf, size_t inbufsize,
169
- void (*write_replacement) (const wchar_t *buf, size_t buflen,
170
- void* callback_arg),
171
- void* callback_arg,
172
- void* data);
173
- /* Fallback function. Invoked when a wide character could not be converted to
174
- the target encoding. This function should process the character and may
175
- produce replacement bytes (in the target encoding) by calling the
176
- write_replacement callback repeatedly. */
177
- typedef void (*iconv_wchar_wc_to_mb_fallback)
178
- (wchar_t code,
179
- void (*write_replacement) (const char *buf, size_t buflen,
180
- void* callback_arg),
181
- void* callback_arg,
182
- void* data);
183
- /* Set of fallbacks. */
184
- struct iconv_fallbacks {
185
- iconv_unicode_mb_to_uc_fallback mb_to_uc_fallback;
186
- iconv_unicode_uc_to_mb_fallback uc_to_mb_fallback;
187
- iconv_wchar_mb_to_wc_fallback mb_to_wc_fallback;
188
- iconv_wchar_wc_to_mb_fallback wc_to_mb_fallback;
189
- void* data;
190
- };
191
-
192
- /* Surfaces.
193
- The concept of surfaces is described in the 'recode' manual. */
194
- #define ICONV_SURFACE_NONE 0
195
- /* In EBCDIC encodings, 0x15 (which encodes the "newline function", see the
196
- Unicode standard, chapter 5) maps to U+000A instead of U+0085. This is
197
- for interoperability with C programs and Unix environments on z/OS. */
198
- #define ICONV_SURFACE_EBCDIC_ZOS_UNIX 1
199
-
200
- /* Requests for iconvctl. */
201
- #define ICONV_TRIVIALP 0 /* int *argument */
202
- #define ICONV_GET_TRANSLITERATE 1 /* int *argument */
203
- #define ICONV_SET_TRANSLITERATE 2 /* const int *argument */
204
- #define ICONV_GET_DISCARD_ILSEQ 3 /* int *argument */
205
- #define ICONV_SET_DISCARD_ILSEQ 4 /* const int *argument */
206
- #define ICONV_SET_HOOKS 5 /* const struct iconv_hooks *argument */
207
- #define ICONV_SET_FALLBACKS 6 /* const struct iconv_fallbacks *argument */
208
- #define ICONV_GET_FROM_SURFACE 7 /* unsigned int *argument */
209
- #define ICONV_SET_FROM_SURFACE 8 /* const unsigned int *argument */
210
- #define ICONV_GET_TO_SURFACE 9 /* unsigned int *argument */
211
- #define ICONV_SET_TO_SURFACE 10 /* const unsigned int *argument */
212
- #define ICONV_GET_DISCARD_INVALID 11 /* int *argument */
213
- #define ICONV_SET_DISCARD_INVALID 12 /* const int *argument */
214
- #define ICONV_GET_DISCARD_NON_IDENTICAL 13 /* int *argument */
215
- #define ICONV_SET_DISCARD_NON_IDENTICAL 14 /* const int *argument */
216
-
217
- /* Listing of locale independent encodings. */
218
- #define iconvlist libiconvlist
219
- extern void iconvlist (int (*do_one) (unsigned int namescount,
220
- const char * const * names,
221
- void* data),
222
- void* data);
223
-
224
- /* Canonicalize an encoding name.
225
- The result is either a canonical encoding name, or name itself. */
226
- extern const char * iconv_canonicalize (const char * name);
227
-
228
- /* Support for relocatable packages. */
229
-
230
- /* Sets the original and the current installation prefix of the package.
231
- Relocation simply replaces a pathname starting with the original prefix
232
- by the corresponding pathname with the current prefix instead. Both
233
- prefixes should be directory names without trailing slash (i.e. use ""
234
- instead of "/"). */
235
- extern void libiconv_set_relocation_prefix (const char *orig_prefix,
236
- const char *curr_prefix);
237
-
238
- #ifdef __cplusplus
239
- }
240
- #endif
241
-
242
-
243
- #endif /* _LIBICONV_H */