X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=test-parse-options.c;h=efa734b42e38d7f5a98393cd69ac0ffe10160ffc;hb=20f34902d154f390ebaa7eed7f42ad14140b8acb;hp=e0669dcb41d1d779f274e1ff785352e284953b14;hpb=a9d29038a7acc0d37f801a2a923826a3539f4ae6;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