rename list_file_enable to array_file_enable
This commit is contained in:
parent
5cb2dccf0d
commit
cc8c9454d3
9 changed files with 21 additions and 21 deletions
|
@ -3,7 +3,7 @@ PhotoRec - Theory of operation:
|
||||||
Carvers are plugable. Each carver consists of:
|
Carvers are plugable. Each carver consists of:
|
||||||
|
|
||||||
struct file_hint_t - describes extension, name, max size, enable by default, etc.
|
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.
|
phmain.c - Contains the main() and driver logic for photorec.
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
#include "file_jpg.h"
|
#include "file_jpg.h"
|
||||||
#include "file_gz.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;
|
extern file_check_list_t file_check_list;
|
||||||
|
|
||||||
#define READ_SIZE 1024*512
|
#define READ_SIZE 1024*512
|
||||||
|
@ -277,7 +277,7 @@ int main(int argc, char **argv)
|
||||||
for(i=1; i<argc; i++)
|
for(i=1; i<argc; i++)
|
||||||
{
|
{
|
||||||
file_enable_t *file_enable;
|
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++)
|
||||||
if(argv[i][0]=='+' &&
|
if(argv[i][0]=='+' &&
|
||||||
file_enable->file_hint->extension!=NULL &&
|
file_enable->file_hint->extension!=NULL &&
|
||||||
strcmp(file_enable->file_hint->extension,&argv[i][1])==0)
|
strcmp(file_enable->file_hint->extension,&argv[i][1])==0)
|
||||||
|
@ -291,10 +291,10 @@ int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
/* Enable all file formats */
|
/* Enable all file formats */
|
||||||
file_enable_t *file_enable;
|
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_enable->enable=1;
|
||||||
}
|
}
|
||||||
file_stats=init_file_stats(list_file_enable);
|
file_stats=init_file_stats(array_file_enable);
|
||||||
#ifndef MAIN_fidentify
|
#ifndef MAIN_fidentify
|
||||||
for(i=1; i<argc; i++)
|
for(i=1; i<argc; i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -364,7 +364,7 @@ extern const file_hint_t file_hint_zcode;
|
||||||
extern const file_hint_t file_hint_zip;
|
extern const file_hint_t file_hint_zip;
|
||||||
extern const file_hint_t file_hint_zpr;
|
extern const file_hint_t file_hint_zpr;
|
||||||
|
|
||||||
file_enable_t list_file_enable[]=
|
file_enable_t array_file_enable[]=
|
||||||
{
|
{
|
||||||
#ifndef MAIN_fidentify
|
#ifndef MAIN_fidentify
|
||||||
{ .enable=0, .file_hint=&file_hint_sig },
|
{ .enable=0, .file_hint=&file_hint_sig },
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
#include "filegen.h"
|
#include "filegen.h"
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
extern file_enable_t list_file_enable[];
|
extern file_enable_t array_file_enable[];
|
||||||
extern file_check_list_t file_check_list;
|
extern file_check_list_t file_check_list;
|
||||||
|
|
||||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
|
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 */
|
/* Enable all file formats */
|
||||||
file_enable_t *file_enable;
|
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_enable->enable=1;
|
||||||
file_stats=init_file_stats(list_file_enable);
|
file_stats=init_file_stats(array_file_enable);
|
||||||
}
|
}
|
||||||
if(buffer_start==NULL)
|
if(buffer_start==NULL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "phcfg.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;
|
file_enable_t *file_enable;
|
||||||
for(file_enable=files_enable;file_enable->file_hint!=NULL;file_enable++)
|
for(file_enable=files_enable;file_enable->file_hint!=NULL;file_enable++)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#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_save(const file_enable_t *files_enable);
|
||||||
int file_options_load(file_enable_t *files_enable);
|
int file_options_load(file_enable_t *files_enable);
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
#include "dfxml.h"
|
#include "dfxml.h"
|
||||||
|
|
||||||
int need_to_stop=0;
|
int need_to_stop=0;
|
||||||
extern file_enable_t list_file_enable[];
|
extern file_enable_t array_file_enable[];
|
||||||
|
|
||||||
#ifdef HAVE_SIGACTION
|
#ifdef HAVE_SIGACTION
|
||||||
static struct sigaction action;
|
static struct sigaction action;
|
||||||
|
@ -150,7 +150,7 @@ int main( int argc, char **argv )
|
||||||
.expert=0,
|
.expert=0,
|
||||||
.lowmem=0,
|
.lowmem=0,
|
||||||
.verbose=0,
|
.verbose=0,
|
||||||
.list_file_format=list_file_enable
|
.list_file_format=array_file_enable
|
||||||
};
|
};
|
||||||
struct ph_param params;
|
struct ph_param params;
|
||||||
params.recup_dir=NULL;
|
params.recup_dir=NULL;
|
||||||
|
@ -370,7 +370,7 @@ int main( int argc, char **argv )
|
||||||
element_disk->disk=new_diskcache(element_disk->disk, testdisk_mode);
|
element_disk->disk=new_diskcache(element_disk->disk, testdisk_mode);
|
||||||
}
|
}
|
||||||
log_disk_list(list_disk);
|
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);
|
file_options_load(options.list_file_format);
|
||||||
#ifdef SUDO_BIN
|
#ifdef SUDO_BIN
|
||||||
if(list_disk==NULL)
|
if(list_disk==NULL)
|
||||||
|
|
|
@ -718,7 +718,7 @@ void interface_file_select_ncurses(file_enable_t *files_enable)
|
||||||
file_enable->enable=0;
|
file_enable->enable=0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
reset_list_file_enable(files_enable);
|
reset_array_file_enable(files_enable);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'b':
|
case 'b':
|
||||||
|
|
|
@ -88,7 +88,7 @@
|
||||||
#include "qphotorec.h"
|
#include "qphotorec.h"
|
||||||
|
|
||||||
extern const arch_fnct_t arch_none;
|
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)
|
QPhotorec::QPhotorec(QWidget *my_parent) : QWidget(my_parent)
|
||||||
{
|
{
|
||||||
|
@ -116,8 +116,8 @@ QPhotorec::QPhotorec(QWidget *my_parent) : QWidget(my_parent)
|
||||||
options->expert=0;
|
options->expert=0;
|
||||||
options->lowmem=0;
|
options->lowmem=0;
|
||||||
options->verbose=0;
|
options->verbose=0;
|
||||||
options->list_file_format=list_file_enable;
|
options->list_file_format=array_file_enable;
|
||||||
reset_list_file_enable(options->list_file_format);
|
reset_array_file_enable(options->list_file_format);
|
||||||
|
|
||||||
stop_the_recovery=false;
|
stop_the_recovery=false;
|
||||||
|
|
||||||
|
@ -936,7 +936,7 @@ void QPhotorec::qphotorec_formats()
|
||||||
file_enable_t *file_enable;
|
file_enable_t *file_enable;
|
||||||
QStringList list;
|
QStringList list;
|
||||||
formats=new QListWidget();
|
formats=new QListWidget();
|
||||||
for(file_enable=list_file_enable;
|
for(file_enable=array_file_enable;
|
||||||
file_enable->file_hint!=NULL;
|
file_enable->file_hint!=NULL;
|
||||||
file_enable++)
|
file_enable++)
|
||||||
{
|
{
|
||||||
|
@ -972,7 +972,7 @@ void QPhotorec::qphotorec_formats()
|
||||||
connect(bt_restore, SIGNAL(clicked()), this, SLOT(formats_restore()));
|
connect(bt_restore, SIGNAL(clicked()), this, SLOT(formats_restore()));
|
||||||
fenetre3.exec();
|
fenetre3.exec();
|
||||||
int i;
|
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 < formats->count() && file_enable->file_hint!=NULL;
|
||||||
i++, file_enable++)
|
i++, file_enable++)
|
||||||
{
|
{
|
||||||
|
@ -993,7 +993,7 @@ void QPhotorec::formats_restore()
|
||||||
{
|
{
|
||||||
file_enable_t *file_enable;
|
file_enable_t *file_enable;
|
||||||
int i;
|
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 < formats->count() && file_enable->file_hint!=NULL;
|
||||||
i++, file_enable++)
|
i++, file_enable++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue