@cpp.js/package-iconv 1.0.0-beta.20

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 (139) hide show
  1. package/LICENSE +502 -0
  2. package/README.md +47 -0
  3. package/cppjs-package-iconv.podspec +13 -0
  4. package/cppjs.build.js +14 -0
  5. package/cppjs.config.js +18 -0
  6. package/dist/prebuilt/Android-arm64-v8a/include/iconv.h +241 -0
  7. package/dist/prebuilt/Android-arm64-v8a/include/libcharset.h +45 -0
  8. package/dist/prebuilt/Android-arm64-v8a/include/localcharset.h +137 -0
  9. package/dist/prebuilt/Android-arm64-v8a/lib/libcharset.la +41 -0
  10. package/dist/prebuilt/Android-arm64-v8a/lib/libcharset.so +0 -0
  11. package/dist/prebuilt/Android-arm64-v8a/lib/libiconv.la +41 -0
  12. package/dist/prebuilt/Android-arm64-v8a/lib/libiconv.so +0 -0
  13. package/dist/prebuilt/Android-arm64-v8a/share/doc/iconv.1.html +205 -0
  14. package/dist/prebuilt/Android-arm64-v8a/share/doc/iconv.3.html +206 -0
  15. package/dist/prebuilt/Android-arm64-v8a/share/doc/iconv_close.3.html +89 -0
  16. package/dist/prebuilt/Android-arm64-v8a/share/doc/iconv_open.3.html +345 -0
  17. package/dist/prebuilt/Android-arm64-v8a/share/doc/iconv_open_into.3.html +132 -0
  18. package/dist/prebuilt/Android-arm64-v8a/share/doc/iconvctl.3.html +170 -0
  19. package/dist/prebuilt/Android-arm64-v8a/share/man/man1/iconv.1 +108 -0
  20. package/dist/prebuilt/Android-arm64-v8a/share/man/man3/iconv.3 +92 -0
  21. package/dist/prebuilt/Android-arm64-v8a/share/man/man3/iconv_close.3 +31 -0
  22. package/dist/prebuilt/Android-arm64-v8a/share/man/man3/iconv_open.3 +254 -0
  23. package/dist/prebuilt/Android-arm64-v8a/share/man/man3/iconv_open_into.3 +47 -0
  24. package/dist/prebuilt/Android-arm64-v8a/share/man/man3/iconvctl.3 +67 -0
  25. package/dist/prebuilt/CMakeLists.txt +44 -0
  26. package/dist/prebuilt/Emscripten-x86_64/include/iconv.h +241 -0
  27. package/dist/prebuilt/Emscripten-x86_64/include/libcharset.h +45 -0
  28. package/dist/prebuilt/Emscripten-x86_64/include/localcharset.h +137 -0
  29. package/dist/prebuilt/Emscripten-x86_64/lib/libcharset.a +0 -0
  30. package/dist/prebuilt/Emscripten-x86_64/lib/libcharset.la +41 -0
  31. package/dist/prebuilt/Emscripten-x86_64/lib/libiconv.a +0 -0
  32. package/dist/prebuilt/Emscripten-x86_64/lib/libiconv.la +41 -0
  33. package/dist/prebuilt/Emscripten-x86_64/share/doc/iconv.1.html +205 -0
  34. package/dist/prebuilt/Emscripten-x86_64/share/doc/iconv.3.html +206 -0
  35. package/dist/prebuilt/Emscripten-x86_64/share/doc/iconv_close.3.html +89 -0
  36. package/dist/prebuilt/Emscripten-x86_64/share/doc/iconv_open.3.html +345 -0
  37. package/dist/prebuilt/Emscripten-x86_64/share/doc/iconv_open_into.3.html +132 -0
  38. package/dist/prebuilt/Emscripten-x86_64/share/doc/iconvctl.3.html +170 -0
  39. package/dist/prebuilt/Emscripten-x86_64/share/locale/af/LC_MESSAGES/libiconv.mo +0 -0
  40. package/dist/prebuilt/Emscripten-x86_64/share/locale/bg/LC_MESSAGES/libiconv.mo +0 -0
  41. package/dist/prebuilt/Emscripten-x86_64/share/locale/ca/LC_MESSAGES/libiconv.mo +0 -0
  42. package/dist/prebuilt/Emscripten-x86_64/share/locale/cs/LC_MESSAGES/libiconv.mo +0 -0
  43. package/dist/prebuilt/Emscripten-x86_64/share/locale/da/LC_MESSAGES/libiconv.mo +0 -0
  44. package/dist/prebuilt/Emscripten-x86_64/share/locale/de/LC_MESSAGES/libiconv.mo +0 -0
  45. package/dist/prebuilt/Emscripten-x86_64/share/locale/el/LC_MESSAGES/libiconv.mo +0 -0
  46. package/dist/prebuilt/Emscripten-x86_64/share/locale/eo/LC_MESSAGES/libiconv.mo +0 -0
  47. package/dist/prebuilt/Emscripten-x86_64/share/locale/es/LC_MESSAGES/libiconv.mo +0 -0
  48. package/dist/prebuilt/Emscripten-x86_64/share/locale/et/LC_MESSAGES/libiconv.mo +0 -0
  49. package/dist/prebuilt/Emscripten-x86_64/share/locale/fi/LC_MESSAGES/libiconv.mo +0 -0
  50. package/dist/prebuilt/Emscripten-x86_64/share/locale/fr/LC_MESSAGES/libiconv.mo +0 -0
  51. package/dist/prebuilt/Emscripten-x86_64/share/locale/ga/LC_MESSAGES/libiconv.mo +0 -0
  52. package/dist/prebuilt/Emscripten-x86_64/share/locale/gl/LC_MESSAGES/libiconv.mo +0 -0
  53. package/dist/prebuilt/Emscripten-x86_64/share/locale/hr/LC_MESSAGES/libiconv.mo +0 -0
  54. package/dist/prebuilt/Emscripten-x86_64/share/locale/hu/LC_MESSAGES/libiconv.mo +0 -0
  55. package/dist/prebuilt/Emscripten-x86_64/share/locale/id/LC_MESSAGES/libiconv.mo +0 -0
  56. package/dist/prebuilt/Emscripten-x86_64/share/locale/it/LC_MESSAGES/libiconv.mo +0 -0
  57. package/dist/prebuilt/Emscripten-x86_64/share/locale/ja/LC_MESSAGES/libiconv.mo +0 -0
  58. package/dist/prebuilt/Emscripten-x86_64/share/locale/ko/LC_MESSAGES/libiconv.mo +0 -0
  59. package/dist/prebuilt/Emscripten-x86_64/share/locale/lt/LC_MESSAGES/libiconv.mo +0 -0
  60. package/dist/prebuilt/Emscripten-x86_64/share/locale/nl/LC_MESSAGES/libiconv.mo +0 -0
  61. package/dist/prebuilt/Emscripten-x86_64/share/locale/pl/LC_MESSAGES/libiconv.mo +0 -0
  62. package/dist/prebuilt/Emscripten-x86_64/share/locale/pt_BR/LC_MESSAGES/libiconv.mo +0 -0
  63. package/dist/prebuilt/Emscripten-x86_64/share/locale/rm/LC_MESSAGES/libiconv.mo +0 -0
  64. package/dist/prebuilt/Emscripten-x86_64/share/locale/ro/LC_MESSAGES/libiconv.mo +0 -0
  65. package/dist/prebuilt/Emscripten-x86_64/share/locale/ru/LC_MESSAGES/libiconv.mo +0 -0
  66. package/dist/prebuilt/Emscripten-x86_64/share/locale/sk/LC_MESSAGES/libiconv.mo +0 -0
  67. package/dist/prebuilt/Emscripten-x86_64/share/locale/sl/LC_MESSAGES/libiconv.mo +0 -0
  68. package/dist/prebuilt/Emscripten-x86_64/share/locale/sq/LC_MESSAGES/libiconv.mo +0 -0
  69. package/dist/prebuilt/Emscripten-x86_64/share/locale/sr/LC_MESSAGES/libiconv.mo +0 -0
  70. package/dist/prebuilt/Emscripten-x86_64/share/locale/sv/LC_MESSAGES/libiconv.mo +0 -0
  71. package/dist/prebuilt/Emscripten-x86_64/share/locale/tr/LC_MESSAGES/libiconv.mo +0 -0
  72. package/dist/prebuilt/Emscripten-x86_64/share/locale/uk/LC_MESSAGES/libiconv.mo +0 -0
  73. package/dist/prebuilt/Emscripten-x86_64/share/locale/vi/LC_MESSAGES/libiconv.mo +0 -0
  74. package/dist/prebuilt/Emscripten-x86_64/share/locale/wa/LC_MESSAGES/libiconv.mo +0 -0
  75. package/dist/prebuilt/Emscripten-x86_64/share/locale/zh_CN/LC_MESSAGES/libiconv.mo +0 -0
  76. package/dist/prebuilt/Emscripten-x86_64/share/locale/zh_TW/LC_MESSAGES/libiconv.mo +0 -0
  77. package/dist/prebuilt/Emscripten-x86_64/share/man/man1/iconv.1 +108 -0
  78. package/dist/prebuilt/Emscripten-x86_64/share/man/man3/iconv.3 +92 -0
  79. package/dist/prebuilt/Emscripten-x86_64/share/man/man3/iconv_close.3 +31 -0
  80. package/dist/prebuilt/Emscripten-x86_64/share/man/man3/iconv_open.3 +254 -0
  81. package/dist/prebuilt/Emscripten-x86_64/share/man/man3/iconv_open_into.3 +47 -0
  82. package/dist/prebuilt/Emscripten-x86_64/share/man/man3/iconvctl.3 +67 -0
  83. package/dist/prebuilt/charset.xcframework/Info.plist +50 -0
  84. package/dist/prebuilt/charset.xcframework/ios-arm64_arm64e/Headers/iconv.h +241 -0
  85. package/dist/prebuilt/charset.xcframework/ios-arm64_arm64e/Headers/libcharset.h +45 -0
  86. package/dist/prebuilt/charset.xcframework/ios-arm64_arm64e/Headers/localcharset.h +137 -0
  87. package/dist/prebuilt/charset.xcframework/ios-arm64_arm64e/libcharset.a +0 -0
  88. package/dist/prebuilt/charset.xcframework/ios-arm64_arm64e_x86_64-simulator/Headers/iconv.h +241 -0
  89. package/dist/prebuilt/charset.xcframework/ios-arm64_arm64e_x86_64-simulator/Headers/libcharset.h +45 -0
  90. package/dist/prebuilt/charset.xcframework/ios-arm64_arm64e_x86_64-simulator/Headers/localcharset.h +137 -0
  91. package/dist/prebuilt/charset.xcframework/ios-arm64_arm64e_x86_64-simulator/libcharset.a +0 -0
  92. package/dist/prebuilt/iOS-iphoneos/include/iconv.h +241 -0
  93. package/dist/prebuilt/iOS-iphoneos/include/libcharset.h +45 -0
  94. package/dist/prebuilt/iOS-iphoneos/include/localcharset.h +137 -0
  95. package/dist/prebuilt/iOS-iphoneos/lib/libcharset.a +0 -0
  96. package/dist/prebuilt/iOS-iphoneos/lib/libcharset.la +41 -0
  97. package/dist/prebuilt/iOS-iphoneos/lib/libiconv.a +0 -0
  98. package/dist/prebuilt/iOS-iphoneos/lib/libiconv.la +41 -0
  99. package/dist/prebuilt/iOS-iphoneos/share/doc/iconv.1.html +205 -0
  100. package/dist/prebuilt/iOS-iphoneos/share/doc/iconv.3.html +206 -0
  101. package/dist/prebuilt/iOS-iphoneos/share/doc/iconv_close.3.html +89 -0
  102. package/dist/prebuilt/iOS-iphoneos/share/doc/iconv_open.3.html +345 -0
  103. package/dist/prebuilt/iOS-iphoneos/share/doc/iconv_open_into.3.html +132 -0
  104. package/dist/prebuilt/iOS-iphoneos/share/doc/iconvctl.3.html +170 -0
  105. package/dist/prebuilt/iOS-iphoneos/share/man/man1/iconv.1 +108 -0
  106. package/dist/prebuilt/iOS-iphoneos/share/man/man3/iconv.3 +92 -0
  107. package/dist/prebuilt/iOS-iphoneos/share/man/man3/iconv_close.3 +31 -0
  108. package/dist/prebuilt/iOS-iphoneos/share/man/man3/iconv_open.3 +254 -0
  109. package/dist/prebuilt/iOS-iphoneos/share/man/man3/iconv_open_into.3 +47 -0
  110. package/dist/prebuilt/iOS-iphoneos/share/man/man3/iconvctl.3 +67 -0
  111. package/dist/prebuilt/iOS-iphonesimulator/include/iconv.h +241 -0
  112. package/dist/prebuilt/iOS-iphonesimulator/include/libcharset.h +45 -0
  113. package/dist/prebuilt/iOS-iphonesimulator/include/localcharset.h +137 -0
  114. package/dist/prebuilt/iOS-iphonesimulator/lib/libcharset.a +0 -0
  115. package/dist/prebuilt/iOS-iphonesimulator/lib/libcharset.la +41 -0
  116. package/dist/prebuilt/iOS-iphonesimulator/lib/libiconv.a +0 -0
  117. package/dist/prebuilt/iOS-iphonesimulator/lib/libiconv.la +41 -0
  118. package/dist/prebuilt/iOS-iphonesimulator/share/doc/iconv.1.html +205 -0
  119. package/dist/prebuilt/iOS-iphonesimulator/share/doc/iconv.3.html +206 -0
  120. package/dist/prebuilt/iOS-iphonesimulator/share/doc/iconv_close.3.html +89 -0
  121. package/dist/prebuilt/iOS-iphonesimulator/share/doc/iconv_open.3.html +345 -0
  122. package/dist/prebuilt/iOS-iphonesimulator/share/doc/iconv_open_into.3.html +132 -0
  123. package/dist/prebuilt/iOS-iphonesimulator/share/doc/iconvctl.3.html +170 -0
  124. package/dist/prebuilt/iOS-iphonesimulator/share/man/man1/iconv.1 +108 -0
  125. package/dist/prebuilt/iOS-iphonesimulator/share/man/man3/iconv.3 +92 -0
  126. package/dist/prebuilt/iOS-iphonesimulator/share/man/man3/iconv_close.3 +31 -0
  127. package/dist/prebuilt/iOS-iphonesimulator/share/man/man3/iconv_open.3 +254 -0
  128. package/dist/prebuilt/iOS-iphonesimulator/share/man/man3/iconv_open_into.3 +47 -0
  129. package/dist/prebuilt/iOS-iphonesimulator/share/man/man3/iconvctl.3 +67 -0
  130. package/dist/prebuilt/iconv.xcframework/Info.plist +50 -0
  131. package/dist/prebuilt/iconv.xcframework/ios-arm64_arm64e/Headers/iconv.h +241 -0
  132. package/dist/prebuilt/iconv.xcframework/ios-arm64_arm64e/Headers/libcharset.h +45 -0
  133. package/dist/prebuilt/iconv.xcframework/ios-arm64_arm64e/Headers/localcharset.h +137 -0
  134. package/dist/prebuilt/iconv.xcframework/ios-arm64_arm64e/libiconv.a +0 -0
  135. package/dist/prebuilt/iconv.xcframework/ios-arm64_arm64e_x86_64-simulator/Headers/iconv.h +241 -0
  136. package/dist/prebuilt/iconv.xcframework/ios-arm64_arm64e_x86_64-simulator/Headers/libcharset.h +45 -0
  137. package/dist/prebuilt/iconv.xcframework/ios-arm64_arm64e_x86_64-simulator/Headers/localcharset.h +137 -0
  138. package/dist/prebuilt/iconv.xcframework/ios-arm64_arm64e_x86_64-simulator/libiconv.a +0 -0
  139. package/package.json +28 -0
