Changeset View
Changeset View
Standalone View
Standalone View
usr.bin/localedef/localedef.c
Context not available. | |||||
#include <limits.h> | #include <limits.h> | ||||
#include <locale.h> | #include <locale.h> | ||||
#include <dirent.h> | #include <dirent.h> | ||||
#include "collate.h" | |||||
#include "localedef.h" | #include "localedef.h" | ||||
#include "parser.h" | #include "parser.h" | ||||
Context not available. | |||||
int warnok = 0; | int warnok = 0; | ||||
static char *locname = NULL; | static char *locname = NULL; | ||||
static char locpath[PATH_MAX]; | static char locpath[PATH_MAX]; | ||||
char *version = NULL; | |||||
const char * | const char * | ||||
category_name(void) | category_name(void) | ||||
Context not available. | |||||
(void) fprintf(stderr, " -u encoding : assume encoding\n"); | (void) fprintf(stderr, " -u encoding : assume encoding\n"); | ||||
(void) fprintf(stderr, " -w widths : use screen widths file\n"); | (void) fprintf(stderr, " -w widths : use screen widths file\n"); | ||||
(void) fprintf(stderr, " -i locsrc : source file for locale\n"); | (void) fprintf(stderr, " -i locsrc : source file for locale\n"); | ||||
(void) fprintf(stderr, " -V version : version string for locale\n"); | |||||
exit(4); | exit(4); | ||||
} | } | ||||
Context not available. | |||||
(void) setlocale(LC_ALL, ""); | (void) setlocale(LC_ALL, ""); | ||||
while ((c = getopt(argc, argv, "blw:i:cf:u:vUD")) != -1) { | while ((c = getopt(argc, argv, "blw:i:cf:u:vUDV:")) != -1) { | ||||
switch (c) { | switch (c) { | ||||
case 'D': | case 'D': | ||||
bsd = 1; | bsd = 1; | ||||
Context not available. | |||||
case '?': | case '?': | ||||
usage(); | usage(); | ||||
break; | break; | ||||
case 'V': | |||||
version = optarg; | |||||
break; | |||||
} | } | ||||
} | } | ||||
Context not available. | |||||
(void) printf("Processing locale %s.\n", locname); | (void) printf("Processing locale %s.\n", locname); | ||||
} | } | ||||
if (version && strlen(version) >= XLOCALE_DEF_VERSION_LEN) { | |||||
(void) fprintf(stderr, "Version string too long.\n"); | |||||
exit(1); | |||||
} | |||||
if (cfname) { | if (cfname) { | ||||
if (verbose) | if (verbose) | ||||
(void) printf("Loading charmap %s.\n", cfname); | (void) printf("Loading charmap %s.\n", cfname); | ||||
Context not available. |