2TFC003.MOD 1The Complete Clear Screen Mod The Flying Chicken [SysOp] #1 @12456 3Saturday, February 27, 1993 1 8:09 pm TFC003.MOD - The Complete Clear Screen Mod Author: The Flying Chicken 1@12456 (WWIVLink) 1@2456 (WWIVNet) 1@2456 (IceNet) Source: WWIV 4.20 thru 4.22 Version: 1.1 I know that there are about four hundred versions of this mod, but none of them were complete in my eyes, so I've decided to release the one I use. This mod will allow you to clear the screen before reading each message or e-mail, and also before writing messages or e-mail. Also, an option will be added to the defaults section so you can toggle this option on and off. And finally, newusers will be asked if the want the clear screen feature. One final note, Wayne evidentally was planning on using this feature since there is a variable set up for it, but it isn't used yet, so we will just save Wayne some work. For WWIV 4.22, look for the version number of v1.1! A 4.22 note, this mod replaces some of the get_string() calls with actual strings. This is done for simple reasons, it's easier that way. If you want to modify your string thru ESM instead of replacing the function call, feel free. I don't include those instructions, since not everyone uses ESM, but if you know anything about ESM, it isn't hard. v1.1 Upgrade to 4.22 v1.0 Initial version Before using this or any mod, back up your source !!!!! PKZIP source *.c *.h *.mak 1. Load up MSGBASE.C and search for void read_message() and make the following changes. void read_message(int n, int *next, int *val) { char s[100],s1[80]; postrec p; int abort,a; slrec ss; nl(); /* DELETE THIS LINE */ abort=0; *next=0; if (thisuser.sysstatus & sysstatus_clr_scrn) /* ADD */ outchr(12); /* ADD */ else /* ADD */ nl(); /* ADD */ sprintf(s,"(%u/%u): ",n,nummsgs); osan(s,&abort,next); ansic(MSG_COLOR); p=msgs[n]; 2. Search for void inmsg(), scroll down some, and make the changes shown. v1.1 - Note that 4.22 code is slightly different in this area, look for the WWIV version numbers below! nl(); helpl=6; if ((thisuser.sysstatus & sysstatus_clr_scrn) && (!fsed)) /* ADD */ outchr(12); /* ADD */ if (okansi()) { prt(2,"Title: "); /* WWIV 4.21a and under ONLY */ prt(2,get_string(326)); /* WWIV 4.22 ONLY */ mpl(60); inputl(title,60); } else { pl(" (---=----=----=----=----=----=----=----=----=----=----=----)"); outstr("Title: "); inputl(title,60); } 3. Save MSGBASE.C. 4. Load MSGBASE1.C. Search for void readmail(). Scroll down a little farther, and make the following changes. i=atoi(s); if (i) if (i<=mw) curmail=i-1; else curmail=0; else curmail=0; } done=0; do { if (thisuser.sysstatus & sysstatus_clr_scrn) /* ADD */ outchr(12); /* ADD */ else { /* ADD */ nl();nl(); /* ADD */ } /* ADD */ sprintf(s,"(%u/%u): ",curmail+1,mw); abort=0; nl(); /* DELETE THIS LINE */ nl(); /* DELETE THIS LINE */ osan(s,&abort,&next); next=0; ansic(MSG_COLOR); 5. Save MSGBASE1.C. 6. Load DEFAULTS.C. Search for print_cur_stat() and make the following changes. v1.1 - This block is split into two parts, one for WWIV versions up to 4.21a, the second part for WWIV 4.22 ONLY. If you have 4.21a or under, do this part. If you have 4.22, go to the block following this one. /* v1.1 - This block is for 4.21a and under ONLY */ npr("A. Extended colors : %s\r\n", (thisuser.sysstatus & sysstatus_funky_colors)?"Yes":"No"); } npr("B. Optional lines : %d\r\n",thisuser.optional_val); npr("C. Clear screen : %s\r\n", /* ADD */ (thisuser.sysstatus & sysstatus_clr_scrn)?"Yes":"No"); /* ADD */ if (thisuser.wwiv_regnum) npr("W. WWIV reg num : %ld\r\n",thisuser.wwiv_regnum); else pl("W. WWIV reg num : "); pl("Q. Quit to main menu"); /* v1.1 - This block is for 4.22 ONLY */ outstr(get_string(399)); npr("%s\r\n", (thisuser.sysstatus & sysstatus_funky_colors)?str_yes:str_no); } outstr(get_string(400)); npr("%d\r\n",thisuser.optional_val); npr("C. Clear Screen : %s\r\n", /* ADD */ (thisuser.sysstatus & sysstatus_clr_scrn) ? "Yes" : "No"); /* ADD */ outstr(get_string(401)); if (thisuser.wwiv_regnum) npr("%ld\r\n",thisuser.wwiv_regnum); else pl(get_string(402)); pl(get_string(403)); 7. Search for void defaults() and make the following changes. void defaults() { int i,i1,i2,done; char s[81],s1[81],s2[81],ch; done=0; print_cur_stat(); do { nl(); helpl=4; if (okansi()) { prt(2,"Defaults: (1-9,A-C,?,Q) : "); /* CHANGE */ ch=onek("Q?123456789ABCW"); /* CHANGE */ } else { prt(2,"Defaults: (1-7,C,?,Q) : "); /* CHANGE */ ch=onek("Q?1234567BCW"); /* CHANGE */ } 8. Scroll down a little farther and make the changes. case 'B': optional_lines(); break; case 'C': /* ADD */ if (thisuser.sysstatus & sysstatus_clr_scrn) /* ADD */ thisuser.sysstatus ^= sysstatus_clr_scrn; /* ADD */ nl(); /* ADD */ prt(5,"Clear screen before each message? "); /* ADD */ if (yn()) /* ADD */ thisuser.sysstatus |= sysstatus_clr_scrn; /* ADD */ break; /* ADD */ case 'W': enter_regnum(); break; 9. Save DEFAULTS.C. 10. Load NEWUSER.C. Search for void newuser() and add the following function right before it. void input_clr_scrn() /* ADD ENTIRE VOID */ { if (thisuser.sysstatus & sysstatus_clr_scrn) thisuser.sysstatus ^= sysstatus_clr_scrn; nl(); prt(5,"Clear screen before each message? "); if (yn()) thisuser.sysstatus |= sysstatus_clr_scrn; } 11. Now search for void newuser(), scroll down a few pages, and make the changes shown. input_sex(); input_age(&thisuser); input_comptype(); input_screensize(); input_clr_scrn(); /* ADD */ nl(); npr("Random password: %s\r\n",thisuser.pw); nl(); 12. Scroll down farther, and continue with the changes. v1.1 - Here again, the next block is for 4.21a and under only! If you are running 4.22, go to the block after this one and continue! /* for 4.21a and under only */ npr("5. Gender : %c\r\n",thisuser.sex); npr("6. Birthdate : %02d/%02d/%02d\r\n", (int) thisuser.month, (int) thisuser.day, (int) thisuser.year); npr("7. Computer type : %s\r\n",ctypes[thisuser.comp_type]); npr("8. Screen size : %d X %d\r\n", thisuser.screenchars, thisuser.screenlines); decode_pw(t,thisuser.pw); npr("9. Password : %s\r\n",t); npr("A. Clear Screen : %s\r\n", /* ADD */ (thisuser.sysstatus & sysstatus_clr_scrn)?"Yes":"No"); /* ADD */ pl("Q. No changes."); nl(); nl(); prt(2,"Which (1-A,Q) : "); /* CHANGE */ ch=onek("Q123456789A"); /* CHANGE */ ok=0; /* for 4.22 only */ if (syscfg.sysconfig & sysconfig_extended_info) { outstr(get_string(582)); pl(thisuser.street); outstr(get_string(583)); pl(thisuser.city); outstr(get_string(584)); pl(thisuser.state); outstr(get_string(585)); pl(thisuser.country); outstr(get_string(586)); pl(thisuser.zipcode); outstr(get_string(587)); pl(thisuser.dataphone); } npr("S. Clear Screen : %s\r\n", /* ADD */ (thisuser.sysstatus & sysstatus_clr_scrn)?"Yes":"No"); /* ADD */ nl(); pl(get_string(588)); nl(); nl(); if (syscfg.sysconfig & sysconfig_extended_info) { prt(2,"Which (1-9,A-F,S,Q) : "); /* CHANGE */ ch=onek("Q123456789ABCDEFS"); /* CHANGE */ } else { prt(2,"Which (1-9,S,Q) : "); /* CHANGE */ ch=onek("Q123456789S"); /* CHANGE */ } ok=0; 13. And still further down... One last change. case '5': input_sex(); break; case '6': input_age(&thisuser); break; case '7': input_comptype(); break; case '8': input_screensize(); break; case '9': input_pw(); break; case 'A': input_clr_scrn();break; /* 4.21 AND UNDER ADD */ case 'S': input_clr_scrn();break; /* 4.22 ONLY ADD */ } DISCLAIMER: I make no guarantees with this mod whatsoever. Your installation of the mod is your acceptance of any damages caused to your hardware or software, incendental or otherwise. The mod was tested with the versions of WWIV mentioned in this file. If the mod does NOT work for you, e-mail one of the addresses above, and tell me EXACTLY what you did, what the screen said, and what you did to try to fix it, and I'll do what I can to help you out. PLEASE REPORT ANY BUGS TO ME AT THE ABOVE ADDRESS !!!!!!! Any other comments, suggestions, hints, things I missed, requests for new mods, and general "Thank you!"s are all VERY welcomed, so drop me a line. I don't mind updates to this mod, but do request that you send me a courtesy copy of the changes you made. ***************************************************************** Subscribe to: Modding with WWIV's Flying Chicken WWIVLink subtype 42456, Host @12456 (REQable) WWIVNet subtype 42456, Host @2456 (REQable) IceNet subtype 42456, Host @2456 (REQable) All mods are released on this sub first. Occasionally, they make the mods subs, but usually much later. Subscribe now! ***************************************************************** The Flying Chicken 1@12456 (WWIVLink) - 1@2456 (WWIVNet) - 1@2456 (IceNet) THE INSANE ASYLUM BBS In Operation Since August, 1989 Running WWIV 4.22++ (Reg #21260) SysOp: The Flying Chicken - CoSysOp: Dr. Doolittle Snarfable - Auto-SysOp Validation Callback Validation (Local calls only) (214) 570-5950 - USR Dual Std (v32/HST) --- END OF LINE ---