From 4c62287110a7b81769d6999950b4a27a3d0cc046 Mon Sep 17 00:00:00 2001 From: jozan Date: Fri, 6 Nov 2020 01:28:25 +0000 Subject: Recursion in progress FossilOrigin-Name: 9acb0381b558565524c28866313ef303bca12cadc7def46d3a0efef91ffb8a81 --- src/c_opts.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/c_opts.c') diff --git a/src/c_opts.c b/src/c_opts.c index 6b163c7..c4efa73 100644 --- a/src/c_opts.c +++ b/src/c_opts.c @@ -88,14 +88,13 @@ c_get_opts const char* argv[]) { int opt; - bool_t confirm; - opts->recursive = FALSE; - opts->verbose = FALSE; - opts->pretend = FALSE; + opts->confirm = FALSE; opts->hidden = FALSE; opts->hyphen = FALSE; - confirm = FALSE; + opts->pretend = FALSE; + opts->recursive = FALSE; + opts->verbose = FALSE; while ((opt = getopt(argc, (char *const *)argv, C_OPTS)) != -1) { if (opt == 'a') { opts->hidden = TRUE; @@ -105,7 +104,7 @@ c_get_opts exit(0); } else if (opt == 'i') { - confirm = TRUE; + opts->confirm = TRUE; } else if (opt == 'n') { opts->hyphen = TRUE; @@ -133,7 +132,7 @@ c_get_opts else if (argv[optind] == NULL) { strncpy(opts->dir, ".", 2 * sizeof(char)); } - if (confirm == TRUE) { + if (opts->confirm == TRUE) { c_ask_confirm(opts->dir); } if (opts->pretend == TRUE) { -- cgit v1.2.3