X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=test-parse-options.c;h=efa734b42e38d7f5a98393cd69ac0ffe10160ffc;hb=1d7d6ad539fabd49421d8ef7b27c0f287430bc7d;hp=e0669dcb41d1d779f274e1ff785352e284953b14;hpb=d32643c0ff6d74b967b65e867f1f99dba840836e;p=git.git diff --git a/test-parse-options.c b/test-parse-options.c index e0669dcb4..efa734b42 100644 --- a/test-parse-options.c +++ b/test-parse-options.c @@ -7,8 +7,9 @@ static unsigned long timestamp; static int abbrev = 7; static int verbose = 0, dry_run = 0, quiet = 0; static char *string = NULL; +static char *file = NULL; -int length_callback(const struct option *opt, const char *arg, int unset) +static int length_callback(const struct option *opt, const char *arg, int unset) { printf("Callback: \"%s\", %d\n", (arg ? arg : "not set"), unset); @@ -19,7 +20,7 @@ int length_callback(const struct option *opt, const char *arg, int unset) return 0; } -int number_callback(const struct option *opt, const char *arg, int unset) +static int number_callback(const struct option *opt, const char *arg, int unset) { *(int *)opt->value = strtol(arg, NULL, 10); return 0; @@ -27,6 +28,7 @@ int number_callback(const struct option *opt, const char *arg, int unset) int main(int argc, const char **argv) { + const char *prefix = "prefix/"; const char *usage[] = { "test-parse-options ", NULL @@ -43,6 +45,7 @@ int main(int argc, const char **argv) OPT_DATE('t', NULL, ×tamp, "get timestamp of