aboutsummaryrefslogtreecommitdiffstats
path: root/src/c_unixize.c
diff options
context:
space:
mode:
authorjozan <jozan@noemail.net>2020-11-06 01:28:25 +0000
committerjozan <jozan@noemail.net>2020-11-06 01:28:25 +0000
commit4c62287110a7b81769d6999950b4a27a3d0cc046 (patch)
tree3b7b6729c3f019a269e7224a3b9b68cd941bde94 /src/c_unixize.c
parentLooks like I have to code well (diff)
downloadunixize-4c62287110a7b81769d6999950b4a27a3d0cc046.tar.gz
unixize-4c62287110a7b81769d6999950b4a27a3d0cc046.tar.bz2
unixize-4c62287110a7b81769d6999950b4a27a3d0cc046.tar.xz
unixize-4c62287110a7b81769d6999950b4a27a3d0cc046.tar.zst
unixize-4c62287110a7b81769d6999950b4a27a3d0cc046.zip
Recursion in progress
FossilOrigin-Name: 9acb0381b558565524c28866313ef303bca12cadc7def46d3a0efef91ffb8a81
Diffstat (limited to '')
-rw-r--r--src/c_unixize.c13
1 files changed, 10 insertions, 3 deletions
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("../");
}
}