mailinfo: do not let handle_boundary() touch global "line" directly
[gitweb.git] / test-parse-options.c
index 5dabce60f363430d3800bdadc77b3617abbcbfb6..2c8c8f18edb46378b39c170b4ae6f7250ec631f5 100644 (file)
@@ -4,6 +4,7 @@
 
 static int boolean = 0;
 static int integer = 0;
+static unsigned long magnitude = 0;
 static unsigned long timestamp;
 static int abbrev = 7;
 static int verbose = 0, dry_run = 0, quiet = 0;
@@ -48,6 +49,7 @@ int main(int argc, char **argv)
                OPT_GROUP(""),
                OPT_INTEGER('i', "integer", &integer, "get a integer"),
                OPT_INTEGER('j', NULL, &integer, "get a integer, too"),
+               OPT_MAGNITUDE('m', "magnitude", &magnitude, "get a magnitude"),
                OPT_SET_INT(0, "set23", &integer, "set integer to 23", 23),
                OPT_DATE('t', NULL, &timestamp, "get timestamp of <time>"),
                OPT_CALLBACK('L', "length", &integer, "str",
@@ -82,7 +84,8 @@ int main(int argc, char **argv)
        argc = parse_options(argc, (const char **)argv, prefix, options, usage, 0);
 
        printf("boolean: %d\n", boolean);
-       printf("integer: %u\n", integer);
+       printf("integer: %d\n", integer);
+       printf("magnitude: %lu\n", magnitude);
        printf("timestamp: %lu\n", timestamp);
        printf("string: %s\n", string ? string : "(not set)");
        printf("abbrev: %d\n", abbrev);