version 1.1.1.1, 2012/02/21 22:57:49
|
version 1.1.1.2, 2021/03/17 13:38:46
|
Line 1
|
Line 1
|
/* Copyright (C) 1999-2002 Free Software Foundation, Inc. | /* Copyright (C) 1999-2002, 2011-2012, 2016, 2018 Free Software Foundation, Inc. |
This file is part of the GNU LIBICONV Tools. |
This file is part of the GNU LIBICONV Tools. |
|
|
This program is free software: you can redistribute it and/or modify |
This program is free software: you can redistribute it and/or modify |
Line 12
|
Line 12
|
GNU General Public License for more details. |
GNU General Public License for more details. |
|
|
You should have received a copy of the GNU General Public License |
You should have received a copy of the GNU General Public License |
along with this program; if not, write to the Free Software Foundation, | along with this program; if not, see <https://www.gnu.org/licenses/>. */ |
Inc., along with this program. If not, see <http://www.gnu.org/licenses/>. */ | |
|
|
/* |
/* |
* Generates an 8-bit character set table from a .TXT table as found on |
* Generates an 8-bit character set table from a .TXT table as found on |
Line 59
|
Line 58
|
* ./8bit_tab_to_h ISO-8859-15 iso8859_15 < 8859-15.TXT |
* ./8bit_tab_to_h ISO-8859-15 iso8859_15 < 8859-15.TXT |
* ./8bit_tab_to_h JISX0201.1976-0 jisx0201 < JIS0201.TXT |
* ./8bit_tab_to_h JISX0201.1976-0 jisx0201 < JIS0201.TXT |
* ./8bit_tab_to_h KOI8-R koi8_r < KOI8-R.TXT |
* ./8bit_tab_to_h KOI8-R koi8_r < KOI8-R.TXT |
|
* |
|
* ./8bit_tab_to_h 'CP50221 JISX0208 extensions' cp50221_0208_ext < CP50221-0208-EXT.TXT |
|
* ./8bit_tab_to_h 'CP50221 JISX0212 extensions' cp50221_0212_ext < CP50221-0212-EXT.TXT |
*/ |
*/ |
|
|
#include <stdio.h> |
#include <stdio.h> |
Line 159 int main (int argc, char *argv[])
|
Line 161 int main (int argc, char *argv[])
|
fprintf(f, " *\n"); |
fprintf(f, " *\n"); |
fprintf(f, " * You should have received a copy of the GNU Library General Public\n"); |
fprintf(f, " * You should have received a copy of the GNU Library General Public\n"); |
fprintf(f, " * License along with the GNU LIBICONV Library; see the file COPYING.LIB.\n"); |
fprintf(f, " * License along with the GNU LIBICONV Library; see the file COPYING.LIB.\n"); |
fprintf(f, " * If not, write to the Free Software Foundation, Inc., 51 Franklin Street,\n"); | fprintf(f, " * If not, see <https://www.gnu.org/licenses/>.\n"); |
fprintf(f, " * Fifth Floor, Boston, MA 02110-1301, USA.\n"); | |
fprintf(f, " */\n"); |
fprintf(f, " */\n"); |
fprintf(f, "\n"); |
fprintf(f, "\n"); |
fprintf(f, "/*\n"); |
fprintf(f, "/*\n"); |
Line 233 int main (int argc, char *argv[])
|
Line 234 int main (int argc, char *argv[])
|
fprintf(f, "\n"); |
fprintf(f, "\n"); |
} |
} |
final_ret_reached = false; |
final_ret_reached = false; |
fprintf(f, "static int\n%s_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)\n", c_charsetname); | fprintf(f, "static int\n%s_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)\n", c_charsetname); |
fprintf(f, "{\n"); |
fprintf(f, "{\n"); |
fprintf(f, " unsigned char c = *s;\n"); |
fprintf(f, " unsigned char c = *s;\n"); |
if (some_invalid) { |
if (some_invalid) { |
Line 439 int main (int argc, char *argv[])
|
Line 440 int main (int argc, char *argv[])
|
j1 = j2; |
j1 = j2; |
} |
} |
fix_0000 = false; |
fix_0000 = false; |
fprintf(f, "static int\n%s_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)\n", c_charsetname); | fprintf(f, "static int\n%s_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)\n", c_charsetname); |
fprintf(f, "{\n"); |
fprintf(f, "{\n"); |
if (need_c) |
if (need_c) |
fprintf(f, " unsigned char c = 0;\n"); |
fprintf(f, " unsigned char c = 0;\n"); |