]> granicus.if.org Git - icu/commitdiff
ICU-9786 fix symbol collision truncate on BSD
authorSteven R. Loomis <srl@icu-project.org>
Mon, 10 Dec 2012 19:41:03 +0000 (19:41 +0000)
committerSteven R. Loomis <srl@icu-project.org>
Mon, 10 Dec 2012 19:41:03 +0000 (19:41 +0000)
X-SVN-Rev: 32937

icu4c/source/tools/genrb/derb.c

index 2a48d98f542980eb75072682c59524556845ed4d..4aff26e0bdada9effbb031a22396f3204461e8da 100644 (file)
@@ -54,7 +54,7 @@ static UConverter *defaultConverter = 0;
 
 static const int32_t indentsize = 4;
 static int32_t truncsize = DERB_DEFAULT_TRUNC;
-static UBool truncate = FALSE;
+static UBool opt_truncate = FALSE;
 
 static const char *getEncodingName(const char *encoding);
 static void reportError(const char *pname, UErrorCode *status, const char *when);
@@ -152,14 +152,14 @@ main(int argc, char* argv[]) {
     }
 
     if(options[4].doesOccur) {
-        truncate = TRUE;
+        opt_truncate = TRUE;
         if(options[4].value != NULL) {
             truncsize = atoi(options[4].value); /* user defined printable size */
         } else {
             truncsize = DERB_DEFAULT_TRUNC; /* we'll use default omitting size */
         }
     } else {
-        truncate = FALSE;
+        opt_truncate = FALSE;
     }
 
     if(options[5].doesOccur) {
@@ -473,7 +473,7 @@ static void printOutAlias(FILE *out,  UConverter *converter, UResourceBundle *pa
     int32_t len = 0;
     const UChar* thestr = res_getAlias(&(parent->fResData), r, &len);
     UChar *string = quotedString(thestr);
-    if(truncate && len > truncsize) {
+    if(opt_truncate && len > truncsize) {
         char msg[128];
         printIndent(out, converter, indent);
         sprintf(msg, "// WARNING: this resource, size %li is truncated to %li\n",
@@ -517,7 +517,7 @@ static void printOutBundle(FILE *out, UConverter *converter, UResourceBundle *re
             UChar *string = quotedString(thestr);
 
             /* TODO: String truncation */
-            if(truncate && len > truncsize) {
+            if(opt_truncate && len > truncsize) {
                 char msg[128];
                 printIndent(out, converter, indent);
                 sprintf(msg, "// WARNING: this resource, size %li is truncated to %li\n",
@@ -576,7 +576,7 @@ static void printOutBundle(FILE *out, UConverter *converter, UResourceBundle *re
         {
             int32_t len = 0;
             const int8_t *data = (const int8_t *)ures_getBinary(resource, &len, status);
-            if(truncate && len > truncsize) {
+            if(opt_truncate && len > truncsize) {
                 char msg[128];
                 printIndent(out, converter, indent);
                 sprintf(msg, "// WARNING: this resource, size %li is truncated to %li\n",