]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/tools/genrb/parse.cpp
ICU-62123.0.1.tar.gz
[apple/icu.git] / icuSources / tools / genrb / parse.cpp
index 34b94aec281816bdc62ba297c1adf1a9aa932b09..465c099baba90933a35ed6b23e8adf0d6c4cea7f 100644 (file)
@@ -1,3 +1,5 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
 /*
 *******************************************************************************
 *
 /*
 *******************************************************************************
 *
@@ -360,7 +362,7 @@ parseUCARules(ParseState* state, char *tag, uint32_t startline, const struct USt
     ucbuf = ucbuf_open(filename, &cp, getShowWarning(),FALSE, status);
 
     if (U_FAILURE(*status)) {
     ucbuf = ucbuf_open(filename, &cp, getShowWarning(),FALSE, status);
 
     if (U_FAILURE(*status)) {
-        error(line, "An error occured while opening the input file %s\n", filename);
+        error(line, "An error occurred while opening the input file %s\n", filename);
         return NULL;
     }
 
         return NULL;
     }
 
@@ -498,7 +500,7 @@ parseTransliterator(ParseState* state, char *tag, uint32_t startline, const stru
     ucbuf = ucbuf_open(filename, &cp, getShowWarning(),FALSE, status);
 
     if (U_FAILURE(*status)) {
     ucbuf = ucbuf_open(filename, &cp, getShowWarning(),FALSE, status);
 
     if (U_FAILURE(*status)) {
-        error(line, "An error occured while opening the input file %s\n", filename);
+        error(line, "An error occurred while opening the input file %s\n", filename);
         return NULL;
     }
 
         return NULL;
     }
 
@@ -756,13 +758,13 @@ GenrbImporter::getRules(
         return;
     }
     if (ucbuf.isNull() || U_FAILURE(errorCode)) {
         return;
     }
     if (ucbuf.isNull() || U_FAILURE(errorCode)) {
-        fprintf(stderr, "An error occured processing file %s. Error: %s\n", openFileName.data(), u_errorName(errorCode));
+        fprintf(stderr, "An error occurred processing file %s. Error: %s\n", openFileName.data(), u_errorName(errorCode));
         return;
     }
 
     /* Parse the data into an SRBRoot */
         return;
     }
 
     /* Parse the data into an SRBRoot */
-    struct SRBRoot *data =
-            parse(ucbuf.getAlias(), inputDir, outputDir, filename.data(), FALSE, FALSE, &errorCode);
+    LocalPointer<SRBRoot> data(
+            parse(ucbuf.getAlias(), inputDir, outputDir, filename.data(), FALSE, FALSE, &errorCode));
     if (U_FAILURE(errorCode)) {
         return;
     }
     if (U_FAILURE(errorCode)) {
         return;
     }