TFC003A - The Complete Clear Screen Mod for 4.22 Nightshade #1 @16975 Thu Jan 28 11:07:56 1993 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Mod Name: : TFC003A.MOD Author : The Flying Chicken ³ ³ Difficulty : Easy Update : Nightshade ³ ³ WWIV Version : 4.22 Date : 1/28/93 ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ TFC003.MOD - The Complete Clear Screen Mod Author: The Flying Chicken 1@12456 (WWIVLink) Updated by: Nightshade 1@6953 (WWIVnet) 1@16975 (WWIVlink) The Flying Chicken originally published this mod for WWIV v4.20. I enjoyed, an appriciated this, so much, I through it into my 4.21, 4.21a, and now, 4.22 source. I didn't know if he was going to be updating it, so I went ahead and did it. (TFC - I hope you don't mind). The code is his. I updated a few things, to make it 4.22 compatible. I've also included his original documention. Nightshade Nightshade Start TFC text: 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. Before using this or any mod, back up your source !!!!! PKZIP source *.c *.h *.mak 1. Search for void inmsg(), scroll down some, and make the changes shown. This will clear the screen before posting a message. I put this in at first, but then didn't like it, so if you don't want this feature, just skip to step 2. nl(); helpl=6; if ((thisuser.sysstatus & sysstatus_clr_scrn) && (!fsed)) /* ADD */ outchr(12); /* ADD */ if (okansi()) { prt(2,get_string(326)); mpl(60); inputl(title,60); } else { pl(get_string(626)); outstr(get_string(326)); inputl(title,60); } 2. 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,nn; 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]; 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 */ 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. Because of 4.22's removal of strings, I've removed the strings from the code. The string numbers refer to the string numbers in my code (I will provide the text). If you wish to change the numbers, feel free. 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); outstr(get_string(1510)); npr("%s\r\n", /* ADD */ (thisuser.sysstatus & sysstatus_clr_scrn)?str_yes:str_no); /* ADD */ /* String to add: 1510 "C. Clear Screen : " */ 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 { tleft(1); if (hangup) return; nl(); helpl=4; if (okansi()) { prt(2,get_string(477)); /* Edit line 477, and add C */ ch=onek("Q?123456789ABCW"); /* Add C to this line */ } else { prt(2,get_string(478)); /* Edit line 478, and add C */ ch=onek("Q?1234567BCW"); /* Add C to this line */ } 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,gets_string(1511)); /* ADD */ /* String to add: 1511 "Clear screen before each message? */ 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,get_string(1511)); if (yn()) thisuser.sysstatus |= sysstatus_clr_scrn; } 11. Now search for void newuser(), scroll down a few pages, and make the changes shown. if (numed && (thisuser.sysstatus & sysstatus_ansi)) { nl(); prt(5,get_string(568)); if (yn()) select_editor(); } #ifdef TFC003 input_clr_scrn(); /* ADD */ #endif prt(5,get_string(569)); if (yn()) { nl(); pl(get_string(570)); 12. Scroll a little down, and make the following changes... outstr(get_string(585)); pl(thisuser.country); outstr(get_string(586)); pl(thisuser.zipcode); outstr(get_string(587)); pl(thisuser.dataphone); } outstr(get_string(1512)); npr("%s\r\n", (thisuser.sysstatus & sysstatus_clr_scrn)?str_yes:str_no); /* String to add: 1512 "G. Clear Screen : " nl(); pl(get_string(588)); nl(); nl(); if (syscfg.sysconfig & sysconfig_extended_info) { prt(2,get_string(589)); /* Edit line 590, add G */ ch=onek("Q123456789ABCDEFG"); /* Add G to line */ } else { prt(2,get_string(590)); /* Edit line 590, add G */ ch=onek("Q123456789G"); /* Add G to line */ } ok=0; switch(ch) { case 'Q': ok=1; break; case '1': input_name(); break; 13. Last change... case 'E': input_zipcode(); break; case 'F': input_dataphone(); break; case 'G': input_clr_screen(); break; } } while ((!ok) && (!hangup)); Well, that's it. Easy huh. Compile the code, and yer off! As usual, I don't make any claims with this mod, I am simply releasing it to help you out. I will NOT be responsible for anything other than good results. It is not my fault if this mod doesn't work, however if you can explain in detail the problem you are having, I will try to help you correct it. Make sure you notify me so I can correct the mod in future releases. It is defintely not my fault if you install this mod, it doesn't work, and you didn't back up your source. Your just sh*t out of luck. If you use this mod, drop me a note and tell me how wonderful you are, and if you feel like it, how wonderful I am. But drop me a note. If you have any ideas for new mods, or would like some more information about this one, please e-mail me at the following address. The Flying Chicken 1@12456 (WWIV Link) The Insane Asylum BBS --- END OF LINE ---