From c013ca281dd21ecae068d59870bc9763b3a55787 Mon Sep 17 00:00:00 2001 From: Christophe Grenier Date: Mon, 29 Nov 2010 07:40:04 +0100 Subject: [PATCH] Compilation fix when ncurses is disabled --- src/pdisksel.c | 2 ++ src/phrecn.c | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/pdisksel.c b/src/pdisksel.c index 26617f75..8e9f20b6 100644 --- a/src/pdisksel.c +++ b/src/pdisksel.c @@ -59,6 +59,7 @@ #define INTER_DISK_X 0 #define INTER_DISK_Y (8+NBR_DISK_MAX) #define INTER_NOTE_Y (LINES-4) +#endif static int photorec_disk_selection_cli(int verbose, const char *recup_dir, const list_disk_t *list_disk, file_enable_t *file_enable, alloc_data_t *list_search_space, const char *cmd_device, char **current_cmd) { @@ -95,6 +96,7 @@ static int photorec_disk_selection_cli(int verbose, const char *recup_dir, const return 0; } +#ifdef HAVE_NCURSES static int photorec_disk_selection_ncurses(int verbose, const char *recup_dir, const list_disk_t *list_disk, file_enable_t *file_enable, alloc_data_t *list_search_space) { char * current_cmd=NULL; diff --git a/src/phrecn.c b/src/phrecn.c index 496ef248..4b64a7ac 100644 --- a/src/phrecn.c +++ b/src/phrecn.c @@ -849,13 +849,17 @@ int photorec(disk_t *disk_car, partition_t *partition, const int verbose, const if(session_save(list_search_space, disk_car, partition, files_enable, blocksize, paranoid, keep_corrupted_file, mode_ext2, expert, lowmem, carve_free_space_only, verbose)<0) { /* Failed to save the session! */ +#ifdef HAVE_NCURSES if(ask_confirmation("PhotoRec has been unable to save its session status. Answer Y to really Quit, N to resume the recovery")!=0) status=STATUS_QUIT; +#endif } else { +#ifdef HAVE_NCURSES if(ask_confirmation("Answer Y to really Quit, N to resume the recovery")!=0) - status=STATUS_QUIT; + status=STATUS_QUIT; +#endif } } else if(paranoid>0)