X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=test-parse-options.c;h=acd1a2ba70fc2ffb38cd8fb0784aa6e5e693183f;hb=48c250a121a425a1860226b6a7061aecfbab5246;hp=e0669dcb41d1d779f274e1ff785352e284953b14;hpb=1af4731b5435e708355f20463a458493aa0e5aca;p=git.git diff --git a/test-parse-options.c b/test-parse-options.c index e0669dcb4..acd1a2ba7 100644 --- a/test-parse-options.c +++ b/test-parse-options.c @@ -7,8 +7,10 @@ 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; +static int ambiguous; -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 +21,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 +29,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 +46,7 @@ int main(int argc, const char **argv) OPT_DATE('t', NULL, ×tamp, "get timestamp of