From e92ab2e6727c0b9ee36670ad8999a76ce902c63a Mon Sep 17 00:00:00 2001 From: hpa Date: Thu, 5 Feb 2004 00:40:23 +0000 Subject: [PATCH] Fix handling of windowing in complex.c --- menu/Makefile | 4 ++-- menu/biosio.h | 8 +------- menu/complex.c | 25 +++++++++++++++---------- 3 files changed, 18 insertions(+), 19 deletions(-) diff --git a/menu/Makefile b/menu/Makefile index 9514dda..fafcf27 100644 --- a/menu/Makefile +++ b/menu/Makefile @@ -47,6 +47,6 @@ clean: -rm -f *.s *.s16 *.o16 *.elf *.com *.a *.d spotless: clean - -rm -f *~ \#* + -rm -f *~ \#* .\#* --include *.d \ No newline at end of file +-include *.d diff --git a/menu/biosio.h b/menu/biosio.h index c4ba0c6..c7da3ff 100644 --- a/menu/biosio.h +++ b/menu/biosio.h @@ -10,12 +10,6 @@ * * ----------------------------------------------------------------------- */ -/* This program can be compiled for DOS with the OpenWatcom compiler - * (http://www.openwatcom.org/): - * - * wcl -3 -osx -mt .c - */ - #ifndef __BIOSIO_H__ #define __BIOSIO_H__ @@ -35,7 +29,7 @@ char getdisppage(); // Get current display page void clearwindow(char top,char left,char bot,char right, char page,char fillchar, char fillattr); -void cls(void); +void cls(void); /* Clears the entire current screen page */ void gotoxy(char row,char col, char page); diff --git a/menu/complex.c b/menu/complex.c index 8498618..fd2ef1c 100644 --- a/menu/complex.c +++ b/menu/complex.c @@ -37,12 +37,17 @@ char TESTING,RESCUE,MAIN,PREP; /* End globals */ +#define INFLINE 22 + void msys_handler(t_menusystem *ms, t_menuitem *mi) { + char nc; + nc = getnumcols(); // Get number of columns + if (mi->parindex != PREP) // If we are not in the PREP MENU { - gotoxy(21,0,ms->menupage); - cprint(ms->fillchar,ms->fillattr,80,ms->menupage); + gotoxy(INFLINE,0,ms->menupage); + cprint(' ',0x07,nc,ms->menupage); return; } strcpy (infoline," "); @@ -53,13 +58,13 @@ void msys_handler(t_menusystem *ms, t_menuitem *mi) else if (!flags.dhcp) strcat(infoline,"network=static "); if (flags.winrep) strcat(infoline,"repair=win "); if (flags.linrep) strcat(infoline,"repair=lin "); - gotoxy(20,0,ms->menupage); - cprint(ms->spacechar,ms->statusattr,80,ms->menupage); - gotoxy(21,0,ms->menupage); - cprint(ms->spacechar,ms->statusattr,80,ms->menupage); - gotoxy(20,0,ms->menupage); + gotoxy(INFLINE,0,ms->menupage); + cprint(' ',0x07,nc,ms->menupage); + gotoxy(INFLINE+1,0,ms->menupage); + cprint(' ',0x07,nc,ms->menupage); + gotoxy(INFLINE,0,ms->menupage); csprint("Kernel Arguments:"); - gotoxy(20,17,ms->menupage); + gotoxy(INFLINE,17,ms->menupage); csprint(infoline); } @@ -123,12 +128,12 @@ int menumain(char *cmdline) // Choose the default title and setup default values for all attributes.... init_menusystem(NULL); - set_window_size(1,1,23,79); // Leave one row/col all around + set_window_size(1,1,20,78); // Leave some space around // Choose the default values for all attributes and char's // -1 means choose defaults (Actually the next 4 lines are not needed) //set_normal_attr (-1,-1,-1,-1); - //set_status_info (-1,-1); + //set_status_info (-1,-1); // Display status on the last line //set_title_info (-1,-1); //set_misc_info(-1,-1,-1,-1); -- 2.7.4