]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/samples/coll/coll.cpp
ICU-62123.0.1.tar.gz
[apple/icu.git] / icuSources / samples / coll / coll.cpp
index 402ba4b49ae6557593d79cdddb9fb40816fa187e..afa57d0cbc1ab65e300525754928e8919eb73977 100644 (file)
@@ -1,8 +1,14 @@
-/********************************************************************
+/*************************************************************************
+ *
+ *   © 2016 and later: Unicode, Inc. and others.
+ *   License & terms of use: http://www.unicode.org/copyright.html#License
+ *
+ *************************************************************************
+ *************************************************************************
  * COPYRIGHT:
  * COPYRIGHT:
- * Copyright (C) 2002-2003 IBM, Inc.   All Rights Reserved.
+ * Copyright (C) 2002-2006 IBM, Inc.   All Rights Reserved.
  *
  *
- ********************************************************************/
+ *************************************************************************/
 
 /** 
  * This program demos string collation
 
 /** 
  * This program demos string collation
@@ -19,7 +25,7 @@ const char gHelpString[] =
     "-lower           Lower case first\n"
     "-upper           Upper case first\n"
     "-case            Enable separate case level\n"
     "-lower           Lower case first\n"
     "-upper           Upper case first\n"
     "-case            Enable separate case level\n"
-    "-level n         Sort level, 1 to 5, for Primary, Secndary, Tertiary, Quaternary, Identical\n"
+    "-level n         Sort level, 1 to 5, for Primary, Secondary, Tertiary, Quaternary, Identical\n"
        "-source string   Source string for comparison\n"
        "-target string   Target string for comparison\n"
     "Example coll -rules \\u0026b\\u003ca -source a -target b\n"
        "-source string   Source string for comparison\n"
        "-target string   Target string for comparison\n"
     "Example coll -rules \\u0026b\\u003ca -source a -target b\n"
@@ -86,7 +92,8 @@ UBool processOptions(int argc, const char **argv, OptSpec opts[])
 {
     for (int argNum = 1; argNum < argc; argNum ++) {
         const char *pArgName = argv[argNum];
 {
     for (int argNum = 1; argNum < argc; argNum ++) {
         const char *pArgName = argv[argNum];
-        for (OptSpec *pOpt = opts;  pOpt->name != 0; pOpt ++) {
+        OptSpec *pOpt;
+        for (pOpt = opts;  pOpt->name != 0; pOpt ++) {
             if (strcmp(pOpt->name, pArgName) == 0) {
                 switch (pOpt->type) {
                 case OptSpec::FLAG:
             if (strcmp(pOpt->name, pArgName) == 0) {
                 switch (pOpt->type) {
                 case OptSpec::FLAG: