summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2011-03-28 09:12:38 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2011-03-28 09:12:38 +0200
commit02e3edf762d05ec4aacb348eb550f35ee1558a9f (patch)
tree5587b7e8c42eb60cd59a1db7823a46682ea84bef /src
parent87a42aeb971f0be3285425f2140a1ed19c387302 (diff)
Fix to deal with ncurses 5.8 API violation, newwin(0,0,0,0) doesn't create a new full-screen window anymore.
Diffstat (limited to 'src')
-rw-r--r--src/askloc.c2
-rw-r--r--src/dimage.c2
-rw-r--r--src/dirpart.c2
-rw-r--r--src/fat1x.c2
-rw-r--r--src/fat32.c2
-rw-r--r--src/fat_adv.c6
-rw-r--r--src/intrfn.c8
-rw-r--r--src/ntfs_adv.c4
-rw-r--r--src/ntfs_udl.c4
-rw-r--r--src/partmacn.c2
-rw-r--r--src/pfree_whole.c2
-rw-r--r--src/texfat.c2
-rw-r--r--src/thfs.c2
-rw-r--r--src/tntfs.c2
14 files changed, 21 insertions, 21 deletions
diff --git a/src/askloc.c b/src/askloc.c
index 55f380f..12ff468 100644
--- a/src/askloc.c
+++ b/src/askloc.c
@@ -148,7 +148,7 @@ char *ask_location(const char*msg, const char *src_dir, const char *dst_org)
char dst_directory[4096];
char *res=NULL;
int quit;
- WINDOW *window=newwin(0,0,0,0); /* full screen */
+ WINDOW *window=newwin(LINES, COLS, 0, 0); /* full screen */
aff_copy_short(window);
if(dst_org != NULL)
strncpy(dst_directory, dst_org, sizeof(dst_directory));
diff --git a/src/dimage.c b/src/dimage.c
index ed78435..c69b43c 100644
--- a/src/dimage.c
+++ b/src/dimage.c
@@ -110,7 +110,7 @@ int disk_image(disk_t *disk, const partition_t *partition, const char *image_dd)
return -1;
}
#ifdef HAVE_NCURSES
- window=newwin(0,0,0,0); /* full screen */
+ window=newwin(LINES, COLS, 0, 0); /* full screen */
aff_copy(window);
wmove(window,5,0);
wprintw(window,"%s\n",disk->description_short(disk));
diff --git a/src/dirpart.c b/src/dirpart.c
index 949019d..d946da5 100644
--- a/src/dirpart.c
+++ b/src/dirpart.c
@@ -103,7 +103,7 @@ int dir_partition(disk_t *disk_car, const partition_t *partition, const int verb
}
}
#ifdef HAVE_NCURSES
- window=newwin(0,0,0,0); /* full screen */
+ window=newwin(LINES, COLS, 0, 0); /* full screen */
dir_data.display=window;
aff_copy(window);
#else
diff --git a/src/fat1x.c b/src/fat1x.c
index d3b472f..8f9afa0 100644
--- a/src/fat1x.c
+++ b/src/fat1x.c
@@ -45,7 +45,7 @@
#ifdef HAVE_NCURSES
static void dump_fat1x_ncurses(disk_t *disk_car, partition_t *partition, const unsigned char *buffer_bs)
{
- WINDOW *window=newwin(0,0,0,0); /* full screen */
+ WINDOW *window=newwin(LINES, COLS, 0, 0); /* full screen */
keypad(window, TRUE); /* Need it to get arrow key */
aff_copy(window);
wmove(window,4,0);
diff --git a/src/fat32.c b/src/fat32.c
index a921d8d..4508638 100644
--- a/src/fat32.c
+++ b/src/fat32.c
@@ -47,7 +47,7 @@
#ifdef HAVE_NCURSES
static void dump_fat32_ncurses(disk_t *disk_car, const partition_t *partition, const unsigned char *buffer_bs, const unsigned char *buffer_backup_bs)
{
- WINDOW *window=newwin(0,0,0,0); /* full screen */
+ WINDOW *window=newwin(LINES, COLS, 0, 0); /* full screen */
keypad(window, TRUE); /* Need it to get arrow key */
aff_copy(window);
wmove(window,4,0);
diff --git a/src/fat_adv.c b/src/fat_adv.c
index 1636344..67cb5a9 100644
--- a/src/fat_adv.c
+++ b/src/fat_adv.c
@@ -190,7 +190,7 @@ static int ask_root_directory(disk_t *disk_car, const partition_t *partition, co
const file_data_t *current_file;
const file_data_t *pos=dir_list;
WINDOW *window;
- window=newwin(0,0,0,0); /* full screen */
+ window=newwin(LINES, COLS, 0, 0); /* full screen */
aff_copy(window);
wmove(window,4,0);
aff_part(window,AFF_PART_ORDER|AFF_PART_STATUS,disk_car,partition);
@@ -881,7 +881,7 @@ static int analyse_dir_entries2(disk_t *disk_car,const partition_t *partition, c
#ifdef HAVE_NCURSES
static void fat32_dump_ncurses(disk_t *disk_car, const partition_t *partition, const upart_type_t upart_type, const unsigned char *orgboot, const unsigned char *newboot)
{
- WINDOW *window=newwin(0,0,0,0); /* full screen */
+ WINDOW *window=newwin(LINES, COLS, 0, 0); /* full screen */
keypad(window, TRUE); /* Need it to get arrow key */
aff_copy(window);
wmove(window,4,0);
@@ -2279,7 +2279,7 @@ int repair_FAT_table(disk_t *disk_car, partition_t *partition, const int verbose
unsigned int fat32_root_cluster=0;
int fat_damaged=0;
#ifdef HAVE_NCURSES
- WINDOW *window=newwin(0,0,0,0); /* full screen */
+ WINDOW *window=newwin(LINES, COLS, 0, 0); /* full screen */
aff_copy(window);
#endif
{
diff --git a/src/intrfn.c b/src/intrfn.c
index 227ad12..2dfd8fe 100644
--- a/src/intrfn.c
+++ b/src/intrfn.c
@@ -569,7 +569,7 @@ unsigned long long int ask_number(const unsigned long long int val_cur, const un
void dump_ncurses(const void *nom_dump, unsigned int lng)
{
- WINDOW *window=newwin(0,0,0,0); /* full screen */
+ WINDOW *window=newwin(LINES, COLS, 0, 0); /* full screen */
keypad(window, TRUE); /* Need it to get arrow key */
aff_copy(window);
dump(window, nom_dump, lng);
@@ -1001,7 +1001,7 @@ int ask_confirmation(const char*_format, ...)
{
va_list ap;
int res;
- WINDOW *window=newwin(0,0,0,0); /* full screen */
+ WINDOW *window=newwin(LINES, COLS, 0, 0); /* full screen */
aff_copy(window);
va_start(ap,_format);
vaff_txt(4, window, _format, ap);
@@ -1017,7 +1017,7 @@ int ask_confirmation(const char*_format, ...)
void not_implemented(const char *msg)
{
- WINDOW *window=newwin(0,0,0,0); /* full screen */
+ WINDOW *window=newwin(LINES, COLS, 0, 0); /* full screen */
aff_copy(window);
wmove(window,7,0);
wprintw(window,"Function %s not implemented",msg);
@@ -1399,7 +1399,7 @@ void display_message(const char*msg)
{ 'Q', "Ok", "" },
{ 0, NULL, NULL }
};
- WINDOW *window=newwin(0,0,0,0); /* full screen */
+ WINDOW *window=newwin(LINES, COLS, 0, 0); /* full screen */
log_info("%s",msg);
aff_copy(window);
mvwaddstr(window,5,0,msg);
diff --git a/src/ntfs_adv.c b/src/ntfs_adv.c
index 721c42d..cc83a73 100644
--- a/src/ntfs_adv.c
+++ b/src/ntfs_adv.c
@@ -69,7 +69,7 @@ static int read_mft_info(disk_t *disk_car, partition_t *partition, const uint64_
#ifdef HAVE_NCURSES
static void ntfs_dump_ncurses(disk_t *disk_car, const partition_t *partition, const unsigned char *orgboot, const unsigned char *newboot)
{
- WINDOW *window=newwin(0,0,0,0); /* full screen */
+ WINDOW *window=newwin(LINES, COLS, 0, 0); /* full screen */
keypad(window, TRUE); /* Need it to get arrow key */
aff_copy(window);
wmove(window,4,0);
@@ -231,7 +231,7 @@ static void menu_write_ntfs_boot_sector_ncurses(disk_t *disk_car, partition_t *p
case 'D':
if(strchr(options,'D')!=NULL)
{
- WINDOW *window=newwin(0,0,0,0); /* full screen */
+ WINDOW *window=newwin(LINES, COLS, 0, 0); /* full screen */
keypad(window, TRUE); /* Need it to get arrow key */
aff_copy(window);
wmove(window,4,0);
diff --git a/src/ntfs_udl.c b/src/ntfs_udl.c
index 68fd070..9a9c76e 100644
--- a/src/ntfs_udl.c
+++ b/src/ntfs_udl.c
@@ -1500,7 +1500,7 @@ int ntfs_undelete_part(disk_t *disk_car, const partition_t *partition, const int
#endif
int res=dir_partition_ntfs_init(disk_car,partition,&dir_data,verbose);
#ifdef HAVE_NCURSES
- window=newwin(0,0,0,0); /* full screen */
+ window=newwin(LINES, COLS, 0, 0); /* full screen */
dir_data.display=window;
aff_copy(window);
#else
@@ -1571,7 +1571,7 @@ int ntfs_undelete_part(disk_t *disk_car, const partition_t *partition, const int
{
#ifdef HAVE_NCURSES
WINDOW *window;
- window=newwin(0,0,0,0); /* full screen */
+ window=newwin(LINES, COLS, 0, 0); /* full screen */
aff_copy(window);
#endif
log_info("\n");
diff --git a/src/partmacn.c b/src/partmacn.c
index a629c5e..d62baa4 100644
--- a/src/partmacn.c
+++ b/src/partmacn.c
@@ -43,7 +43,7 @@ extern const arch_fnct_t arch_mac;
void write_part_mac_warning_ncurses(void)
{
- WINDOW *window=newwin(0,0,0,0); /* full screen */
+ WINDOW *window=newwin(LINES, COLS, 0, 0); /* full screen */
aff_copy(window);
wmove(window,7,0);
wprintw(window,"Function write_part_mac not implemented");
diff --git a/src/pfree_whole.c b/src/pfree_whole.c
index 6a208c5..0c600ea 100644
--- a/src/pfree_whole.c
+++ b/src/pfree_whole.c
@@ -93,7 +93,7 @@ int ask_mode_ext2(const disk_t *disk_car, const partition_t *partition, unsigned
menu=0;
else
menu=1;
- window=newwin(0,0,0,0); /* full screen */
+ window=newwin(LINES, COLS, 0, 0); /* full screen */
aff_copy(window);
wmove(window,4,0);
aff_part(window, AFF_PART_ORDER|AFF_PART_STATUS,disk_car,partition);
diff --git a/src/texfat.c b/src/texfat.c
index a2f4b0e..e566647 100644
--- a/src/texfat.c
+++ b/src/texfat.c
@@ -44,7 +44,7 @@
#ifdef HAVE_NCURSES
static void exFAT_dump_ncurses(disk_t *disk, const partition_t *partition, const unsigned char *buffer_bs, const unsigned char *buffer_backup_bs)
{
- WINDOW *window=newwin(0,0,0,0); /* full screen */
+ WINDOW *window=newwin(LINES, COLS, 0, 0); /* full screen */
keypad(window, TRUE); /* Need it to get arrow key */
aff_copy(window);
wmove(window,4,0);
diff --git a/src/thfs.c b/src/thfs.c
index 62ac5ed..940e549 100644
--- a/src/thfs.c
+++ b/src/thfs.c
@@ -45,7 +45,7 @@
#ifdef HAVE_NCURSES
static void hfs_dump_ncurses(disk_t *disk_car, const partition_t *partition, const unsigned char *buffer_bs, const unsigned char *buffer_backup_bs)
{
- WINDOW *window=newwin(0,0,0,0); /* full screen */
+ WINDOW *window=newwin(LINES, COLS, 0, 0); /* full screen */
keypad(window, TRUE); /* Need it to get arrow key */
aff_copy(window);
wmove(window,4,0);
diff --git a/src/tntfs.c b/src/tntfs.c
index 6bf89e0..0309b13 100644
--- a/src/tntfs.c
+++ b/src/tntfs.c
@@ -45,7 +45,7 @@
#ifdef HAVE_NCURSES
static void dump_NTFS_ncurses(disk_t *disk_car, const partition_t *partition, const unsigned char *buffer_bs, const unsigned char *buffer_backup_bs)
{
- WINDOW *window=newwin(0,0,0,0); /* full screen */
+ WINDOW *window=newwin(LINES, COLS, 0, 0); /* full screen */
keypad(window, TRUE); /* Need it to get arrow key */
aff_copy(window);
wmove(window,4,0);