[i18ninfo] Add printing as ASCIIDOC format option 32/144532/3 accepted/tizen/4.0/unified/20170828.224213 accepted/tizen/unified/20170822.113115 submit/tizen/20170822.030347 submit/tizen_4.0/20170828.110001
authorHyunjee Kim <hj0426.kim@samsung.com>
Thu, 17 Aug 2017 06:07:08 +0000 (15:07 +0900)
committerhyunjee Kim <hj0426.kim@samsung.com>
Mon, 21 Aug 2017 00:45:43 +0000 (00:45 +0000)
Change-Id: Idb62044e609ebb55bfbc79a1bd0ae63306a005b6
Signed-off-by: Hyunjee Kim <hj0426.kim@samsung.com>
i18ninfo/i18ninfo.cpp
i18ninfo/i18ninfo_argp.h

index 5120955..44aae51 100644 (file)
@@ -1408,6 +1408,10 @@ int main(int argc, char *argv[])
                allTest();
        }
 
+       if (arguments.printASCII) {
+               ASCIIDOC_FLAG = 1;
+       }
+
        if (arguments.showAllLocale) {
                showAllLocale();
        }
index ed0ee0e..97913ad 100644 (file)
@@ -27,6 +27,7 @@ static struct argp_option options[] = {
        {"test-string-iter",            'S', "Type",              OPTION_ARG_OPTIONAL,  "String iteration test", 0       },
        {"set-locale",                          'l', "locale",            0,                                    "Set specific locale", 0         },
        {"show-ubidi",                          'b', 0,                           OPTION_ARG_OPTIONAL,  "Show examples of the Unicode Bidirectional Algorithm", 0        },
+       {"print-ASCII",                         'p', 0,                           0,                                    "Print results as the ASCIIDoc Format", 0        },
        { 0 }
 };
 
@@ -45,6 +46,7 @@ struct arguments {
        int testString;
        int testStringIter;
        int showUbidi;
+       int printASCII;
 
        char *arg1;                                       /* arg1 */
        char **strings;                           /* [string…] */
@@ -158,6 +160,10 @@ parse_opt(int key, char *arg, struct argp_state *state)
                        state->next++;
                }
                break;
+       case 'p':
+               arguments->arg_flag = 15;
+               arguments->printASCII = 1;
+               break;
        case ARGP_KEY_NO_ARGS:
                if (arguments->arg_flag == 0) {
                        argp_usage(state);