version 1.1.1.2, 2012/05/29 09:29:43
|
version 1.1.1.3, 2021/03/17 13:38:46
|
Line 1
|
Line 1
|
/* Copyright (C) 1999-2003, 2005, 2011 Free Software Foundation, Inc. | /* Copyright (C) 1999-2003, 2005, 2011-2012, 2016, 2018 Free Software Foundation, Inc. |
This file is part of the GNU LIBICONV Library. |
This file is part of the GNU LIBICONV Library. |
|
|
The GNU LIBICONV Library is free software; you can redistribute it |
The GNU LIBICONV Library is free software; you can redistribute it |
Line 13
|
Line 13
|
|
|
You should have received a copy of the GNU Library General Public |
You should have received a copy of the GNU Library General Public |
License along with the GNU LIBICONV Library; see the file COPYING.LIB. |
License along with the GNU LIBICONV Library; see the file COPYING.LIB. |
If not, write to the Free Software Foundation, Inc., 51 Franklin Street, | If not, see <https://www.gnu.org/licenses/>. */ |
Fifth Floor, Boston, MA 02110-1301, USA. */ | |
|
|
/* |
/* |
* Generates a table of small strings, used for transliteration, from a table |
* Generates a table of small strings, used for transliteration, from a table |
Line 28
|
Line 27
|
|
|
int main (int argc, char *argv[]) |
int main (int argc, char *argv[]) |
{ |
{ |
unsigned int data[0x100000]; | unsigned int *data; |
int uni2index[0x110000]; | int *uni2index; |
int index; |
int index; |
|
|
if (argc != 1) |
if (argc != 1) |
exit(1); |
exit(1); |
|
|
|
data = malloc(0x100000 * sizeof(*data)); |
|
uni2index = malloc(0x110000 * sizeof(*uni2index)); |
|
if (data == NULL || uni2index == NULL) { |
|
fprintf(stderr, "out of memory\n"); |
|
exit(1); |
|
} |
|
|
printf("/*\n"); |
printf("/*\n"); |
printf(" * Copyright (C) 1999-2003 Free Software Foundation, Inc.\n"); |
printf(" * Copyright (C) 1999-2003 Free Software Foundation, Inc.\n"); |
printf(" * This file is part of the GNU LIBICONV Library.\n"); |
printf(" * This file is part of the GNU LIBICONV Library.\n"); |
Line 51 int main (int argc, char *argv[])
|
Line 57 int main (int argc, char *argv[])
|
printf(" *\n"); |
printf(" *\n"); |
printf(" * You should have received a copy of the GNU Library General Public\n"); |
printf(" * You should have received a copy of the GNU Library General Public\n"); |
printf(" * License along with the GNU LIBICONV Library; see the file COPYING.LIB.\n"); |
printf(" * License along with the GNU LIBICONV Library; see the file COPYING.LIB.\n"); |
printf(" * If not, write to the Free Software Foundation, Inc., 51 Franklin Street,\n"); | printf(" * If not, see <https://www.gnu.org/licenses/>.\n"); |
printf(" * Fifth Floor, Boston, MA 02110-1301, USA.\n"); | |
printf(" */\n"); |
printf(" */\n"); |
printf("\n"); |
printf("\n"); |
printf("/*\n"); |
printf("/*\n"); |
Line 132 int main (int argc, char *argv[])
|
Line 137 int main (int argc, char *argv[])
|
} |
} |
printf("\n"); |
printf("\n"); |
{ |
{ |
bool pages[0x1100]; |
|
int line[0x22000]; |
int line[0x22000]; |
int tableno; |
int tableno; |
struct { int minline; int maxline; int usecount; const char* suffix; } tables[0x2000]; |
struct { int minline; int maxline; int usecount; const char* suffix; } tables[0x2000]; |
int i, j, p, j1, j2, t; |
int i, j, p, j1, j2, t; |
|
|
for (p = 0; p < 0x1100; p++) |
|
pages[p] = false; |
|
for (j = 0; j < 0x110000; j++) |
|
if (uni2index[j] >= 0) |
|
pages[j>>8] = true; |
|
for (j1 = 0; j1 < 0x22000; j1++) { |
for (j1 = 0; j1 < 0x22000; j1++) { |
bool all_invalid = true; |
bool all_invalid = true; |
for (j2 = 0; j2 < 8; j2++) { |
for (j2 = 0; j2 < 8; j2++) { |