YoushouldhavereceivedacopyoftheGNUGeneralPublicLicense alongwiththisprogram;ifnot,writetotheFreeSoftware
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
/* can't use -lmysys because this prog is used to create -lstrings */
if (chdir(*argv) != 0) {
fprintf(stderr, "%s: can't cd to %s\n", prog, *argv); exit(EXIT_FAILURE);
}
--argc; ++argv;
if (chdir(CHARSETS_SUBDIR) != 0) {
fprintf(stderr, "%s: can't cd to %s\n", prog, CHARSETS_SUBDIR); exit(EXIT_FAILURE);
}
while (argc--)
print_arrays_for(*argv++);
exit(EXIT_SUCCESS);
}
void
print_array(FILE *f, constchar *set, constchar *name, int n)
{ int i; char val[100];
printf("uchar %s_%s[] = {\n", name, set);
p = buf;
*buf = '\0'; for (i = 0; i < n; ++i)
{ /* get a word from f */
endptr = p; for (;;)
{ while (isspace(*endptr))
++endptr; if (*endptr && *endptr != '#') /* not comment */ break; if ((fgets(buf, sizeof(buf), f)) == NULL) return; /* XXX: break silently */
endptr = buf;
}
p = val; while (!isspace(*endptr))
*p++ = *endptr++;
*p = '\0';
p = endptr;
/* write the value out */
if (i == 0 || i % ROW_LEN == n % ROW_LEN)
printf(" ");
printf("\ /* The %s character set. Generated automatically by configure and\n\ *the%sprogram\n\
*/\n\n",
set, prog);
/* it would be nice if this used the code in mysys/charset.c, but... */
print_array(f, set, "ctype", CTYPE_TABLE_SIZE);
print_array(f, set, "to_lower", TO_LOWER_TABLE_SIZE);
print_array(f, set, "to_upper", TO_UPPER_TABLE_SIZE);
print_array(f, set, "sort_order", SORT_ORDER_TABLE_SIZE);
printf("\n");
fclose(f);
return;
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.10 Sekunden
(vorverarbeitet am 2026-10-08)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.