Fix to deal with ncurses 5.8 API violation, newwin(0,0,0,0) doesn't create a new full-screen window anymore.

This commit is contained in:
Christophe Grenier 2011-03-28 09:12:38 +02:00
parent 87a42aeb97
commit 02e3edf762
14 changed files with 21 additions and 21 deletions

View file

@ -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));

View file

@ -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));

View file

@ -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

View file

@ -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);

View file

@ -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);

View file

@ -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
{

View file

@ -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);

View file

@ -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);

View file

@ -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");

View file

@ -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");

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);