From 01be6c6629150559c787c1f39929036b44b54c8f Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Fri, 20 Dec 2024 11:00:55 +0900 Subject: [PATCH] Remove DEBUG outputs, fix outputs --- src/archiver.c | 4 ++-- src/main.c | 6 +++++- src/parser.c | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/archiver.c b/src/archiver.c index 4b947f0..64869e8 100644 --- a/src/archiver.c +++ b/src/archiver.c @@ -3835,7 +3835,7 @@ int simple_archiver_write_v2(FILE *out_f, SDArchiverState *state, } // Write directory entries. - fprintf(stderr, "DEBUG: Writing directory entries\n"); + //fprintf(stderr, "DEBUG: Writing directory entries\n"); if (dirs_list->count > 0xFFFFFFFF) { return SDAS_TOO_MANY_DIRS; @@ -5658,7 +5658,7 @@ int simple_archiver_parse_archive_version_2(FILE *in_f, int_fast8_t do_extract, } simple_archiver_helper_32_bit_be(&gid); - fprintf(stderr, "DEBUG: Creating dir \"%s\"\n", buf); + fprintf(stderr, "Creating dir \"%s\"\n", buf); __attribute__((cleanup(simple_archiver_helper_cleanup_c_string))) char *abs_path_dir = realpath(".", NULL); diff --git a/src/main.c b/src/main.c index 937b5c2..86f9da8 100644 --- a/src/main.c +++ b/src/main.c @@ -31,7 +31,11 @@ int print_list_fn(void *data, __attribute__((unused)) void *ud) { const SDArchiverFileInfo *file_info = data; if (file_info->link_dest == NULL) { - fprintf(stderr, " REGULAR FILE: %s\n", file_info->filename); + if (file_info->flags & 1) { + fprintf(stderr, " DIRECTORY: %s\n", file_info->filename); + } else { + fprintf(stderr, " REGULAR FILE: %s\n", file_info->filename); + } } else { fprintf(stderr, " SYMBOLIC LINK: %s -> %s\n", file_info->filename, file_info->link_dest); diff --git a/src/parser.c b/src/parser.c index 4ee149d..51eb858 100644 --- a/src/parser.c +++ b/src/parser.c @@ -665,7 +665,7 @@ SDArchiverLinkedList *simple_archiver_parsed_to_filenames( simple_archiver_list_add(files_list, f_info, simple_archiver_internal_free_file_info_fn); - fprintf(stderr, "DEBUG: parser added empty dir %s\n", next); + //fprintf(stderr, "DEBUG: parser added empty dir %s\n", next); } if (simple_archiver_list_remove(dir_list, list_remove_same_str_fn, -- 2.49.0