Article 849 of comp.sys.amiga: Path: fishpond!mcdsun!noao!hao!ames!mailrus!umix!uunet!mcvax!enea!ttds!draken!kth!sics!jw From: jw@sics.se (Johan Widen) Newsgroups: comp.sys.amiga Subject: Fix to allow more than 24 lines in VT100R2.8 Message-ID: <1788@sics.se> Date: 5 Mar 88 04:09:13 GMT Reply-To: jw@sics.se (Johan Widen) Organization: Swedish Institute of Computer Science, Kista Lines: 169 Here is fix to allow a screen size larger than 24 lines in VT100R2.8. I have also included some changes that are necessary in order to get the code through Lattice 4.0. *** :vt100.h.old Tue Mar 01 14:00:56 1988 --- vt100.h Sat Mar 05 01:07:32 1988 *************** *** 24,31 **** #define VERSION "VT100 (V2.8 ACS 880117) Terminal Window" /*********** ######## define the compiler type here ######## ********/ ! #define LATTICE 0 ! #define MANX 1 /* compiler directives to fetch the necessary header files */ #include --- 24,31 ---- #define VERSION "VT100 (V2.8 ACS 880117) Terminal Window" /*********** ######## define the compiler type here ######## ********/ ! #define LATTICE 1 ! #define MANX 0 /* compiler directives to fetch the necessary header files */ #include *************** *** 52,57 **** --- 52,67 ---- #include #include + #if LATTICE + #include + #include + #include + #include + #include + #include + #include + #endif + #if MANX #include #undef NULL *************** *** 106,114 **** --- 116,126 ---- #define BEEPFREQ 1000L #define COLORCLOCK 3579545L + #if MANX extern struct MsgPort *CreatePort(); extern char *malloc(),*strcpy(),*fgets(); extern long ftell(); + #endif extern int multi; /* flags multi file transfers */ extern int server; *************** *** 235,238 **** /* expand.c */ extern char **expand(); extern int set_dir(), free_expand(); - --- 247,249 ---- *** :init.c.old Fri Mar 04 14:54:06 1988 --- init.c Sat Mar 05 02:32:40 1988 *************** *** 213,218 **** --- 213,219 ---- FILE *fd = NULL; char *p, *t, *ifile; int l, dont_init = 0; + int screen_height; doing_init = 1; /* make sure we only allow INIT script commands */ if (argc > 1) { *************** *** 277,282 **** --- 278,284 ---- cleanup("can't open graphics library",2); /* Now set up all the screen info as necessary */ + screen_height = GfxBase->NormalDisplayRows ; if(p_lines == 0) /* Wants to use everything available */ if(p_interlace) p_lines = ((GfxBase->NormalDisplayRows*2) - 6) / 8; *************** *** 284,299 **** p_lines = ((GfxBase->NormalDisplayRows - 6) / 8); if (p_interlace == 0) { - if (p_lines > 24) p_lines = 24; MINY = 14; NewWindow.Height = (long)((p_lines*8)+8); } else { - if (p_lines > 48) p_lines = 48; MINY = 16; NewScreen.ViewModes |= LACE; NewWindow.Height = (long)((p_lines*8)+10); } NewWindow.MinHeight = NewWindow.Height; NewWindow.MaxHeight = NewWindow.Height; NewWindow.TopEdge = 0L; --- 286,300 ---- p_lines = ((GfxBase->NormalDisplayRows - 6) / 8); if (p_interlace == 0) { MINY = 14; NewWindow.Height = (long)((p_lines*8)+8); } else { MINY = 16; NewScreen.ViewModes |= LACE; NewWindow.Height = (long)((p_lines*8)+10); } + NewScreen.Height = NewWindow.Height; NewWindow.MinHeight = NewWindow.Height; NewWindow.MaxHeight = NewWindow.Height; NewWindow.TopEdge = 0L; *************** *** 307,318 **** if (p_depth < 1) p_depth = 1; NewScreen.Depth = (long)p_depth; - NewScreen.Height = (long)((p_lines*8)+16); - if (p_interlace == 1) ! NewScreen.TopEdge = (long)(400 - NewScreen.Height); else ! NewScreen.TopEdge = (long)(208 - NewScreen.Height); } else { p_depth = 2L; --- 308,317 ---- if (p_depth < 1) p_depth = 1; NewScreen.Depth = (long)p_depth; if (p_interlace == 1) ! NewScreen.TopEdge = (long)(screen_height*2 - NewScreen.Height); else ! NewScreen.TopEdge = (long)(screen_height - NewScreen.Height); } else { p_depth = 2L; *** :window.c.old Tue Mar 01 14:01:14 1988 --- window.c Sat Mar 05 01:51:58 1988 *************** *** 74,81 **** int getinp; { ULONG class; - USHORT position, RemoveGadget(); - unsigned int code, qual; int lprmpt, lname; struct IntuiMessage *Msg; --- 74,79 ---- Johan Widen SICS, PO Box 1263, S-164 28 KISTA, SWEDEN Tel: +46 8 752 15 32 Ttx: 812 61 54 SICS S Fax: +46 8 751 72 30 Internet: jw@sics.se or {mcvax,munnari,ukc,unido}!enea!sics.se!jw -- Johan Widen SICS, PO Box 1263, S-164 28 KISTA, SWEDEN Tel: +46 8 752 15 32 Ttx: 812 61 54 SICS S Fax: +46 8 751 72 30 Internet: jw@sics.se or {mcvax,munnari,ukc,unido}!enea!sics.se!jw