@@ -0,0 +1,241 @@
1
+ /* Copyright (C) 1999-2022 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
+ #define _LIBICONV_VERSION 0x0111 /* version number: (major<<8) + minor */
24
+ extern int _libiconv_version; /* Likewise */
25
+
26
+ /* We would like to #include any system header file which could define
27
+ iconv_t, 1. in order to eliminate the risk that the user gets compilation
28
+ errors because some other system header file includes /usr/include/iconv.h
29
+ which defines iconv_t or declares iconv after this file, 2. when compiling
30
+ for LIBICONV_PLUG, we need the proper iconv_t type in order to produce
31
+ binary compatible code.
32
+ But gcc's #include_next is not portable. Thus, once libiconv's iconv.h
33
+ has been installed in /usr/local/include, there is no way any more to
34
+ include the original /usr/include/iconv.h. We simply have to get away
35
+ without it.
36
+ Ad 1. The risk that a system header file does
37
+ #include "iconv.h" or #include_next "iconv.h"
38
+ is small. They all do #include <iconv.h>.
39
+ Ad 2. The iconv_t type is a pointer type in all cases I have seen. (It
40
+ has to be a scalar type because (iconv_t)(-1) is a possible return value
41
+ from iconv_open().) */
42
+
43
+ /* Define iconv_t ourselves. */
44
+ #undef iconv_t
45
+ #define iconv_t libiconv_t
46
+ typedef void* iconv_t;
47
+
48
+ /* Get size_t declaration.
49
+ Get wchar_t declaration if it exists. */
50
+ #include <stddef.h>
51
+
52
+ /* Get errno declaration and values. */
53
+ #include <errno.h>
54
+ /* Some systems, like SunOS 4, don't have EILSEQ. Some systems, like BSD/OS,
55
+ have EILSEQ in a different header. On these systems, define EILSEQ
56
+ ourselves. */
57
+ #ifndef EILSEQ
58
+ #define EILSEQ
59
+ #endif
60
+
61
+
62
+ #ifdef __cplusplus
63
+ extern "C" {
64
+ #endif
65
+
66
+
67
+ /* Allocates descriptor for code conversion from encoding ‘fromcode’ to
68
+ encoding ‘tocode’. */
69
+ #ifndef LIBICONV_PLUG
70
+ #define iconv_open libiconv_open
71
+ #endif
72
+ extern iconv_t iconv_open (const char* tocode, const char* fromcode);
73
+
74
+ /* Converts, using conversion descriptor ‘cd’, at most ‘*inbytesleft’ bytes
75
+ starting at ‘*inbuf’, writing at most ‘*outbytesleft’ bytes starting at
76
+ ‘*outbuf’.
77
+ Decrements ‘*inbytesleft’ and increments ‘*inbuf’ by the same amount.
78
+ Decrements ‘*outbytesleft’ and increments ‘*outbuf’ by the same amount. */
79
+ #ifndef LIBICONV_PLUG
80
+ #define iconv libiconv
81
+ #endif
82
+ extern size_t iconv (iconv_t cd, char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft);
83
+
84
+ /* Frees resources allocated for conversion descriptor ‘cd’. */
85
+ #ifndef LIBICONV_PLUG
86
+ #define iconv_close libiconv_close
87
+ #endif
88
+ extern int iconv_close (iconv_t cd);
89
+
90
+
91
+ #ifdef __cplusplus
92
+ }
93
+ #endif
94
+
95
+
96
+ #ifndef LIBICONV_PLUG
97
+
98
+ /* Nonstandard extensions. */
99
+
100
+ #if 1
101
+ #if 0
102
+ /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
103
+ <wchar.h>.
104
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
105
+ included before <wchar.h>. */
106
+ #include <stddef.h>
107
+ #include <stdio.h>
108
+ #include <time.h>
109
+ #endif
110
+ #include <wchar.h>
111
+ #endif
112
+
113
+ #ifdef __cplusplus
114
+ extern "C" {
115
+ #endif
116
+
117
+ /* A type that holds all memory needed by a conversion descriptor.
118
+ A pointer to such an object can be used as an iconv_t. */
119
+ typedef struct {
120
+ void* dummy1[28];
121
+ #if 1
122
+ mbstate_t dummy2;
123
+ #endif
124
+ } iconv_allocation_t;
125
+
126
+ /* Allocates descriptor for code conversion from encoding ‘fromcode’ to
127
+ encoding ‘tocode’ into preallocated memory. Returns an error indicator
128
+ (0 or -1 with errno set). */
129
+ #define iconv_open_into libiconv_open_into
130
+ extern int iconv_open_into (const char* tocode, const char* fromcode,
131
+ iconv_allocation_t* resultp);
132
+
133
+ /* Control of attributes. */
134
+ #define iconvctl libiconvctl
135
+ extern int iconvctl (iconv_t cd, int request, void* argument);
136
+
137
+ /* Hook performed after every successful conversion of a Unicode character. */
138
+ typedef void (*iconv_unicode_char_hook) (unsigned int uc, void* data);
139
+ /* Hook performed after every successful conversion of a wide character. */
140
+ typedef void (*iconv_wide_char_hook) (wchar_t wc, void* data);
141
+ /* Set of hooks. */
142
+ struct iconv_hooks {
143
+ iconv_unicode_char_hook uc_hook;
144
+ iconv_wide_char_hook wc_hook;
145
+ void* data;
146
+ };
147
+
148
+ /* Fallback function. Invoked when a small number of bytes could not be
149
+ converted to a Unicode character. This function should process all
150
+ bytes from inbuf and may produce replacement Unicode characters by calling
151
+ the write_replacement callback repeatedly. */
152
+ typedef void (*iconv_unicode_mb_to_uc_fallback)
153
+ (const char* inbuf, size_t inbufsize,
154
+ void (*write_replacement) (const unsigned int *buf, size_t buflen,
155
+ void* callback_arg),
156
+ void* callback_arg,
157
+ void* data);
158
+ /* Fallback function. Invoked when a Unicode character could not be converted
159
+ to the target encoding. This function should process the character and
160
+ may produce replacement bytes (in the target encoding) by calling the
161
+ write_replacement callback repeatedly. */
162
+ typedef void (*iconv_unicode_uc_to_mb_fallback)
163
+ (unsigned int code,
164
+ void (*write_replacement) (const char *buf, size_t buflen,
165
+ void* callback_arg),
166
+ void* callback_arg,
167
+ void* data);
168
+ #if 1
169
+ /* Fallback function. Invoked when a number of bytes could not be converted to
170
+ a wide character. This function should process all bytes from inbuf and may
171
+ produce replacement wide characters by calling the write_replacement
172
+ callback repeatedly. */
173
+ typedef void (*iconv_wchar_mb_to_wc_fallback)
174
+ (const char* inbuf, size_t inbufsize,
175
+ void (*write_replacement) (const wchar_t *buf, size_t buflen,
176
+ void* callback_arg),
177
+ void* callback_arg,
178
+ void* data);
179
+ /* Fallback function. Invoked when a wide character could not be converted to
180
+ the target encoding. This function should process the character and may
181
+ produce replacement bytes (in the target encoding) by calling the
182
+ write_replacement callback repeatedly. */
183
+ typedef void (*iconv_wchar_wc_to_mb_fallback)
184
+ (wchar_t code,
185
+ void (*write_replacement) (const char *buf, size_t buflen,
186
+ void* callback_arg),
187
+ void* callback_arg,
188
+ void* data);
189
+ #else
190
+ /* If the wchar_t type does not exist, these two fallback functions are never
191
+ invoked. Their argument list therefore does not matter. */
192
+ typedef void (*iconv_wchar_mb_to_wc_fallback) ();
193
+ typedef void (*iconv_wchar_wc_to_mb_fallback) ();
194
+ #endif
195
+ /* Set of fallbacks. */
196
+ struct iconv_fallbacks {
197
+ iconv_unicode_mb_to_uc_fallback mb_to_uc_fallback;
198
+ iconv_unicode_uc_to_mb_fallback uc_to_mb_fallback;
199
+ iconv_wchar_mb_to_wc_fallback mb_to_wc_fallback;
200
+ iconv_wchar_wc_to_mb_fallback wc_to_mb_fallback;
201
+ void* data;
202
+ };
203
+
204
+ /* Requests for iconvctl. */
205
+ #define ICONV_TRIVIALP 0 /* int *argument */
206
+ #define ICONV_GET_TRANSLITERATE 1 /* int *argument */
207
+ #define ICONV_SET_TRANSLITERATE 2 /* const int *argument */
208
+ #define ICONV_GET_DISCARD_ILSEQ 3 /* int *argument */
209
+ #define ICONV_SET_DISCARD_ILSEQ 4 /* const int *argument */
210
+ #define ICONV_SET_HOOKS 5 /* const struct iconv_hooks *argument */
211
+ #define ICONV_SET_FALLBACKS 6 /* const struct iconv_fallbacks *argument */
212
+
213
+ /* Listing of locale independent encodings. */
214
+ #define iconvlist libiconvlist
215
+ extern void iconvlist (int (*do_one) (unsigned int namescount,
216
+ const char * const * names,
217
+ void* data),
218
+ void* data);
219
+
220
+ /* Canonicalize an encoding name.
221
+ The result is either a canonical encoding name, or name itself. */
222
+ extern const char * iconv_canonicalize (const char * name);
223
+
224
+ /* Support for relocatable packages. */
225
+
226
+ /* Sets the original and the current installation prefix of the package.
227
+ Relocation simply replaces a pathname starting with the original prefix
228
+ by the corresponding pathname with the current prefix instead. Both
229
+ prefixes should be directory names without trailing slash (i.e. use ""
230
+ instead of "/"). */
231
+ extern void libiconv_set_relocation_prefix (const char *orig_prefix,
232
+ const char *curr_prefix);
233
+
234
+ #ifdef __cplusplus
235
+ }
236
+ #endif
237
+
238
+ #endif
239
+
240
+
241
+ #endif /* _LIBICONV_H */
@@ -0,0 +1,45 @@
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 */
@@ -0,0 +1,137 @@
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 */
@@ -0,0 +1,41 @@
1
+ # libcharset.la - a libtool library file
2
+ # Generated by libtool (GNU libtool) 2.4.7
3
+ #
4
+ # Please DO NOT delete this file!
5
+ # It is necessary for linking the library.
6
+
7
+ # The name that we can dlopen(3).
8
+ dlname=''
9
+
10
+ # Names of this library.
11
+ library_names=''
12
+
13
+ # The name of the static archive.
14
+ old_library='libcharset.a'
15
+
16
+ # Linker flags that cannot go in dependency_libs.
17
+ inherited_linker_flags=''
18
+
19
+ # Libraries that this one depends upon.
20
+ dependency_libs=''
21
+
22
+ # Names of additional weak libraries provided by this library
23
+ weak_library_names=''
24
+
25
+ # Version information for libcharset.
26
+ current=1
27
+ age=0
28
+ revision=0
29
+
30
+ # Is this an already installed library?
31
+ installed=yes
32
+
33
+ # Should we warn about portability when linking against -modules?
34
+ shouldnotlink=no
35
+
36
+ # Files to dlopen/dlpreopen
37
+ dlopen=''
38
+ dlpreopen=''
39
+
40
+ # Directory that this library needs to be installed in:
41
+ libdir='/tmp/cppjs/live/.cppjs/build/Source-Release/prebuilt/Emscripten-x86_64/lib'
@@ -0,0 +1,41 @@
1
+ # libiconv.la - a libtool library file
2
+ # Generated by libtool (GNU libtool) 2.4.7
3
+ #
4
+ # Please DO NOT delete this file!
5
+ # It is necessary for linking the library.
6
+
7
+ # The name that we can dlopen(3).
8
+ dlname=''
9
+
10
+ # Names of this library.
11
+ library_names=''
12
+
13
+ # The name of the static archive.
14
+ old_library='libiconv.a'
15
+
16
+ # Linker flags that cannot go in dependency_libs.
17
+ inherited_linker_flags=''
18
+
19
+ # Libraries that this one depends upon.
20
+ dependency_libs=''
21
+
22
+ # Names of additional weak libraries provided by this library
23
+ weak_library_names=''
24
+
25
+ # Version information for libiconv.
26
+ current=8
27
+ age=6
28
+ revision=1
29
+
30
+ # Is this an already installed library?
31
+ installed=yes
32
+
33
+ # Should we warn about portability when linking against -modules?
34
+ shouldnotlink=no
35
+
36
+ # Files to dlopen/dlpreopen
37
+ dlopen=''
38
+ dlpreopen=''
39
+
40
+ # Directory that this library needs to be installed in:
41
+ libdir='/tmp/cppjs/live/.cppjs/build/Source-Release/prebuilt/Emscripten-x86_64/lib'