1ST007: 5^Z key lets you get mainmenu any time! Starship Trooper #1 @12754 9Í2God9Í0 Wed Mar 03 17:36:40 1993 /* *Name : Main Menu Anywhere *Filename : ST007.MOD (alternate: getmain.mod) *Description: The ^Z key can summon a main menu prompt, from within anything. *Difficulty : Block copying. *Version : 4.22 *Files : COM.C only! *Author : Starship Trooper 1@2750 Net 1@12754 Link *Date : Mar 1993 */ Much like ST005, this is a standard feature of the UNIX operating system. In most UNIX programs, you can press control-Z to "Suspend" the process, putting it in the background. You will then be at the shell prompt, and can do whatever you want before calling your original process back. I have added this feature to WWIV. ^Z can be used anywhere (just like ^T (time report)). Some possible uses: --A remote user is reading the mod sub, and wants to capture a post without the annoying 3[PAUSE]0. He can ^Z, change the 'D'efaults to eliminate the pause, and return to the Read: prompt. --Drop out of an N-scan to look up a subtype in //BOARDEDIT --While reading mail, ^Z out and fix whatever was requested This can be used locally or thru a modem. After you see the main menu prompt once, you will be returned to your former position, with the line of text you were currently at restored. 1. File COM.C, near the top void mainmenu2(void); 2. Still in COM.C, search for 'case 20' and add case 26 after it: case 20: if (echo) ptime(); break; case 26: /* add st007 */ if ((usernum>0) && (actsl>10)) /* add */ mainmenu2(); /* add */ break; /* add */ case 18: if (echo) (the 'if' is necessary so ^Z is not available at the NN: prompt!) 3. Add this function at the bottom of COM.C: void mainmenu2(void) { unsigned char x,y; int i; unsigned savelin[80]; union REGS r; r.h.ah=0x03; r.h.bh=0x00; int86(0x10, &r, &r); x=r.h.dl; y=r.h.dh; for (i=0; i>8) { outchr(0x00FF & savelin[i]); } else { curatr=savelin[i]>>8; setc(curatr); outchr(0x00FF & savelin[i]); } } } (mainmenu2() preserves the current line of text, such as a prompt, runs mainmenu(), then restores the original line) 4. Compile and send me mail. Or kill me. ------------------------------------ <<< Bonus Mini-TrooperMod - (too trivial for its own file) <<< add after the 'case's in mainmenu(): <<< default: if ((s[0]>'9') || (s[0]<'0')) <<< pl("That key doesn't do anything!"); <<< ðð TrooperWare/WWIV: [ST001- Random sysop-unavailable ][ST002- One-key user validation ] [ST003- Lock xfers during prime time ][ST004- numlock light when user on ] [ST005- UNIX-like //FINGER ][ST006- 95 colors ] [ST007- ^Z summons main menu ] [STRCOM - WWIV 4.22 String Compiler ] [ELLNET - replacement for LNET, but full-screen, color, menu, editing, more]