int
main(int argc, char* argv[]) {
U_NAMESPACE_USE
U_MAIN_INIT_ARGS(argc, argv);
/* preset then read command line options */
options[SOURCEDIR].value="";
argc=u_parseArgs(argc, argv, sizeof(options)/sizeof(options[HELP_H]), options);
/* error handling, printing usage message */ if(argc<0) {
fprintf(stderr, "error in command line argument \"%s\"\n",
argv[-argc]);
} if(!options[OUTPUT_FILENAME].doesOccur) {
argc=-1;
} if( argc<2 ||
options[HELP_H].doesOccur || options[HELP_QUESTION_MARK].doesOccur
) {
fprintf(stderr, "Usage: %s [-options] infiles+ -o outputfilename\n" "\n" "Reads the infiles with normalization data and\n" "creates a binary file, or a C source file (--csource), with the data,\n" "or writes a data file with the combined data (--combined).\n" "See https://unicode-org.github.io/icu/userguide/transforms/normalization#data-file-syntax\n" "\n" "Alternate usage: %s [-options] a.txt b.txt minus p.txt q.txt -o outputfilename\n" "\n" "Computes the difference of (a, b) minus (p, q) and writes the diff data\n" "in input-file syntax to the outputfilename.\n" "It is then possible to build (p, q, diff) to get the same data as (a, b).\n" "(Useful for computing minimal incremental mapping data files.)\n" "\n",
argv[0], argv[0]);
fprintf(stderr, "Options:\n" "\t-h or -? or --help this usage text\n" "\t-v or --verbose verbose output\n" "\t-c or --copyright include a copyright notice\n" "\t-u or --unicode Unicode version, followed by the version like 5.2.0\n");
fprintf(stderr, "\t-s or --sourcedir source directory, followed by the path\n" "\t-o or --output output filename\n" "\t --csource writes a C source file with initializers\n" "\t --combined writes a .txt file (input-file syntax) with the\n" "\t combined data from all of the input files\n");
fprintf(stderr, "\t --fast optimize the data for fast normalization,\n" "\t which might increase its size (Writes fully decomposed\n" "\t regular mappings instead of delta mappings.\n" "\t You should measure the runtime speed to make sure that\n" "\t this is a good trade-off.)\n"); return argc<0 ? U_ILLEGAL_ARGUMENT_ERROR : U_ZERO_ERROR;
}
fprintf(stderr, "gennorm2 writes a dummy binary data file " "because UCONFIG_NO_NORMALIZATION is set, \n" "see icu/source/common/unicode/uconfig.h\n");
udata_createDummy(nullptr, nullptr, options[OUTPUT_FILENAME].value, errorCode); // Should not return an error since this is the expected behaviour if UCONFIG_NO_NORMALIZATION is on. // return U_UNSUPPORTED_ERROR; return 0;
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.