• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/timemachine/libiconv-1.11/tools/

Lines Matching refs:fprintf

90   fprintf(stderr, "Creating %s%s\n", directory, filename);
146 fprintf(f, "/*\n");
147 fprintf(f, " * Copyright (C) 1999-2002 Free Software Foundation, Inc.\n");
148 fprintf(f, " * This file is part of the GNU LIBICONV Library.\n");
149 fprintf(f, " *\n");
150 fprintf(f, " * The GNU LIBICONV Library is free software; you can redistribute it\n");
151 fprintf(f, " * and/or modify it under the terms of the GNU Library General Public\n");
152 fprintf(f, " * License as published by the Free Software Foundation; either version 2\n");
153 fprintf(f, " * of the License, or (at your option) any later version.\n");
154 fprintf(f, " *\n");
155 fprintf(f, " * The GNU LIBICONV Library is distributed in the hope that it will be\n");
156 fprintf(f, " * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of\n");
157 fprintf(f, " * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n");
158 fprintf(f, " * Library General Public License for more details.\n");
159 fprintf(f, " *\n");
160 fprintf(f, " * You should have received a copy of the GNU Library General Public\n");
161 fprintf(f, " * License along with the GNU LIBICONV Library; see the file COPYING.LIB.\n");
162 fprintf(f, " * If not, write to the Free Software Foundation, Inc., 51 Franklin Street,\n");
163 fprintf(f, " * Fifth Floor, Boston, MA 02110-1301, USA.\n");
164 fprintf(f, " */\n");
165 fprintf(f, "\n");
166 fprintf(f, "/*\n");
167 fprintf(f, " * %s\n", charsetname);
168 fprintf(f, " */\n");
169 fprintf(f, "\n");
216 fprintf(f, "static const unsigned short %s_2uni", c_charsetname);
218 fprintf(f, "_%d", t+1);
219 fprintf(f, "[%d] = {\n", 16*(tables[t].maxline-tables[t].minline+1));
221 fprintf(f, " /* 0x%02x */\n", 16*i1);
223 fprintf(f, " ");
226 fprintf(f, " 0x%04x,", charset2uni[i]);
228 fprintf(f, "\n");
231 fprintf(f, "};\n");
233 fprintf(f, "\n");
236 fprintf(f, "static int\n%s_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)\n", c_charsetname);
237 fprintf(f, "{\n");
238 fprintf(f, " unsigned char c = *s;\n");
248 fprintf(f, " if (c < 0x%02x) {\n", 16*i2);
252 fprintf(f, " else {\n");
254 fprintf(f, " else if (c < 0x%02x) {\n", 16*i2);
260 fprintf(f, "%s*pwc = (ucs4_t) c;\n", indent);
261 fprintf(f, "%sreturn 1;\n", indent);
263 fprintf(f, "%s", indent);
269 fprintf(f, "unsigned short wc = ");
271 fprintf(f, "*pwc = (ucs4_t) ");
272 fprintf(f, "%s_2uni", c_charsetname);
274 fprintf(f, "_%d", t+1);
275 fprintf(f, "[c");
277 fprintf(f, "-0x%02x", 16*tables[t].minline);
278 fprintf(f, "];\n");
280 fprintf(f, "%sif (wc != 0xfffd) {\n", indent);
281 fprintf(f, "%s *pwc = (ucs4_t) wc;\n", indent);
282 fprintf(f, "%s return 1;\n", indent);
283 fprintf(f, "%s}\n", indent);
286 fprintf(f, "%sreturn 1;\n", indent);
290 fprintf(f, " }\n");
294 fprintf(f, " return RET_ILSEQ;\n");
301 fprintf(f, " ");
303 fprintf(f, " if (c < 0x%02x)\n ", 16*i2);
307 fprintf(f, " else\n ");
309 fprintf(f, " else if (c < 0x%02x)\n ", 16*i2);
313 fprintf(f, "*pwc = (ucs4_t) c;\n");
315 fprintf(f, "*pwc = (ucs4_t) %s_2uni", c_charsetname);
317 fprintf(f, "_%d", t+1);
318 fprintf(f, "[c");
320 fprintf(f, "-0x%02x", 16*tables[t].minline);
321 fprintf(f, "];\n");
325 fprintf(f, " return 1;\n");
327 fprintf(f, "}\n");
331 fprintf(f, "\n");
415 fprintf(f, "static const unsigned char %s_page%s[%d] = {\n", c_charsetname, tables[t].suffix, 8*(tables[t].maxline-tables[t].minline+1));
418 fprintf(f, " /* 0x%04x */\n", 8*j1);
419 fprintf(f, " ");
422 fprintf(f, " 0x%02x,", uni2charset[j]);
424 fprintf(f, " /* 0x%02x-0x%02x */\n", 8*(j1 % 0x20), 8*(j1 % 0x20)+7);
426 fprintf(f, "};\n");
429 fprintf(f, "\n");
442 fprintf(f, "static int\n%s_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)\n", c_charsetname);
443 fprintf(f, "{\n");
445 fprintf(f, " unsigned char c = 0;\n");
457 fprintf(f, " ");
459 fprintf(f, " else ");
465 fprintf(f, "if (wc == 0x%04x)\n c = 0x%02x;\n", j, uni2charset[j]);
470 fprintf(f, "if (wc < 0x%04x)", 8*j2);
472 fprintf(f, "if (wc >= 0x%04x && wc < 0x%04x)", 8*j1, 8*j2);
477 fprintf(f, " {\n *r = wc;\n return 1;\n }\n");
479 fprintf(f, "\n c = wc;\n");
481 fprintf(f, "\n c = %s_page%s[wc", c_charsetname, tables[t].suffix);
483 fprintf(f, "-0x%04x", 8*j1);
484 fprintf(f, "];\n");
495 fprintf(f, " if (c != 0 || wc == 0) {\n");
497 fprintf(f, " if (c != 0) {\n");
498 fprintf(f, " *r = c;\n");
499 fprintf(f, " return 1;\n");
500 fprintf(f, " }\n");
502 fprintf(f, " return RET_ILUNI;\n");
503 fprintf(f, "}\n");