home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / WWIVMODS / MODS412.ZIP / BIMOD412.MOD < prev    next >
Text File  |  1990-09-18  |  18KB  |  758 lines

  1. One Eyed Willy #17 @8878
  2. Saturday, September 15, 1990 at  1:33 am
  3.               BI4WWIV1.MOD  V 1.0
  4.  
  5.         A BiModem Mod for WWIV 4.12 ONLY
  6.           Written by One Eyed Willy #1 @18851
  7.  
  8.  
  9.      This mod was written to allow WWIV to use the best protocol available
  10. to date, Bimodem.  Bimodem allows transfers in two directions at the same
  11. time and allows you to chat while the xfer goes.  It is a totally batch-
  12. oriented protocol, and due to its powerful external file configurability,
  13. allows for easy batch uploading and downloading.
  14.  
  15.      The most popular mod to this date for using Bimodem on a WWIV bbs
  16. system was written by Cheat Sheet.  His mod is very easy to install, and
  17. does work.  However, he does not distribute the source code to his mod,
  18. making it impossible for a sysop to add things such as virus checkers, and
  19. allow them to basically change the way it looks.  It also seems to be
  20. an "attatchment" to the board, rather than one of its protocols.  This,
  21. however, is given to the users in full source code form, and works just
  22. like WWIV's batch function always has.  In fact, WWIV is actually written
  23. to handle both batch uploading and downloading, but to this date hasn't
  24. been written to handle batch uploads, probably due to the fact that Zmodem
  25. can't control which files are sent up too easily.  This mod puts those
  26. "strands" of code into use, and therefore may require modification for
  27. later versions of the BBS software, but until then, this works just
  28. beautifly.
  29.  
  30.   This REQUIRES WWIV v4.12, it may work on 4.13, but that will depend on
  31. Wayne not further developing the batch upload proceedures in 4.12.  I have
  32. no way of knowing what will happen, however, I can say that the batch upload
  33. ability has existed since 4.10, so who knows what Wayne will do.
  34.  
  35. On with the mod
  36.  
  37. ---------------------------------------------------
  38.  
  39. DISCLAIMER:  This mod is in its beta test stages
  40. still.  If your computer blows up, don't blame me,
  41. I didn't do it.. I doubt the mod could either..
  42.  
  43. ---------------------------------------------------
  44.  
  45.  
  46. ///////////////////////////// Step 1 \\\\\\\\\\\\\\\\\\\\\\\\\\\\
  47.  
  48. File to be in editor: BATCH.C
  49.  
  50. Add the following code to the end of BATCH.C.. I know its bad
  51. coding to put structures wherever you please, but this makes it
  52. much easier to install the mod.  You can go ahead and put the
  53. typedef struct {...} stuff in Vardec.h if you please, but this
  54. is to make it easier.
  55.  
  56. -------------------------------------------------------------------
  57.  
  58. typedef struct {
  59.  
  60. char direction,             /* Direction file will be going */
  61.      refresh,
  62.      replace,
  63.      verify,
  64.      delete,
  65.      unused,
  66.      fulldir,
  67.      subdir,
  68.      sourcepath[80],
  69.      destpath[80],
  70.      descr[80];
  71. } bimodrec;
  72.  
  73. void bidl(int had)
  74. {
  75.   char s[255],listfn[81],sx1[21],sx2[21],sx3[21],dl[100];
  76.   int i,i1,f,ok;
  77.   bimodrec bilist;
  78.   double at=0.0;
  79.   long addk=0,thisk;
  80.  
  81.  
  82.   sprintf(dl,"BIMODEM, %d files, time=%s",numbatchdl, ctim(batchtime));
  83.   if (had)
  84.     strcat(dl,", HAD");
  85.   sysoplog(dl);
  86.  
  87.   sprintf(listfn,"%s\\BIMODEM.PTH",cdir);
  88.  
  89.   _chmod(listfn,1,0);
  90.   unlink(listfn);
  91.   _chmod(dszlog,1,0);
  92.   unlink(dszlog);
  93.  
  94.  
  95.   f=open(listfn,O_RDWR | O_BINARY | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE);
  96.   if (f<0)
  97.     return;
  98.  
  99.   for (i=0; i<numbatch; i++) {
  100.     bilist.direction = batch[i].sending ? 'U' : 'D';
  101.     bilist.refresh= ' ';
  102.     bilist.replace= 'N';
  103.     bilist.verify = 'Y';
  104.     bilist.delete = 'N';
  105.     bilist.unused = ' ';
  106.     bilist.fulldir= 'N';
  107.     bilist.subdir = 'Y';
  108.     sprintf(s,"%s%s",directories[batch[i].dir].path,stripfn(batch[i].filename));
  109.     for (i1=0;i1<80;i1++) {
  110.       bilist.sourcepath[i1]=32;
  111.       bilist.descr[i1]=32;
  112.       bilist.destpath[i1]=32;
  113.     }
  114.     strupr(s);
  115.     strupr(batch[i].filename);
  116.     if (batch[i].sending) {
  117.       sprintf(bilist.sourcepath,"%-70s",s);
  118.       sprintf(bilist.destpath,"%-70s",stripfn(batch[i].filename));
  119.     } else {
  120.       sprintf(bilist.sourcepath,"%-70s",stripfn(batch[i].filename));
  121.       sprintf(bilist.destpath,"%-70s",s);
  122.     }
  123.     thisk=(batch[i].len+1023)/1024;
  124.     if ((syscfg.req_ratio>0.0001) && (ratio1(addk+thisk)<syscfg.req_ratio) &&
  125.     (!(thisuser.exempt & exempt_ratio)))
  126.       ok=0;
  127.     if (ok) {
  128.       write(f,&bilist,248);
  129.       at += batch[i].time;
  130.       addk += thisk;
  131.     }
  132.   }
  133.   close(f);
  134.  
  135.   ultoa(com_speed,sx1,10);
  136.   ultoa(modem_speed,sx3,10);
  137.   sx2[0]='0'+syscfg.primaryport;
  138.   sx2[1]=0;
  139.   sprintf(s,"BIMODEM /B%s /L%s /PBIMODEM.PTH",sx1,sx2);
  140.   if (s[0]) {
  141.     clrscrb();
  142.     outs(dl);
  143.     outs("\r\n");
  144.     outs(s);
  145.     outs("\r\n");
  146.     if (incom) {
  147.       run_external1(s);
  148.       
  149.       topscreen();
  150.       process_dszlog();
  151.     }
  152.   }
  153.  
  154.   _chmod(listfn,1,0);
  155.   unlink(listfn);
  156.   _chmod(dszlog,1,0);
  157.   unlink(dszlog);
  158. }
  159.  
  160. void remove_entry(char *fn, int dn)
  161. {
  162.  
  163.   int i, f;
  164.   uploadsrec u;
  165.   dliscan1(dn);
  166.   f = recno(fn);
  167.   SETREC(f);
  168.   read(dlf,(void *)&u, sizeof(uploadsrec));
  169.   if (u.mask & mask_extended)
  170.     delete_extended_description(fn);
  171.   for(i = f; i<numf; i++)  {
  172.     SETREC(i+1);
  173.     read(dlf,(void *)&u, sizeof(uploadsrec));
  174.     SETREC(i);
  175.     write(dlf,(void *)&u, sizeof(uploadsrec));
  176.   }
  177.   --numf;
  178.   u.numbytes = numf;
  179.   SETREC(0);
  180.   write(dlf,(void *)&u, sizeof(uploadsrec));
  181.   closedl();
  182. }
  183.  
  184. --------------------------------------------------------------------------
  185.  
  186. ////////////////////////// Step 2 \\\\\\\\\\\\\\\\\\\\\\\
  187.  
  188. File to be in editor: BATCH.C
  189.  
  190. REPLACE the entire process_dszlog() void from batch.c, and put this
  191. in its place.  I think Wayne was smoking too many of those special
  192. cigarettes that night when he wrote the routine, becuase its terribly
  193. inefficient, and won't even work with Bimodem's outputted DSZ logs.
  194.  
  195. -------------------------------------------------------------------------
  196.  
  197. void process_dszlog()
  198. {
  199.   FILE *f;
  200.   char s[100];
  201.  
  202.   if ((f=fopen(dszlog,"rt"))!=0) {
  203.     outchr(12);
  204.     ansic(4);
  205.     pl(" Transfer Results ");
  206.     nl();
  207.     while (fgets(s,78,f))
  208.       handle_dszline(s);
  209.     fclose(f);
  210.   }
  211.   _chmod(dszlog,1,0);
  212.   unlink(dszlog);
  213. }
  214.  
  215. ------------------------------------------------------------------------
  216.  
  217. ////////////////////////////// Step 3 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  218.  
  219. File to be in editor: BATCH.C
  220.  
  221. Now to do a little modification to Wayne's batch fucntions.  One is
  222. a cosmetic change to show the user what's happened, rather than it
  223. just going into the sysop log, the other is to do what wayne knew he'd
  224. have to do eventually.
  225.  
  226. Anyway, in void uploaded(), where it says:
  227.  
  228. void uploaded()
  229. {
  230.   bla bla..
  231.  
  232. make it read:
  233.  
  234. void uploaded()
  235. {
  236.   int f;
  237.   ~~~~~~
  238.   bla bla..
  239.  
  240. and where it says:
  241.  
  242.     SETREC(i);
  243.     read(dlf,(void *)&u,sizeof(uploadsrec));
  244.  
  245.         /* more here */
  246.  
  247.         ++thisuser.uploaded;
  248.     thisuser.uk += (int) ((u.numbytes+1023)/1024);
  249.  
  250. fill in what Wayne left out, put in:
  251.  
  252.     SETREC(i);
  253.         read(dlf,(void *)&u,sizeof(uploadsrec));
  254.     sprintf(s,"%s%s",directories[batch[i1].dir].path,stripfn(batch[i1].filename));
  255.     f=open(s,O_RDONLY | O_BINARY);
  256.     u.numbytes=filelength(f);
  257.     close(f);
  258.     ++thisuser.uploaded;
  259.     thisuser.uk += (int) ((u.numbytes+1023)/1024);
  260.  
  261. Also, go down a little further where it reads:
  262.  
  263.         SETREC(i);
  264.         write(dlf,(void *)&u,sizeof(uploadsrec));
  265.         sprintf(s,"+%s uploaded on %s",
  266.           u.filename,
  267.           directories[batch[i1].dir].name);
  268.     sysoplog(s);
  269.       }
  270.       closedl();
  271.  
  272. and replace that code with:
  273.  
  274.     SETREC(i);
  275.         write(dlf,(void *)&u,sizeof(uploadsrec));
  276.     ansic(3);
  277.     sprintf(s,"Uploaded   '%s'",
  278.       u.filename);
  279.     sysoplog(s);
  280.     pl(s);
  281.       }
  282.       closedl();
  283.  
  284. and in void downloaded(), replace:
  285.  
  286.         SETREC(i);
  287.         write(dlf,(void *)&u,sizeof(uploadsrec));
  288.         sprintf(s,"Downloaded '%s'",u.filename);
  289.         sysoplog(s);
  290.         sprintf(s,"%s downloaded '%s' on %s",
  291.           nam(&thisuser,usernum), u.filename, date());
  292.         ssm(u.ownerusr,0,s);
  293.       }
  294.       closedl();
  295.  
  296. with the following:
  297.  
  298.         SETREC(i);
  299.         write(dlf,(void *)&u,sizeof(uploadsrec));
  300.         sprintf(s,"Downloaded '%s'",u.filename);
  301.         sysoplog(s);
  302.     ansic(7);
  303.     pl(s);
  304.     sprintf(s,"%s downloaded '%s' on %s",
  305.       nam(&thisuser,usernum), u.filename, date());
  306.     ssm(u.ownerusr,0,s);
  307.       }
  308.       closedl();
  309.  
  310. Well, that will handle the joys of the batch transfer, but now
  311. we have to handle these empty files which will appear unless
  312. taken care of..
  313.  
  314. ////////////////////////////// Step 4 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  315.  
  316. File to be in editor: BATCH.C (still!)
  317.  
  318. Replace the entire delbatch() void with this one:
  319.  
  320. void delbatch(int i)
  321. {
  322.   int i1;
  323.   char s[65];
  324.  
  325.   if (i<numbatch) {
  326.     batchtime -= batch[i].time;
  327.     if (batch[i].sending)
  328.       --numbatchdl;
  329.     else {
  330.       sprintf(s,"%s%s",directories[batch[i].dir].path,stripfn(batch[i].filename));
  331.       if (!exist(s))
  332.     remove_entry(batch[i].filename,batch[i].dir);
  333.     }
  334.     --numbatch;
  335.     for (i1=i; i1<=numbatch; i1++) {
  336.       batch[i1]=batch[i1+1];
  337.     }
  338.   }
  339. }
  340.  
  341. This will make it so that it removes temporary upload records when they are
  342. in fact not used.
  343.  
  344. ////////////////////////// Step 5 \\\\\\\\\\\\\\\\\\\\\\\
  345.  
  346. Alright, last thing to do in BATCH.C, finally..
  347.  
  348. Change the lines that read:
  349.  
  350. prt(2,"Batch: L,D,R,Q,C,? : ");
  351. ch=onek("Q?CLRD");
  352.  
  353. to read:
  354.  
  355. prt(2,"Batch: L,D,R,Q,C,B,? : ");
  356. ch=onek("Q?CLRDB");
  357.  
  358. and change the code that reads:
  359.  
  360.       case 'C':
  361.     prt(5,"Clear queue? ");
  362.     if (yn()) {
  363.       numbatch=0;
  364.       numbatchdl=0;
  365.       batchtime=0.0;
  366.       done=1;
  367.       pl("Queue cleared.");
  368.     }
  369.     break;
  370.       case 'D':
  371.         nl();
  372.  
  373. to read:
  374.  
  375.       case 'C':
  376.         prt(5,"Clear queue? ");
  377.         if (yn()) {
  378.       while(numbatch)
  379.         delbatch(0);
  380.       done=1;
  381.       pl("Queue cleared.");
  382.     }
  383.     break;
  384.       case 'B':
  385.     nl();
  386.     prt(5,"Hang up after transfer? ");
  387.     had=yn();
  388.     nl();
  389.     pl("Execute BiModem From Your Computer Now");
  390.  
  391.     /* Cheat Sheet, this looks like yours, because people
  392.        have autoscripts which act on the string */
  393.  
  394.     nl();
  395.     bidl(had);
  396.     if (had)
  397.       hangup=1;
  398.     done=1;
  399.     break;
  400.       case 'D':
  401.         nl();
  402.  
  403.  
  404. ////////////////////////////// Step 5 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  405.  
  406. File to be in editor: SR.C
  407.  
  408. Now to make the receive_file() function allow for a batch upload.
  409.  
  410.  
  411. Change the line that reads:
  412.  
  413. void receive_file(char *fn, int *received, char *ft)
  414.  
  415. to read:
  416.  
  417. int receive_file(char *fn, int *received, char *ft, char *sfn, int dn)
  418. ~~~                                               ~~~~~~~~~~~~~~~~~~~
  419.  
  420. and right after the line that reads:
  421.  
  422.    int i;
  423.  
  424. add:
  425.  
  426.    char s[80];
  427.  
  428. so it reads:
  429.  
  430. int receive_file(char *fn, int *received, char *ft, char *sfn, int dn)
  431. {
  432.   int i;
  433.   char s[80];
  434.  
  435.   i=get_protocol(0).....
  436.  
  437.  
  438. Near the bottom of the same void turned int, change the portion of code
  439. which looks like:
  440.  
  441.         xymodem_receive(fn,ft,received,1);
  442.       break;
  443.     case 4:
  444.       if (incom)
  445.         xymodem_receive(fn,ft,received,1);
  446.       break;
  447.     default:
  448.       if ((i>5) && (incom)) {
  449.         extern_prot(i-6,fn,0);
  450.         *received=exist(fn);
  451.       }
  452.       break;
  453.   }
  454. }
  455.  
  456. to read:
  457.  
  458.         xymodem_receive(fn,ft,received,1);
  459.       break;
  460.     case 5:
  461.       *received=0;
  462.       if (numbatch>=MAX_BATCH || sfn[0]==0) {
  463.     nl();
  464.     pl("No room left in batch queue.");
  465.     nl();
  466.     *received=0;
  467.       } else {
  468.     strcpy(batch[numbatch].filename,sfn);
  469.     batch[numbatch].dir=dn;
  470.     batch[numbatch].time=0;
  471.     batch[numbatch].sending=0;
  472.     batch[numbatch].len=0;
  473.     numbatch++;
  474.     sprintf(s,"File added to upload queue.  Files: %d  D/l Time: %s",numbatch,ctim(batchtime));
  475.     nl();
  476.     pl(s);
  477.     nl();
  478.     *received=0;
  479.     return(1);
  480.       }
  481.       break;
  482.     default:
  483.       if ((i>5) && (incom)) {
  484.         extern_prot(i-6,fn,0);
  485.         *received=exist(fn);
  486.       }
  487.       break;
  488.   }
  489.   return(0);
  490. }
  491.  
  492. ////////////////////////////// Step 6 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  493.  
  494. File to be in editor: SR.C
  495.  
  496. At the top of get_protocol, change the lines which read:
  497.  
  498.   int i,i1,i2,prot,maxprot,done;
  499.  
  500.   if (dl>0)
  501.     strcpy(oks,"Q?012345");
  502.   else
  503.     if (dl<0)
  504.       strcpy(oks,"Q?0234");
  505.     else
  506.       strcpy(oks,"Q?0234");
  507.   maxprot=5;
  508.   prot=thisuser.defprot;
  509.   if ((dl!=1) && ((prot==5) || (prot==1)))
  510.     prot=0;
  511.   done=0;
  512.  
  513. To read:
  514.  
  515.   int i,i1,i2,prot,maxprot,done;
  516.  
  517.   strcpy(oks,"Q?012345");
  518.   maxprot=5;
  519.   prot=thisuser.defprot;
  520.   if ((dl!=1) && (prot==1))
  521.     prot=0;
  522.   done=0;
  523.  
  524. Do a search for "Batch" and change it to "Batch/Bimodem" TWICE..
  525. there are two occurrences.
  526.  
  527. ////////////////////////////// Step 8 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  528.  
  529. File to be in editor: BBSUTL.C
  530.  
  531. Now, gotta make a quick change to BBSUTL.C to allow the //UPLOAD to work
  532. with the change in function syntax.
  533.  
  534. Change the lines that read:
  535.  
  536.   print("You may now upload a message, max ",s1," bytes.","");
  537.   nl();
  538.   receive_file(s,&i1,&ch);
  539.   f=open(s,O_RDWR | O_BINARY);
  540.   if (f>0) {
  541.  
  542. to read:
  543.  
  544.   print("You may now upload a message, max ",s1," bytes.","");
  545.   nl();
  546.   receive_file(s,&i1,&ch,"",0);
  547.   f=open(s,O_RDWR | O_BINARY);
  548.   if (f>0) {
  549.  
  550. /////////////////////////// Step 7 \\\\\\\\\\\\\\\\\\\\\\\\\\\
  551.  
  552. File to be in editor: XFER.C
  553.  
  554. Now time to modify the upload() function so it doesn't think
  555. each file is aborted when you attempt to upload them, and to keep
  556. the directory record so it can be modified as soon as a file is
  557. sent up.  If I wasn't using Wayne's code, I probably would not be
  558. doing the upload part this way, as it leaves an ASK file whenever
  559. you send something up, however, I'm not about to disagree with
  560. the ever omnicient Mr. Bell...
  561.  
  562. In function upload(), at the very beginning where it reads:
  563.  
  564. void upload(int dn)
  565. {
  566.   directoryrec d;
  567.   uploadsrec u,u1;
  568.   int i,i1,i2,ok,xfer,f;
  569.   char s[255],s1[81],*ss;
  570.  
  571. change it to read:
  572.  
  573. void upload(int dn)
  574. {
  575.   directoryrec d;
  576.   uploadsrec u,u1;
  577.   int i,i1,i2,ok,xfer,f,bi;  /* Change this line */
  578.                ~~~
  579.   char s[255],s1[81],*ss;
  580.  
  581.  
  582. Now, Change the lines that read:
  583.  
  584.         add_extended_description(u.filename,ss);
  585.         u.mask |= mask_extended;
  586.         farfree(ss);
  587.       }
  588.       nl();
  589.       if (xfer) {
  590.         ti=timer();
  591.         receive_file(s1,&ok,&u.filetype);
  592.         ti=timer()-ti;
  593.     .......................
  594.  
  595. all the way to the end of the void, replace with:
  596.  
  597.         add_extended_description(u.filename,ss);
  598.         u.mask |= mask_extended;
  599.         farfree(ss);
  600.       }
  601.       nl();
  602.       if (xfer) {
  603.         ti=timer();
  604.     bi=receive_file(s1,&ok,&u.filetype,u.filename,dn); /* Change from */
  605.     ti=timer()-ti;                                     /* This point on.*/
  606.     if (ti<0)
  607.       ti += 24.0*3600.0;
  608.     thisuser.extratime += ti;
  609.       }
  610.       if (ok) {
  611.         f=open(s1,O_RDONLY | O_BINARY);
  612.         if (f<0) {
  613.           ok=0;
  614.           nl();
  615.           nl();
  616.           pl("DOS error - File not found.");
  617.           nl();
  618.           if (u.mask & mask_extended)
  619.             delete_extended_description(u.filename);
  620.     }
  621.       }
  622.       if (ok && syscfg.upload_c[0]) {
  623.     stuff_in(s,syscfg.upload_c,create_chain_file("CHAIN.TXT"),d.path,stripfn(u.filename),"","");
  624.     close(f);
  625.     full_external(s,0,1);
  626.     f=open(s1,O_RDONLY | O_BINARY);
  627.     if (f<0) {
  628.       ok=0;
  629.       nl();
  630.       pl("File got removed.");
  631.       nl();
  632.       if (u.mask & mask_extended)
  633.         delete_extended_description(u.filename);
  634.     }
  635.       }
  636.       if (ok) {
  637.     l=filelength(f);
  638.     u.numbytes=l;
  639.     close(f);
  640.     ++thisuser.uploaded;
  641.     thisuser.uk += ((l+1023)/1024);
  642.       }
  643.       if (ok || bi) {
  644.     time(&l);
  645.     u.daten=l;
  646.     for (i=numf; i>=1; i--) {
  647.       SETREC(i);
  648.       read(dlf,(void *)&u1,sizeof(uploadsrec));
  649.       SETREC(i+1);
  650.       write(dlf,(void *)&u1,sizeof(uploadsrec));
  651.     }
  652.     SETREC(1);
  653.     write(dlf,(void *)&u,sizeof(uploadsrec));
  654.     ++numf;
  655.     u1.numbytes=numf;
  656.     SETREC(0);
  657.     write(dlf,(void *)&u1,sizeof(uploadsrec));
  658.       }
  659.       if (ok) {
  660.     ++status.uptoday;
  661.     save_status();
  662.     sprintf(s,"+%s uploaded on %s",u.filename,directories[dn].name);
  663.     sysoplog(s);
  664.     nl();
  665.     nl();
  666.     pl("File uploaded.");
  667.     nl();
  668.     sprintf(s,"%-6.3f",ratio());
  669.     print("Your ratio is now: ",s,"");
  670.     nl();
  671.     nl();
  672.     if (useron)
  673.       topscreen();
  674.       }
  675.     }
  676.   }
  677.   closedl();
  678. }
  679.  
  680. ////////////////////// Step 9 \\\\\\\\\\\\\\\\\\\\\
  681.  
  682. File to be in editor: BBSUTL.C
  683.  
  684. Now that you're done with that little barrel - o - fun, and are
  685. almost done, you have two more things to do!  Wow, almost done!
  686. Because the upload record is saved, even if its never used,
  687. you need to place a small function which clears the queue
  688. whenever the user does something to erase the batch list.. Thankfully,
  689. the only two things which cause that are shrinking out, and
  690. logging off.. so, load up BBSUTL.C, and ..
  691.  
  692. Search for this partion of code, in logoff()
  693.  
  694. search for:
  695.  
  696.   shortmsgrec sm;
  697.   double ton;
  698.  
  699.   dtr(0);
  700.   hangup=1;
  701.  
  702. and change it to read:
  703.  
  704.   shortmsgrec sm;
  705.   double ton;
  706.  
  707.   while(numbatch)
  708.     delbatch(0);
  709.   dtr(0);
  710.   hangup=1;
  711.  
  712. Not hard, eh? .. Well..
  713.  
  714. File to be in editor: SHRINK.C
  715.  
  716. Right near the top, right after this line:
  717.  
  718. #define READ(x) read(f,&(x),sizeof(x))
  719.  
  720. ADD the line:
  721.  
  722. extern int numbatch;
  723.  
  724. Now, in function shrink_out()..
  725.  
  726. change the code that reads:
  727.  
  728.   int ok_shrink;
  729.  
  730.   ok_shrink=1;
  731.  
  732. to read:
  733.  
  734.   int ok_shrink;
  735.  
  736.   while(numbatch)
  737.     delbatch(0);
  738.   ok_shrink=1;
  739.  
  740.  
  741. Welp, you're done with the hard stuff, now one easy last thing..
  742.  
  743. ////////////////////////// Step 10 \\\\\\\\\\\\\\\\\\\\\\\\
  744.  
  745. Shell out from whatever editor you're using, and make sure you save all
  746. files.  At the dos prompt, in the directory where you have your BBS files
  747. type:
  748.  
  749. make fcns
  750.  
  751. to recreate fncs.h, which is needed because we changed the way
  752. receive_file() is used.  As soon as its done, which doesn't
  753. take too long, go ahead and type
  754.  
  755. make
  756.  
  757. all alone and compile the sucker, because YOU ARE DONE!
  758.