home *** CD-ROM | disk | FTP | other *** search
/ The Arcade BBS / arcadebbs.zip / arcadebbs / bbstools / MODS / ALLMODS.ZIP / LSD-002.ZIP / LSD-002.MOD < prev   
Encoding:
Text File  |  1995-06-17  |  4.5 KB  |  153 lines

  1. Flashman #1 @1630
  2. Sun Jun 11 15:10:40 1995
  3. ┌────────────────────────────────────────────────────────────────────────────┐
  4. │ Mod Name      : LSD-002.424          Mod Author: Flashman 1@1630  WWIVNet  │
  5. │ Difficulty    : [▓▓▓▓░░░░░░] (4/10)                       1@9930  TerraNet │
  6. │ WWIV Version  : 4.24                                      1@9918  IceNET   │
  7. │ Mod Date      : 6/10/95                      ndpj16c@prodigy.com  Internet │
  8. │ Files Affected: BBSUTL.C, COM.C, FCNS.H, VARS.H                            │
  9. │ Description : Changes the [PAUSE] prompt to (C)ontinue, (S)top, (N)onstop? │
  10. └────────────────────────────────────────────────────────────────────────────┘
  11.  
  12. ══[ Extended Description ]════════════════════════════════════════════════════
  13.  
  14. Certain BBS softwares, such as MajorBBS and WildCat have a pause feature which
  15. gives the users much more control. Instead of just hitting a key to continue,
  16. you have the options to continue, abort, or continue without stopping. This
  17. mod give WWIV this feature.
  18.  
  19. ══[ Legend ]══════════════════════════════════════════════════════════════════
  20.  
  21.   =  Existing line - Do not change
  22.   +  Add this line
  23.   -  Remove this line
  24.  
  25. ══[ Step 1 ]══════════════════════════════════════════════════════════════════
  26.  
  27. Make backups of the files affected by this mod as listed in the mod header.
  28.  
  29. ══[ Step 2 ]══════════════════════════════════════════════════════════════════
  30.  
  31. In COM.C, add the following 2 functions right after "void pausescr":
  32.  
  33. void pausecsn(void)
  34. {
  35.   int i,i1,i2,oiia;
  36.   char *ss;
  37.   unsigned char c;
  38.  
  39.   if (x_only)
  40.     return;
  41.  
  42.   nsp=0;
  43.   oiia=iia;
  44.   setiia(0);
  45.  
  46.   ss="(C)ontinue, (S)top, (N)onstop? ";
  47.   i1=strlen(stripcolors(ss));
  48.  
  49.   c=NULL;
  50.   if (okansi()) {
  51.     i = curatr;
  52.     setc((thisuser.sysstatus & sysstatus_color) ? thisuser.colors[2] :
  53.           thisuser.bwcolors[2]);
  54.   }
  55.   outstr(ss);
  56.   if (in_extern)
  57.     getkey();
  58.   else
  59.     while ((c!='C') && (c!='Q') && (c!='S') && (c!='A') &&
  60.       (c!='N') && (c!='\r') && (c!=' ') && (!hangup))
  61.       c=upcase(getkeymouse());
  62.   for (i2 = 0; i2<i1; i2++)
  63.     backspace();
  64.   if (okansi())
  65.     setc(i);
  66.  
  67.   if (c!=NULL)
  68.     switch(c) {
  69.       case 'A':
  70.       case 'S':
  71.       case 'Q':
  72.         nsp=-1;
  73.         break;
  74.       case 'N':
  75.         if(thisuser.sysstatus & sysstatus_pause_on_page) {
  76.           nsp=1;
  77.           thisuser.sysstatus ^= sysstatus_pause_on_page;
  78.         }
  79.         break;
  80.     }
  81.   setiia(oiia);
  82. }
  83.  
  84. void resetnsp(void)
  85. {
  86.   if ((nsp==1) && (!(thisuser.sysstatus & sysstatus_pause_on_page)))
  87.     thisuser.sysstatus ^= sysstatus_pause_on_page;
  88.   nsp=0;
  89. }
  90.  
  91. ══[ Step 3 ]══════════════════════════════════════════════════════════════════
  92.  
  93. Still in COM.C, make the following changes in "void outchr":
  94.  
  95. =         if (lines_listed >= screenlinest - 1) {
  96. =           if (sysstatus_pause_on_page & thisuser.sysstatus)
  97. =             if (!x_only)
  98. -               pausescr();
  99. +               pausecsn();
  100. =           lines_listed = 0;
  101.  
  102. ══[ Step 4 ]══════════════════════════════════════════════════════════════════
  103.  
  104. Still in COM.C, make the following changes in "char getkey":
  105.  
  106. =   int beepyet;
  107. =   long dd,tv,tv1;
  108. +   resetnsp();
  109. =   beepyet = 0;
  110. =   timelastchar1=timer1();
  111.  
  112. ══[ Step 5 ]══════════════════════════════════════════════════════════════════
  113.  
  114. In BBSUTL.C, make the following changes in "void checka":
  115.  
  116. = void checka(int *abort, int *next)
  117. = {
  118. =   char ch;
  119. +   if (nsp==-1) {
  120. +     *abort=1;
  121. +     nsp=0;
  122. +   }
  123. =
  124. =   while ((!empty()) && (!(*abort)) && (!hangup)) {
  125. =     checkhangup();
  126.  
  127. ══[ Step 6 ]══════════════════════════════════════════════════════════════════
  128.  
  129. In VARS.H, add "nsp" to the "__EXTRN__ int" declarations as shown:
  130.  
  131. =               use_workspace, using_modem, wfc, x_only,
  132. =               instance,debuglevel,multitasker,tagging,tagptr,cursormove,
  133. -               titled, abortext;
  134. +               titled, abortext, nsp;
  135.  
  136. ══[ Step 7 ]══════════════════════════════════════════════════════════════════
  137.  
  138. Type MAKE FCNS to add the new functions to FCNS.H.  Now compile your source.
  139.  
  140. ══[ Final Note ]══════════════════════════════════════════════════════════════
  141.  
  142. If you use this mod, I'd like to know. E-mail me at one of these contact
  143. addresses and let me know how you like it. Or if you haven't tried it out yet,
  144. let me know how you like the idea. Feel free to send any additional questions
  145. or comments as well.
  146.  
  147. Flashman 1@1630  WWIVNet 
  148.          1@9930  TerraNet
  149.          1@9918  IceNET
  150.          Internet address: ndpj16c@prodigy.com
  151.