From cc8c9454d38c74754741e434e14c59f10188c4c1 Mon Sep 17 00:00:00 2001 From: Christophe Grenier Date: Sat, 1 Feb 2020 09:41:49 +0100 Subject: [PATCH] rename list_file_enable to array_file_enable --- README_dev_photorec.txt | 2 +- src/fidentify.c | 8 ++++---- src/file_list.c | 2 +- src/fuzzerfidentify.cpp | 6 +++--- src/phcfg.c | 2 +- src/phcfg.h | 2 +- src/phmain.c | 6 +++--- src/phrecn.c | 2 +- src/qphotorec.cpp | 12 ++++++------ 9 files changed, 21 insertions(+), 21 deletions(-) diff --git a/README_dev_photorec.txt b/README_dev_photorec.txt index 04d64e99..a080fdfc 100644 --- a/README_dev_photorec.txt +++ b/README_dev_photorec.txt @@ -3,7 +3,7 @@ PhotoRec - Theory of operation: Carvers are plugable. Each carver consists of: struct file_hint_t - describes extension, name, max size, enable by default, etc. -file_enable_t list_file_enable[] - array with all file hints and whether enabled or not. +file_enable_t array_file_enable[] - array with all file hints and whether enabled or not. phmain.c - Contains the main() and driver logic for photorec. diff --git a/src/fidentify.c b/src/fidentify.c index 149487f2..090c0769 100644 --- a/src/fidentify.c +++ b/src/fidentify.c @@ -53,7 +53,7 @@ #include "file_jpg.h" #include "file_gz.h" -extern file_enable_t list_file_enable[]; +extern file_enable_t array_file_enable[]; extern file_check_list_t file_check_list; #define READ_SIZE 1024*512 @@ -277,7 +277,7 @@ int main(int argc, char **argv) for(i=1; ifile_hint!=NULL;file_enable++) + for(file_enable=array_file_enable;file_enable->file_hint!=NULL;file_enable++) if(argv[i][0]=='+' && file_enable->file_hint->extension!=NULL && strcmp(file_enable->file_hint->extension,&argv[i][1])==0) @@ -291,10 +291,10 @@ int main(int argc, char **argv) { /* Enable all file formats */ file_enable_t *file_enable; - for(file_enable=list_file_enable;file_enable->file_hint!=NULL;file_enable++) + for(file_enable=array_file_enable;file_enable->file_hint!=NULL;file_enable++) file_enable->enable=1; } - file_stats=init_file_stats(list_file_enable); + file_stats=init_file_stats(array_file_enable); #ifndef MAIN_fidentify for(i=1; i #include -extern file_enable_t list_file_enable[]; +extern file_enable_t array_file_enable[]; extern file_check_list_t file_check_list; extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) @@ -71,9 +71,9 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { /* Enable all file formats */ file_enable_t *file_enable; - for(file_enable=list_file_enable;file_enable->file_hint!=NULL;file_enable++) + for(file_enable=array_file_enable;file_enable->file_hint!=NULL;file_enable++) file_enable->enable=1; - file_stats=init_file_stats(list_file_enable); + file_stats=init_file_stats(array_file_enable); } if(buffer_start==NULL) { diff --git a/src/phcfg.c b/src/phcfg.c index c2567ce7..ef5a2668 100644 --- a/src/phcfg.c +++ b/src/phcfg.c @@ -43,7 +43,7 @@ #include "log.h" #include "phcfg.h" -void reset_list_file_enable(file_enable_t *files_enable) +void reset_array_file_enable(file_enable_t *files_enable) { file_enable_t *file_enable; for(file_enable=files_enable;file_enable->file_hint!=NULL;file_enable++) diff --git a/src/phcfg.h b/src/phcfg.h index b194e100..9b0418e5 100644 --- a/src/phcfg.h +++ b/src/phcfg.h @@ -2,7 +2,7 @@ extern "C" { #endif -void reset_list_file_enable(file_enable_t *files_enable); +void reset_array_file_enable(file_enable_t *files_enable); int file_options_save(const file_enable_t *files_enable); int file_options_load(file_enable_t *files_enable); diff --git a/src/phmain.c b/src/phmain.c index cbba88ec..34a802f7 100644 --- a/src/phmain.c +++ b/src/phmain.c @@ -78,7 +78,7 @@ #include "dfxml.h" int need_to_stop=0; -extern file_enable_t list_file_enable[]; +extern file_enable_t array_file_enable[]; #ifdef HAVE_SIGACTION static struct sigaction action; @@ -150,7 +150,7 @@ int main( int argc, char **argv ) .expert=0, .lowmem=0, .verbose=0, - .list_file_format=list_file_enable + .list_file_format=array_file_enable }; struct ph_param params; params.recup_dir=NULL; @@ -370,7 +370,7 @@ int main( int argc, char **argv ) element_disk->disk=new_diskcache(element_disk->disk, testdisk_mode); } log_disk_list(list_disk); - reset_list_file_enable(options.list_file_format); + reset_array_file_enable(options.list_file_format); file_options_load(options.list_file_format); #ifdef SUDO_BIN if(list_disk==NULL) diff --git a/src/phrecn.c b/src/phrecn.c index 972de61e..c805dce8 100644 --- a/src/phrecn.c +++ b/src/phrecn.c @@ -718,7 +718,7 @@ void interface_file_select_ncurses(file_enable_t *files_enable) file_enable->enable=0; } else - reset_list_file_enable(files_enable); + reset_array_file_enable(files_enable); } break; case 'b': diff --git a/src/qphotorec.cpp b/src/qphotorec.cpp index 93fbbf5b..40b3e102 100644 --- a/src/qphotorec.cpp +++ b/src/qphotorec.cpp @@ -88,7 +88,7 @@ #include "qphotorec.h" extern const arch_fnct_t arch_none; -extern file_enable_t list_file_enable[]; +extern file_enable_t array_file_enable[]; QPhotorec::QPhotorec(QWidget *my_parent) : QWidget(my_parent) { @@ -116,8 +116,8 @@ QPhotorec::QPhotorec(QWidget *my_parent) : QWidget(my_parent) options->expert=0; options->lowmem=0; options->verbose=0; - options->list_file_format=list_file_enable; - reset_list_file_enable(options->list_file_format); + options->list_file_format=array_file_enable; + reset_array_file_enable(options->list_file_format); stop_the_recovery=false; @@ -936,7 +936,7 @@ void QPhotorec::qphotorec_formats() file_enable_t *file_enable; QStringList list; formats=new QListWidget(); - for(file_enable=list_file_enable; + for(file_enable=array_file_enable; file_enable->file_hint!=NULL; file_enable++) { @@ -972,7 +972,7 @@ void QPhotorec::qphotorec_formats() connect(bt_restore, SIGNAL(clicked()), this, SLOT(formats_restore())); fenetre3.exec(); int i; - for (i = 0, file_enable=list_file_enable; + for (i = 0, file_enable=array_file_enable; i < formats->count() && file_enable->file_hint!=NULL; i++, file_enable++) { @@ -993,7 +993,7 @@ void QPhotorec::formats_restore() { file_enable_t *file_enable; int i; - for (i = 0, file_enable=list_file_enable; + for (i = 0, file_enable=array_file_enable; i < formats->count() && file_enable->file_hint!=NULL; i++, file_enable++) {