diff options
author | jozan <jozan@noemail.net> | 2020-11-08 02:05:51 +0000 |
---|---|---|
committer | jozan <jozan@noemail.net> | 2020-11-08 02:05:51 +0000 |
commit | be1b76dd2dd7271d9dc0f2b40a153da7d46b468f (patch) | |
tree | 42434a7edc55704563f5d9731f94f3eaa2aad394 /src | |
parent | Nice format, now subst (diff) | |
download | unixize-be1b76dd2dd7271d9dc0f2b40a153da7d46b468f.tar.gz unixize-be1b76dd2dd7271d9dc0f2b40a153da7d46b468f.tar.bz2 unixize-be1b76dd2dd7271d9dc0f2b40a153da7d46b468f.tar.xz unixize-be1b76dd2dd7271d9dc0f2b40a153da7d46b468f.tar.zst unixize-be1b76dd2dd7271d9dc0f2b40a153da7d46b468f.zip |
In progress
FossilOrigin-Name: fe483e3e811a959abf872390f4b4d92e707b30b1597b7616343d9e9c85e871e1
Diffstat (limited to 'src')
-rw-r--r-- | src/c_lfiles.c | 24 | ||||
-rw-r--r-- | src/c_lfiles.h | 1 | ||||
-rw-r--r-- | src/c_unixize.c | 6 |
3 files changed, 3 insertions, 28 deletions
diff --git a/src/c_lfiles.c b/src/c_lfiles.c index 36976b6..cffe974 100644 --- a/src/c_lfiles.c +++ b/src/c_lfiles.c @@ -116,30 +116,6 @@ c_lfiles_new } struct lfiles_s* -c_lfiles_duplicate(struct lfiles_s** head) -{ - struct lfiles_s* dup_head; - struct lfiles_s* dup_link; - struct lfiles_s* origin; - - dup_head = NULL; - if (head == NULL) { - return (NULL); - } - origin = *head; - while (origin != NULL) { - dup_link = c_lfiles_new(origin->filename, origin->filetype); - if (dup_link == NULL) { - u_dump_errno(); - return (NULL); - } - origin = origin->next; - c_lfiles_add_back(&dup_head, dup_link); - } - return (dup_head); -} - -struct lfiles_s* c_lfiles_gather(void) { DIR* dirp; diff --git a/src/c_lfiles.h b/src/c_lfiles.h index 039dbaa..f754553 100644 --- a/src/c_lfiles.h +++ b/src/c_lfiles.h @@ -49,7 +49,6 @@ #include "c_unixize.h" void c_lfiles_clear(struct lfiles_s**); -struct lfiles_s* c_lfiles_duplicate(struct lfiles_s**); struct lfiles_s* c_lfiles_gather(void); #endif /* end of include guard: __C_LFILES_H__ */ diff --git a/src/c_unixize.c b/src/c_unixize.c index 1e604d8..c1fdec0 100644 --- a/src/c_unixize.c +++ b/src/c_unixize.c @@ -56,6 +56,7 @@ #include "c_lfiles.h" #include "c_opts.h" +#include "c_subst.h" #include "c_unixize.h" #include "u_utils.h" @@ -93,12 +94,11 @@ main if (og_files == NULL) { return (0); } - new_files = c_lfiles_duplicate(&og_files); - if (og_files == NULL) { + new_files = c_subst_filenames(opts.hyphen, og_files); + if (new_files == NULL) { c_lfiles_clear(&og_files); return (1); } - /* c_subst(&opts, og_files); */ og_files_head = og_files; new_files_head = new_files; while (og_files != NULL && new_files != NULL) { |