mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-07 06:25:30 +00:00
ICU-212 out-of-source build. gencnval now accepts the path of the
convrtrs.txt file as a command-line argument. X-SVN-Rev: 725
This commit is contained in:
parent
b198364fce
commit
247a2b7c11
1 changed files with 17 additions and 9 deletions
|
@ -93,7 +93,7 @@ compareConverters(const void *converter1, const void *converter2);
|
|||
extern int
|
||||
main(int argc, char *argv[]) {
|
||||
char line[512];
|
||||
const char *path, *arg;
|
||||
const char *path, *arg, *convfile = 0;
|
||||
FileStream *in;
|
||||
UNewDataMemory *out;
|
||||
char *s;
|
||||
|
@ -119,16 +119,24 @@ main(int argc, char *argv[]) {
|
|||
exit(-1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if (!convfile) {
|
||||
convfile = arg;
|
||||
} else {
|
||||
usage(argv[0]);
|
||||
}
|
||||
}
|
||||
|
||||
path=u_getDataDirectory();
|
||||
if(path!=NULL) {
|
||||
uprv_strcpy(line, path);
|
||||
uprv_strcat(line, "convrtrs.txt");
|
||||
path=line;
|
||||
if (convfile) {
|
||||
path = convfile;
|
||||
} else {
|
||||
path="convrtrs.txt";
|
||||
path=u_getDataDirectory();
|
||||
if(path!=NULL) {
|
||||
uprv_strcpy(line, path);
|
||||
uprv_strcat(line, "convrtrs.txt");
|
||||
path=line;
|
||||
} else {
|
||||
path="convrtrs.txt";
|
||||
}
|
||||
}
|
||||
in=T_FileStream_open(path, "r");
|
||||
if(in==NULL) {
|
||||
|
@ -199,7 +207,7 @@ main(int argc, char *argv[]) {
|
|||
static void
|
||||
usage(char *progname) {
|
||||
fprintf(stderr,
|
||||
"usage: %s [-c[+|-]]\n"
|
||||
"usage: %s [-c[+|-]] [convrtrs.txt]\n"
|
||||
"\tread convrtrs.txt and create " DATA_NAME "." DATA_TYPE "\n"
|
||||
"\t\t-c[+|-] do (not) include a copyright notice\n",
|
||||
progname);
|
||||
|
|
Loading…
Add table
Reference in a new issue