Index: source/tools/gencnval/gencnval.c |
diff --git a/source/tools/gencnval/gencnval.c b/source/tools/gencnval/gencnval.c |
index 5fe446f4ea99838e64a0135eb2bb2083c1604d8b..4f5da6a8d2986bf1db2208a08891fcdcbfa03e1f 100644 |
--- a/source/tools/gencnval/gencnval.c |
+++ b/source/tools/gencnval/gencnval.c |
@@ -1,7 +1,7 @@ |
/* |
******************************************************************************* |
* |
-* Copyright (C) 1999-2012, International Business Machines |
+* Copyright (C) 1999-2015 International Business Machines |
* Corporation and others. All Rights Reserved. |
* |
******************************************************************************* |
@@ -135,6 +135,7 @@ static uint16_t aliasListsSize = 0; |
/* Were the standard tags declared before the aliases. */ |
static UBool standardTagsUsed = FALSE; |
static UBool verbose = FALSE; |
+static UBool quiet = FALSE; |
static int lineNum = 1; |
static UConverterAliasOptions tableOptions = { |
@@ -203,7 +204,8 @@ enum |
VERBOSE, |
COPYRIGHT, |
DESTDIR, |
- SOURCEDIR |
+ SOURCEDIR, |
+ QUIET |
}; |
static UOption options[]={ |
@@ -212,7 +214,8 @@ static UOption options[]={ |
UOPTION_VERBOSE, |
UOPTION_COPYRIGHT, |
UOPTION_DESTDIR, |
- UOPTION_SOURCEDIR |
+ UOPTION_SOURCEDIR, |
+ UOPTION_QUIET |
}; |
extern int |
@@ -242,6 +245,7 @@ main(int argc, char* argv[]) { |
"options:\n" |
"\t-h or -? or --help this usage text\n" |
"\t-v or --verbose prints out extra information about the alias table\n" |
+ "\t-q or --quiet do not display warnings and progress\n" |
"\t-c or --copyright include a copyright notice\n" |
"\t-d or --destdir destination directory, followed by the path\n" |
"\t-s or --sourcedir source directory, followed by the path\n", |
@@ -253,6 +257,10 @@ main(int argc, char* argv[]) { |
verbose = TRUE; |
} |
+ if(options[QUIET].doesOccur) { |
+ quiet = TRUE; |
+ } |
+ |
if(argc>=2) { |
path=argv[1]; |
} else { |
@@ -929,7 +937,7 @@ createOneAliasList(uint16_t *aliasArrLists, uint32_t tag, uint32_t converter, ui |
value = aliasList->aliases[aliasNum] + offset; |
} else { |
value = 0; |
- if (tag != 0) { /* Only show the warning when it's not the leftover tag. */ |
+ if (tag != 0 && !quiet) { /* Only show the warning when it's not the leftover tag. */ |
fprintf(stderr, "%s: warning: tag %s does not have a default alias for %s\n", |
path, |
GET_TAG_STR(tags[tag].tag), |