Compilation fix when curses interface is missing
This commit is contained in:
parent
8160321408
commit
06a90fa1c2
5 changed files with 16 additions and 12 deletions
|
@ -24,6 +24,7 @@
|
|||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NCURSES
|
||||
#include <stdio.h>
|
||||
#include "types.h"
|
||||
#include "common.h"
|
||||
|
@ -59,3 +60,4 @@ list_part_t *add_partition_ncurses(disk_t *disk, list_part_t *list_part)
|
|||
return add_partition_xbox_ncurses(disk, list_part);
|
||||
return list_part;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -179,10 +179,13 @@ int dir_partition(disk_t *disk_car, const partition_t *partition, const int verb
|
|||
dir_partition_aff(disk_car, partition, &dir_data, dir_data.current_inode, current_cmd);
|
||||
#else
|
||||
{
|
||||
file_data_t *dir_list;
|
||||
dir_list=dir_data.get_dir(disk_car, partition, &dir_data, dir_data.current_inode);
|
||||
dir_aff_log(&dir_data, dir_list);
|
||||
delete_list_file(dir_list);
|
||||
file_info_t dir_list = {
|
||||
.list = TD_LIST_HEAD_INIT(dir_list.list),
|
||||
.name = NULL
|
||||
};
|
||||
dir_data.get_dir(disk_car, partition, &dir_data, dir_data.current_inode, &dir_list);
|
||||
dir_aff_log(&dir_data, &dir_list);
|
||||
delete_list_file(&dir_list);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -33,9 +33,6 @@
|
|||
#include "types.h"
|
||||
#include "common.h"
|
||||
#include "intrf.h"
|
||||
#ifdef HAVE_NCURSES
|
||||
#include "intrfn.h"
|
||||
#endif
|
||||
#include "log.h"
|
||||
#include "hdaccess.h"
|
||||
#include "geometry.h"
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NCURSES
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
|
@ -33,9 +34,7 @@
|
|||
#include "types.h"
|
||||
#include "common.h"
|
||||
#include "intrf.h"
|
||||
#ifdef HAVE_NCURSES
|
||||
#include "intrfn.h"
|
||||
#endif
|
||||
#include "log.h"
|
||||
#include "hdaccess.h"
|
||||
#include "autoset.h"
|
||||
|
@ -186,3 +185,4 @@ int change_geometry_ncurses(disk_t *disk_car)
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -303,13 +303,16 @@ int do_curses_photorec(struct ph_param *params, struct ph_options *options, cons
|
|||
static alloc_data_t list_search_space={
|
||||
.list = TD_LIST_HEAD_INIT(list_search_space.list)
|
||||
};
|
||||
#ifdef HAVE_NCURSES
|
||||
if(params->cmd_device==NULL)
|
||||
{
|
||||
char *saved_device=NULL;
|
||||
char *saved_cmd=NULL;
|
||||
session_load(&saved_device, &saved_cmd,&list_search_space);
|
||||
if(saved_device!=NULL && saved_cmd!=NULL && !td_list_empty(&list_search_space.list) && ask_confirmation("Continue previous session ? (Y/N)")!=0)
|
||||
if(saved_device!=NULL && saved_cmd!=NULL && !td_list_empty(&list_search_space.list)
|
||||
#ifdef HAVE_NCURSES
|
||||
&& ask_confirmation("Continue previous session ? (Y/N)")!=0
|
||||
#endif
|
||||
)
|
||||
{
|
||||
/* yes */
|
||||
params->cmd_run=saved_cmd;
|
||||
|
@ -322,7 +325,6 @@ int do_curses_photorec(struct ph_param *params, struct ph_options *options, cons
|
|||
free_list_search_space(&list_search_space);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if(params->cmd_device!=NULL && params->cmd_run!=NULL)
|
||||
return photorec_disk_selection_cli(params, options, list_disk, &list_search_space);
|
||||
#ifdef HAVE_NCURSES
|
||||
|
|
Loading…
Reference in a new issue