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_unixize.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/c_unixize.c') diff --git a/src/c_unixize.c b/src/c_unixize.c index 5e92f71..bbf75f6 100644 --- a/src/c_unixize.c +++ b/src/c_unixize.c @@ -54,6 +54,7 @@ #include "c_lfiles.h" #include "c_opts.h" +#include "c_unixize.h" #include "u_utils.h" int @@ -67,7 +68,7 @@ main struct lfiles_s* og_files_head; struct lfiles_s* new_files_head; int nargc; - char* nargv; + char** nargv; c_get_opts(&opts, argc, argv); if (chdir((const char*)opts.dir) == -1) { @@ -97,8 +98,14 @@ main u_dump_errno_path(og_files->filename); } else { - /* rargc = u_get_rargv(&opts); */ - main(nargc, (const char**)nargv); + nargv = u_get_nargv(&opts); + if (nargv != NULL) { + nargc = 0; + while (argv[nargc] != NULL) { + nargc++; + } + main(nargc, (const char**)nargv); + } chdir("../"); } } -- cgit v1.2.3