SPV-012.MOD Papa Bear #1 @15061 Sat Feb 06 22:38:17 1993 4Msg. Status:3Ü 1If you feel like replying... 3 ßßßßßßßßßßßß ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Mod Name: SPV-012.MOD Mod Authors: Papa Bear 1@5079 (WWIVnet) ³ ³ Difficulty: Pretty darn easy 1@15061 (WWIVlink) ³ ³ WWIV Version: 4.21, 4.21a, 4.22 1@5079 (IceNET ³ ³ Files Affected: XINIT,BBSUTL1,VARDEC Date: February 6, 1993 ³ ³ Description: Allow any number of chains (stock code is limited to 50) ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ Long Description: Well, I had an urge on night, and I decided to add EVERY on-liner I had on my archive floppies to the BBS. I already had 40 odd on-line when I decided to do this. When I got to #50, I found that I couldn't add anymore, so I wrote this mod to allow for ANY number of chains. At one time I was running 130 (until I found that some wouldn't run properly remotely ) chains. Now I'm right at 85. A note here. Just like 4.22 will allow up to 999 subboards and message bases, you can have 999 chains. But, just as Wayne suggests, only define as many as you need. Each chain defined takes up memory. So keep it close to what you have (in other words, don't define 999 chains if you are only gonna run 60. Instead, define maybe 70 [to give you some leeway]). LEGEND: == unchanged, search for += modify line -- delete line ++ add line ------- STEP 0: Backup yer source. You installed it, yer responsible. ------- STEP 1: Open XINIT.C and change the following lines == num_dirs=(read(i,directories, (max_dirs*sizeof(directoryrec))))/ == sizeof(directoryrec); == close(i); == =+ chains=(chainfilerec *) mallocx(MAX_CHAINS * sizeof(chainfilerec), "chains" ); == numextrn=0; == numchain=0; == numed=0; == sprintf(s,"%sCHAINS.DAT",syscfg.datadir); == i=open(s,O_RDWR | O_BINARY); == if (i>0) { =+ numchain=(read(i,(void *)chains, MAX_CHAINS*sizeof(chainfilerec)))/sizeof (chainfilerec); == numchain=numchain; == close(i); == } (Change the 50 in those to lines to MAX_CHAINS.) ------- STEP 2: Open BBSUTL1.C and change the line ==void do_chains(void) =={ =+ int map[MAX_CHAINS],mapp,i,i1,ok,done; /* change 50 to MAX_CHAINS */ == char s[81],s1[81],*ss; == chainfilerec c; ------- STEP 3: Still in BBSUTL1.C, you *may* want to change these lines == show_chains(&mapp,map); == done=0; == do { == prt(2,get_string(621)); =+ mpl(3); /* NOTE 1 */ -- ss=mmkey(0); /* NOTE 2 */ ++ input(ss,3); /* NOTE 3 */ == i=atoi(ss); == if ((i>0) && (i<=mapp)) { == done=1; == run_chain(map[i-1]); NOTES: ----- NOTE 1 - If running more than 99 chains change the 2 to a 3 in the mpl(2); statement. *This mpl(2); may note be there.* I have a habit of adding mpl's before all my input and mmkey lines. If it is not in yours, ignore this. (Or add it, it'll work.) NOTE 2 - Again, if more than 99 chains, this has got to go. Otherwise you'll never be able to run any chain over 99. NOTE 3 - Here's the line if using more than 99 chains. Effectively replaces the mmkey line above it. You'll now have to press enter to execute any chain. (Where mmkey would do it for you in certain circumstances.) ------- STEP 4: Open VARDEC.H and add this line == #define max_buf 1024 == #define MSG_COLOR 0 == #define MAX_FILES 61 == #define MAX_BATCH 50 ++ #define MAX_CHAINS 96 /* NOTE */ == == #define INT_REAL_DOS 0x21 NOTE - this is where you specify the number of chains you want. You can increase or decrease this as needed (although you'll suffer through a complete recompile each time you do). Remember, in the interests of saving memory, keep this resonably close to the number of chains you actually plan on having. I have it set to 86, and I run 85 chains. You do not have to do this in 32 chain increments like the subboards and directories. You can put 90 if you wanted, but I would stick to a 32 chain increment (32,64,96,128, etc.) just in case. ------- STEP 5: Do a complete recompile. I've been using this mod for over a month now with ZERO problems. I wated to release it to see if Wayne changed the way the chains were handled, and he didn't. So this will definitely work on 4.21, 4.21a, 4.22 and even possibly for versions before those. As always, if you use this I'd like to hear from you. If you are having problems, I'll give you all the help I can. 1-7=3*6>2Papa áear6<3*7=1-0 3WWIVnet 55079 3WWIVlink 515050 3IceNET 55079 3BAIEnet 550500 --- 5This tagline will self extract in 5 seconds.