home *** CD-ROM | disk | FTP | other *** search
/ The Arcade BBS / arcadebbs.zip / arcadebbs / bbstools / MODS / FMD-02B.ZIP / FMD-02B.MOD < prev    next >
Encoding:
Text File  |  1995-06-01  |  35.2 KB  |  1,277 lines

  1.    ┌┬─── ──  ─   ─  ── ───────────────────────────────────────────────────┬─ ∙∙
  2.    ││                    Alternative Worlds Presents                      │
  3.    └┼─────────────────────────────────────────────────────────────────────┐
  4.    ││ Mod Name       » FMD-02b.MOD                                        │∙
  5.    ││ Difficulty     » ██████▒▒▒▒ (6/10)                                  │:
  6.    ││ WWIV Version   » 4.24                                               ││
  7.    ││ Date Affected  » 06/01/95                                           ││
  8.    :│ Files Affected » BBS.C / MODEM.C / NETSUP.C / BBSUTL1.C / SYSOPF.C  ││
  9.     │                  VARDEC.H / VARS.H                                  ││
  10.    ∙│ Description    » VGA Waiting For Caller Screen Status Screen        ││
  11.     └─────────────────────────────────────────────────────────────────────┼┐
  12.     │       A French Mod Division Release - (C) 1995 FMD Software         ││
  13. ∙∙ ─┴─────────────────────────────────────────────────── ──  ─   ─  ── ───└┘
  14.  
  15.  
  16.  ┌┬══════════════════┐
  17.  ││ Long Description ││
  18.   └══════════════════┴┘
  19.  
  20.   This modification will give you a nice status screen instead of a blank
  21. screen when your system is waiting for a caller. This status screen has a
  22. pulldown menu for each commands available from WFC, an instance status monitor
  23. to know what's happening on your other instances, a rotating network pending
  24. which will show the amount of k pending on each of your network connections and
  25. a lot of informations like last caller and inactive time.
  26.  
  27.   This modification has been rated as the best one in its own class, there is
  28. already some buildt in support in WWIV v4.24 for this modification. If you
  29. have to install a modification for YOU, and not for your users, try this one
  30. and you won't regret it.
  31.  
  32.  ┌┬══════════┐
  33.  ││ Features ││
  34.   └══════════┴┘
  35.  
  36.   - Activity status bar.
  37.   - Clock displaying time.
  38.   - Last User On-Line.
  39.   - Inactive time clock.
  40.   - Scrolling message bar showing messages.
  41.   - Instance status monitor.
  42.   - Network pending informations.
  43.   - Pulldown Menu.
  44.   - VGA (80x43) Display (Text Mode, Not Graphical).
  45.   - VGA (320x200) Screen Saver (Starfield Simulation) or text as desired.
  46.   - Easy INI type configuration.
  47.   - Also, a very good support from the authors.
  48.   - Multi-tasker aware.
  49.   - Caller ID support.
  50.   - Log in 43 or 50 lines VGA mode if desired.
  51.  
  52.  ┌┬══════════════┐
  53.  ││ Requirements ││
  54.   └══════════════┴┘
  55.  
  56.  - VGA graphic card or better.
  57.  - VGA monitor or better.
  58.  - WWIV v4.24 or higher
  59.  
  60.  ┌┬════════┐
  61.  ││ Thanks ││
  62.   └════════┴┘
  63.  
  64.   ■ Philippe Sainte-Marie for the assembly codes for the set_25 and set_43
  65.     functions which are now totally redone using C.
  66.   ■ Wayne Bell for help with the screen, stock support and help.
  67.   ■ Christopher Gauthier for heavy beta testing.
  68.   ■ Dawg, he did the SHOW_PERCENTAGE switch.
  69.  
  70.  ┌┬═══════┐
  71.  ││ Tests ││
  72.   └═══════┴┘
  73.  
  74.   This modification has been tested on a virgin WWIV v4.24 source using
  75.   Borland C++ v4.5
  76.  
  77. ──────────────────────────────────────────────────────────────────────────────
  78.                                    Legend
  79.                           ╔═══╤══════════════════┐
  80.                           │ + │ Add This Line    │
  81.                           │ - │ Delete This Line │
  82.                           │ * │ Modify This Line │
  83.                           │ = │ Existing Line    │
  84.                           └═══╧══════════════════╝
  85. ───[Step 1]────────────────────────────────────────────────────────────────────
  86.  
  87. Load VARDEC.H and put this at the end of the file after "inputpicrec":
  88.  
  89. typedef struct {
  90.   unsigned long
  91.     flags,
  92.     screen_saver_time;
  93.    double
  94.      cur_time,
  95.      wfct,
  96.      poll_time,
  97.      scroll_time;
  98.    float
  99.      scrolling_time;
  100.    int
  101.      options,
  102.      wfc_high_color,
  103.      wfc_low_color,
  104.      wfc_prt_color,
  105.      wfc_net_color,
  106.      wfc_bar_color,
  107.      wfc_sbar_color,
  108.      wfc_perc_color,
  109.      net_pending,
  110.      alt_instance,
  111.      wfc_scr,
  112.      screen;
  113. } wfc_operation_rec;
  114.  
  115. ───[Step 2]───────────────────────────────────────────────────────────────────
  116.  
  117. Load VARS.H and do the following modification:
  118.  
  119. At the top:
  120.  
  121. = #include <sys\stat.h>
  122. = #include <dos.h>
  123. = #include <alloc.h>
  124. = #include <time.h>
  125. + #include <conio.h>
  126. = #ifdef __OS2__
  127.  
  128. Then lower:
  129.  
  130. = __EXTRN__ system_operation_rec sysinfo;
  131. =
  132. + __EXTRN__ wfc_operation_rec wfcinfo;
  133. +
  134. + #define WFC_FLAGS_EXIT_SAVER      0x0001
  135. + #define WFC_FLAGS_SCREEN_SAVER    0x0002
  136. + #define WFC_FLAGS_MENU_CENTERED   0x0004
  137. + #define WFC_FLAGS_STARFIELD       0x0008
  138. + #define WFC_FLAGS_SHOW_PERCENTAGE 0x0010
  139. +
  140. =
  141. = #ifdef __OS2__
  142.  
  143. ───[Step 3]───────────────────────────────────────────────────────────────────
  144.  
  145. Load BBS.C and and replace function getcaller with the following:
  146.  
  147. void getcaller(void)
  148. {
  149.   char s[81],ch,lokb,*ss,textbar[2][512];
  150.   int any,fast=0,i,i2,i3, pos=1;
  151.   double d, delay_time, check_time;
  152.   userrec tu;
  153.   union REGS regs;
  154.  
  155.   if (sysinfo.flags & OP_FLAGS_WFC_SCREEN)
  156.   {
  157.     randomize();
  158.     write_inst(INST_LOC_WFC,0,INST_FLAGS_NONE);
  159.     wfcinfo.net_pending=0;
  160.     wfcinfo.alt_instance=1;
  161.     wfcinfo.cur_time=wfcinfo.scroll_time=delay_time=wfcinfo.wfct=timer();
  162.     sprintf(textbar[1], wfc_string());
  163.     i3=strlen(textbar[1]);
  164.     wfc_screen();
  165.     display(0, pos);
  166.   }
  167.   c_sub=c_dir=0;
  168.  
  169.   cid_num[0]=0;
  170.   cid_name[0]=0;
  171.   frequent_init();
  172.   sl1(1,"");
  173.   imodem(0);
  174.   usernum=0;
  175.   wfc=0;
  176.   write_inst(INST_LOC_WFC,0,INST_FLAGS_NONE);
  177.   read_user(1,&thisuser);
  178.   read_qscn(1,qsc,0);
  179.   usernum=1;
  180.   reset_act_sl();
  181.   fwaiting=thisuser.waiting;
  182.   if (thisuser.inact & inact_deleted) {
  183.     thisuser.screenchars=80;
  184.     thisuser.screenlines=25;
  185.   }
  186.   screenlinest=defscreenbottom+1;
  187.   d=(1.0+timer()) / 102.723;
  188.   d-=floor(d);
  189.   d*=10000.0;
  190.   srand((unsigned int)d);
  191.   do {
  192.     if (sysinfo.flags & OP_FLAGS_WFC_SCREEN)
  193.     {
  194.       check_time=timer()-wfcinfo.wfct;
  195.       _setcursortype(_NOCURSOR);
  196.       if ((wfcinfo.wfc_scr==0) && (check_time<(sysinfo.screen_saver_time+0.1)))
  197.       {
  198.         wfc_screen();
  199.         display(0, pos);
  200.       }
  201.       if (((check_time)<sysinfo.screen_saver_time))
  202.       {
  203.         if ((timer() - delay_time)>=wfcinfo.poll_time)
  204.         {
  205.           delay_time= timer();
  206.           alternate_pending();
  207.           alternate_instance();
  208.         }
  209.         wfc_prlocate(43, 8, wfcinfo.wfc_prt_color, times());
  210.         wfc_prlocate(46, 20, wfcinfo.wfc_prt_color, "%s%-20s", sysop2()? "":get_string(112), get_string(315));
  211.         wfc_prlocate(46, 24, wfcinfo.wfc_prt_color, ctim(timer() - wfcinfo.cur_time));
  212.         if ((timer() - wfcinfo.scroll_time)>=wfcinfo.scrolling_time)
  213.         {
  214.           wfcinfo.scroll_time=timer();
  215.           for (i2=1;i2<i3;i2++)
  216.              textbar[0][i2-1]=textbar[1][i2];
  217.           wfc_prlocate(3, 3, wfcinfo.wfc_sbar_color, "%75.75s",textbar[0]);
  218.           textbar[0][i3-1]=0;
  219.           strcat(textbar[0],textbar[1]);
  220.           strcpy(textbar[1],textbar[0]);
  221.           textbar[1][i3]=0;
  222.         }
  223.       } else {
  224.         if (wfcinfo.flags & WFC_FLAGS_SCREEN_SAVER)
  225.         {
  226.           if (wfcinfo.flags & WFC_FLAGS_STARFIELD)
  227.           {
  228.             if (wfcinfo.wfc_scr!=2)
  229.             {
  230.               clrscr();
  231.               check_time+=10;
  232.               regs.h.al=0x13;
  233.               regs.h.ah=0x00;
  234.               int86(0x10, ®s, ®s);
  235.               wfcinfo.wfc_scr=2;
  236.             }
  237.             display_stars();
  238.           } else {
  239.             if ((check_time>(sysinfo.screen_saver_time+10)) || (wfcinfo.wfc_scr))
  240.             {
  241.               curatr= random(14) + 1;
  242.               clrscr();
  243.               wfcinfo.wfc_scr= 0;
  244.               wfc_prlocate(random(39)+1, random(42)+1, curatr,
  245.                            "WWIV Screen Saver - Press Any Key For WWIV");
  246.               wfcinfo.wfct=(timer()-sysinfo.screen_saver_time-1);
  247.             }
  248.           }
  249.         } else {
  250.           wfcinfo.wfct=timer();
  251.         }
  252.       }
  253.     }
  254.     write_inst(INST_LOC_WFC,0,INST_FLAGS_NONE);
  255.     set_net_num(0);
  256.     any=0;
  257.     wfc=1;
  258.     if (date_changed())
  259.       if (date_changed()) {
  260.         reset_screen(0);
  261.         printf("\n\nClock Corrupted.\n\n");
  262.         printf("Should put BBS in a batch file like:\n\n");
  263.         printf("copy con: wwiv.bat\n");
  264.         printf(":top\n");
  265.         printf("setclock\n");
  266.         printf("bbs\n");
  267.         printf("if errorlevel 1 goto top\n");
  268.         printf("^Z\n");
  269.         end_bbs(noklevel);
  270.       }
  271.       if ((strcmp(date(), status.date1)!=0)) {
  272.         if (instance==1) {
  273.           holdphone(1);
  274.           reset_screen(0);
  275.           beginday();
  276.           holdphone(0);
  277.           clrscrb();
  278.           if (sysinfo.flags & OP_FLAGS_WFC_SCREEN)
  279.           {
  280.             if (check_time<sysinfo.screen_saver_time) {
  281.               wfc_screen();
  282.               display(0, pos);
  283.             }
  284.           }
  285.        }
  286.     }
  287.     check_event();
  288.     if (do_event) {
  289.       reset_screen(0);
  290.       run_event();
  291.       any=1;
  292.       if (sysinfo.flags & OP_FLAGS_WFC_SCREEN)
  293.       {
  294.         if (check_time<sysinfo.screen_saver_time) {
  295.           wfc_screen();
  296.           display(0, pos);
  297.         }
  298.       }
  299.     }
  300.     lokb=0;
  301.     strcpy(curspeed,get_string(1042));
  302.     if ((!any) && ((rand() % 8000)==0) && (net_sysnum) &&
  303.         (ok_modem_stuff) && (sysinfo.flags & OP_FLAGS_NET_CALLOUT) &&
  304.         ((instance==1) || (status.net_version>=34))) {
  305.       attempt_callout();
  306.       any=1;
  307.     }
  308.     if (sysinfo.flags & OP_FLAGS_WFC_SCREEN)
  309.       ch=-1;
  310.     if (kbhitb()) {
  311.       if (sysinfo.flags & OP_FLAGS_WFC_SCREEN)
  312.         wfcinfo.wfct=timer();
  313.       wfc=0;
  314.       read_user(1,&thisuser);
  315.       read_qscn(1,qsc,0);
  316.       fwaiting=thisuser.waiting;
  317.       wfc=1;
  318.       if (sysinfo.flags & OP_FLAGS_WFC_SCREEN)
  319.         if (wfcinfo.wfc_scr==1) {
  320.           ch=upcase(getch());
  321.         } else {
  322.           wfcinfo.wfc_scr=0;
  323.           if (wfcinfo.flags & WFC_FLAGS_EXIT_SAVER)
  324.           {
  325.             regs.h.ah=0;
  326.             int86(0x16,®s,®s);
  327.           }
  328.           regs.h.al=0x03;
  329.           regs.h.ah=0x00;
  330.           int86(0x10, ®s, ®s);
  331.         }
  332.     }
  333.     okskey=0;
  334.     if (!(sysinfo.flags & OP_FLAGS_WFC_SCREEN))
  335.       ch=upcase(inkey());
  336.     if (sysinfo.flags & OP_FLAGS_WFC_SCREEN) {
  337.       if (ch==0) {
  338.         ch=getch();
  339.         switch (ch) {
  340.           case 80:
  341.             display(1, pos);
  342.             pos++;
  343.             if (pos>31) {
  344.               pos=1;
  345.             }
  346.             display(0, pos);
  347.             ch=-1;
  348.           break;
  349.           case 72:
  350.             display(1, pos);
  351.             pos--;
  352.             if (pos<1) {
  353.               pos=31;
  354.             }
  355.             display(0, pos);
  356.             ch=-1;
  357.           break;
  358.           case 71:
  359.             display(1, pos);
  360.             pos=1;
  361.             display(0, pos);
  362.             ch=-1;
  363.           break;
  364.           case 79:
  365.             display(1, pos);
  366.             pos=31;
  367.             display(0, pos);
  368.             ch=-1;
  369.           break;
  370.           case 59:
  371.             if (wfcinfo.flags & WFC_FLAGS_SCREEN_SAVER)
  372.               (wfcinfo.wfct)=(timer()-(sysinfo.screen_saver_time+5));
  373.             ch=-1;
  374.            break;
  375.           case 60:
  376.             delay_time=timer()-wfcinfo.poll_time;
  377.             ch=-1;
  378.           break;
  379.           default:
  380.             ch=-1;
  381.           break;
  382.         }
  383.       }
  384.       if (ch==13) {
  385.         switch (pos) {
  386.           case  1: ch=' ';  break;
  387.           case  2: ch='`';  break;
  388.           case  3: ch='//'; break;
  389.           case  4: ch='P';  break;
  390.           case  5: ch='.';  break;
  391.           case  6: ch=',';  break;
  392.           case  7: ch='N';  break;
  393.           case  8: ch='Z';  break;
  394.           case  9: ch='Y';  break;
  395.           case 10: ch='L';  break;
  396.           case 11: ch='M';  break;
  397.           case 12: ch='R';  break;
  398.           case 13: ch='E';  break;
  399.           case 14: ch='B';  break;
  400.           case 15: ch='D';  break;
  401.           case 16: ch='J';  break;
  402.           case 17: ch=9;    break;
  403.           case 18: ch='G';  break;
  404.           case 19: ch='C';  break;
  405.           case 20: ch='I';  break;
  406.           case 21: ch='U';  break;
  407.           case 22: ch='=';  break;
  408.           case 23: ch='A';  break;
  409.           case 24: ch='F';  break;
  410.           case 25: ch='T';  break;
  411.           case 26: ch='K';  break;
  412.           case 27: ch='S';  break;
  413.           case 28: ch='W';  break;
  414.           case 29: ch='X';  break;
  415.           case 30: ch='?';  break;
  416.           case 31: ch='Q';  break;
  417.         }
  418.       }
  419.     }
  420.     if (ch>=0) {
  421.       if (sysinfo.flags & OP_FLAGS_WFC_SCREEN) {
  422.         wfcinfo.wfct=timer();
  423.         curatr=0x07;
  424.         if (!((ch==' ') || (ch=='Q') || (ch==27) || (ch=='A'))) {
  425.           reset_screen(1);
  426.         } else {
  427.           if (wfcinfo.wfc_scr==0) {
  428.             wfc_screen();
  429.             display(0, pos);
  430.           }
  431.         }
  432.         _setcursortype(_NORMALCURSOR);
  433.       }
  434.       wfc=2;
  435.       any=1;
  436.       switch(ch) {
  437.         case '=':
  438.           if (ok_local()) {
  439.             holdphone(1);
  440.             reset_files();
  441.             holdphone(0);
  442.           }
  443.           break;
  444.         case '?':
  445.           if (ok_local()) {
  446.             i=7;
  447.             do {
  448.               clrscrb();
  449.               nl();
  450.               printmenu(i);
  451.               ch=upcase(getkey());
  452.               if ((ch!=' ') && (ch!=27))
  453.                 if (i==7)
  454.                   i=19;
  455.                 else
  456.                   i=7;
  457.             } while ((ch!=' ') && (ch!=27));
  458.           }
  459.           break;
  460.         case ' ':
  461.           wfcprt(get_string(41));
  462.           d=timer();
  463.           while ((!kbhitb()) && (fabs(timer()-d)<60.0));
  464.           if (kbhitb()) {
  465.             ch=upcase(getchd1());
  466.             if (ch==str_yes[0]) {
  467.               outs(str_yes);
  468.               outstr("\r\n");
  469.               reset_screen(1);
  470.               lokb=1;
  471.               if ((syscfg.sysconfig & sysconfig_off_hook)==0)
  472.                 dtr(0);
  473.             } else {
  474.               if (!ok_local())
  475.                 break;
  476.               ss=get_string(42);
  477.               if (ch==upcase(*ss)) {
  478.                 reset_screen(1);
  479.                 unx=1;
  480.                 fast=1;
  481.               } else {
  482.                 switch (ch) {
  483.                   case '1':
  484.                   case '2':
  485.                   case '3':
  486.                   case '4':
  487.                   case '5':
  488.                   case '6':
  489.                   case '7':
  490.                   case '8':
  491.                   case '9':
  492.                     fast=1;
  493.                     unx=ch-48;
  494.                     break;
  495.                 }
  496.               }
  497.               read_status();
  498.               if ((!fast) || (unx>status.users))
  499.                 break;
  500.               read_user(unx,&tu);
  501.               if ((tu.sl!=255) || (tu.inact & inact_deleted))
  502.                 break;
  503.               usernum=unx;
  504.               i=wfc; wfc=0;
  505.               read_user(usernum,&thisuser);
  506.               read_qscn(usernum,qsc,0);
  507.               wfc=i;
  508.               outchr(ch);
  509.               reset_screen(1);
  510.               outs("\r\n\r\n\r\n\r\n\r\n\r\n");
  511.               lokb=2;
  512.               if ((syscfg.sysconfig & sysconfig_off_hook)==0)
  513.                 dtr(0);
  514.               reset_act_sl();
  515.               changedsl();
  516.               if (set_language(thisuser.language)) {
  517.                 thisuser.language=0;
  518.                 set_language(thisuser.language);
  519.               }
  520.               break;
  521.             }
  522.             if (ch==0)
  523.               getchd1();
  524.           }
  525.           if (!lokb)
  526.             out1ch(12);
  527.           break;
  528.         case 'A':
  529.           if (!ok_modem_stuff)
  530.             break;
  531.           answer_phone();
  532.           break;
  533.         case 'B':
  534.           okskey=1;
  535.           if (ok_local()) {
  536.             write_inst(INST_LOC_BOARDEDIT,0,INST_FLAGS_NONE);
  537.             holdphone(1);
  538.             boardedit();
  539.             cleanup_net();
  540.             holdphone(0);
  541.           }
  542.           okskey=0;
  543.           break;
  544.         case 'C':
  545.           okskey=1;
  546.           if (ok_local()) {
  547.             write_inst(INST_LOC_CHAINEDIT,0,INST_FLAGS_NONE);
  548.             holdphone(1);
  549.             chainedit();
  550.             holdphone(0);
  551.           }
  552.           okskey=0;
  553.           break;
  554.         case 'D':
  555.           okskey=1;
  556.           if (ok_local()) {
  557.             write_inst(INST_LOC_DIREDIT,0,INST_FLAGS_NONE);
  558.             holdphone(1);
  559.             dlboardedit();
  560.             holdphone(0);
  561.           }
  562.           okskey=0;
  563.           break;
  564.         case 'W':
  565.           okskey=1;
  566.           if (ok_local()) {
  567.             write_inst(INST_LOC_TEDIT,0,INST_FLAGS_NONE);
  568.             holdphone(1);
  569.             text_edit();
  570.             holdphone(0);
  571.           }
  572.           okskey=0;
  573.           break;
  574.         case 'F':
  575.           if (ok_local()) {
  576.             write_inst(INST_LOC_DOS,0,INST_FLAGS_NONE);
  577.             holdphone(1);
  578.             nl();
  579.             pl(get_string(43));
  580.             nl();
  581.             extern_prog(getenv("COMSPEC"), EFLAG_SHRINK);
  582.             out1ch(12);
  583.             cleanup_net();
  584.             holdphone(0);
  585.           }
  586.           break;
  587.         case 'G':
  588.           okskey=1;
  589.           if (ok_local()) {
  590.             write_inst(INST_LOC_GFILEEDIT,0,INST_FLAGS_NONE);
  591.             holdphone(1);
  592.             gfileedit();
  593.             holdphone(0);
  594.           }
  595.           okskey=0;
  596.           break;
  597.         case 'I':
  598.           okskey=1;
  599.           if (ok_local()) {
  600.             write_inst(INST_LOC_VOTEEDIT,0,INST_FLAGS_NONE);
  601.             holdphone(1);
  602.             ivotes();
  603.             holdphone(0);
  604.           }
  605.           okskey=0;
  606.           break;
  607.         case 'J':
  608.           okskey=1;
  609.           if (ok_local()) {
  610.             holdphone(1);
  611.             edit_confs();
  612.             holdphone(0);
  613.           }
  614.           okskey=0;
  615.           break;
  616.         case 'K':
  617.           if (ok_local()) {
  618.             usernum=1;
  619.             holdphone(1);
  620.             okskey=1;
  621.             prt(7,get_string(7));
  622.             input(s,50);
  623.             load_workspace(s,0);
  624.             send_email();
  625.             okskey=0;
  626.             write_user(1,&thisuser);
  627.             cleanup_net();
  628.             holdphone(0);
  629.           }
  630.           break;
  631.         case 'L':
  632.           if (ok_local()) {
  633.             read_status();
  634.             slname(date(), s);
  635.             print_local_file(s,status.log1);
  636.           }
  637.           break;
  638.         case 'M':
  639.           okskey=1;
  640.           if (ok_local()) {
  641.             write_inst(INST_LOC_MAILR,0,INST_FLAGS_NONE);
  642.             holdphone(1);
  643.             mailr();
  644.             holdphone(0);
  645.           }
  646.           okskey=0;
  647.           break;
  648.         case 'N':
  649.           if (ok_local())
  650.             print_local_file("NET.LOG","NETDAT*.LOG");
  651.           break;
  652.         case 'P':
  653.           if (ok_local())
  654.             print_pending_list();
  655.           break;
  656.         case 'Q':
  657.           reset_screen(0);
  658.           end_bbs(QUIT_LEVEL);
  659.           break;
  660.         case 27:
  661.           wfcprt(get_string(1043));
  662.           if (yn()) {
  663.             if (sysinfo.flags & OP_FLAGS_WFC_SCREEN) {
  664.               wfcprt("Would you like to go off-hook?");
  665.               if (yn())
  666.                 pr1(modem_i->pick);
  667.               reset_screen(0);
  668.             }
  669.             end_bbs(QUIT_LEVEL);
  670.          }
  671.          if (!(sysinfo.flags & OP_FLAGS_WFC_SCREEN))
  672.            clrscrb();
  673.           break;
  674.         case 'R':
  675.           if (ok_local()) {
  676.             usernum=1;
  677.             holdphone(1);
  678.             okskey=1;
  679.             readmail();
  680.             okskey=0;
  681.             write_user(1,&thisuser);
  682.             cleanup_net();
  683.             holdphone(0);
  684.           }
  685.           break;
  686.         case 'S':
  687.           if (ok_local()) {
  688.             prstatus();
  689.             getkey();
  690.           }
  691.           break;
  692.         case 'T':
  693.           if ((ok_local()) && (syscfg.terminal[0])) {
  694.             write_inst(INST_LOC_TERM,0,INST_FLAGS_NONE);
  695.             if (syscfg.sysconfig & sysconfig_shrink_term)
  696.               extern_prog(syscfg.terminal, EFLAG_SHRINK);
  697.             else
  698.               extern_prog(syscfg.terminal, 0);
  699.             imodem(1);
  700.             imodem(0);
  701.           }
  702.           break;
  703.         case 'U':
  704.           okskey=1;
  705.           if (ok_local()) {
  706.             write_inst(INST_LOC_UEDIT,0,INST_FLAGS_NONE);
  707.             holdphone(1);
  708.             uedit(1,0);
  709.             holdphone(0);
  710.           }
  711.           okskey=0;
  712.           break;
  713.         case 'E':
  714.           if (ok_local()) {
  715.             usernum=1;
  716.             holdphone(1);
  717.             okskey=1;
  718.             send_email();
  719.             okskey=0;
  720.             write_user(1,&thisuser);
  721.             cleanup_net();
  722.             holdphone(0);
  723.           }
  724.           break;
  725.         case 'X':
  726.           for(i=0;i<50;i++) {
  727.             if(xenviron[i]!=NULL)
  728.               npr("\r\nxenv %d=%s",i,xenviron[i]);
  729.           }
  730. #ifndef __OS2__
  731.           npr("\r\nreal=%x, new=%x",INT_REAL_DOS,save_dos);
  732. #endif
  733.           nl();
  734.           pausescr();
  735.         break;
  736.         case 'Y':
  737.           if (ok_local()) {
  738.             read_status();
  739.             slname(date(), s);
  740.             print_local_file(status.log1,s);
  741.           }
  742.           break;
  743.         case 'Z':
  744.           if (ok_local()) {
  745.             zlog();
  746.             nl();
  747.             getkey();
  748.           }
  749.           break;
  750.         case '/':
  751.           if ((net_sysnum) && (ok_local()))
  752.             force_callout(0);
  753.           break;
  754.         case '.':
  755.           if ((net_sysnum) && (ok_local()))
  756.             force_callout(1);
  757.           break;
  758.         case ',':
  759.           if ((net_sysnum>0) || (net_num_max>1) && ok_local()) {
  760.             nl();
  761.             prt(7,get_string(23));
  762.             ch=onek("Q012");
  763.             switch (ch) {
  764.               case '0':
  765.                 print_local_file(get_string(1027),"");
  766.                 break;
  767.               case '1':
  768.                 print_local_file(get_string(1028),"");
  769.                 break;
  770.               case '2':
  771.                 print_local_file(get_string(1029),"");
  772.                 break;
  773.             }
  774.           }
  775.           break;
  776.         case '`':
  777.           if ((net_sysnum) && (ok_local())) {
  778.             holdphone(1);
  779.             print_net_listing(1);
  780.             holdphone(0);
  781.           }
  782.           break;
  783.         case 9:
  784.           if (ok_local()) {
  785.             holdphone(1);
  786.             instance_edit();
  787.             holdphone(0);
  788.           }
  789.           break;
  790.       }
  791.       if (!incom && !lokb) {
  792.         frequent_init();
  793.         read_user(1,&thisuser);
  794.         read_qscn(1,qsc,0);
  795.         fwaiting=thisuser.waiting;
  796.         reset_act_sl();
  797.         usernum=1;
  798.       }
  799.       okskey=0;
  800.       catsl();
  801.       write_inst(INST_LOC_WFC, 0, INST_FLAGS_NONE);
  802.     }
  803.     if ((comhit()) && (ok_modem_stuff) && (!lokb)) {
  804.       any=1;
  805.       if (peek1c()==10)
  806.         get1c();
  807.       else {
  808.         wfcprt("* ");
  809.         if (mode_switch(1.0,0)==mode_ring)
  810.           answer_phone();
  811.         else if (modem_mode == mode_con) {
  812.           incom=outcom=1;
  813.           if (!(modem_flag & flag_ec))
  814.             wait1(45);
  815.           else
  816.             wait1(2);
  817.         }
  818.       }
  819.     }
  820.     if (!any) {
  821.       if (c_sub<num_subs) {
  822.         if (!sub_dates[c_sub]) {
  823.           any=1;
  824.           iscan1(c_sub, 1);
  825.         }
  826.         c_sub++;
  827.       } else if (c_dir<num_dirs) {
  828.         if (!dir_dates[c_dir]) {
  829.           any=1;
  830.           dliscan_hash(c_dir);
  831.         }
  832.         c_dir++;
  833.       } else {
  834.         if (labs(timer1()-mult_time) > 1000L) {
  835.           cleanup_net();
  836.           mult_time=timer1();;
  837.           giveup_timeslice();
  838.         } else {
  839.           giveup_timeslice();
  840.         }
  841.       }
  842.     }
  843.   } while ((!incom) && (!lokb) && (!endday));
  844.   if (lokb) {
  845.     if (ok_modem_stuff)
  846.       modem_speed = modem_i->defl.modem_speed;
  847.     else
  848.       modem_speed = 14400;
  849.   }
  850.   using_modem=incom;
  851.   if (lokb==2)
  852.     using_modem=-1;
  853.   okskey=1;
  854.   if (!endday) {
  855.     clrscrb();
  856.     if (modem_mode==mode_fax)
  857.       outs(get_string(45));
  858.     else
  859.       outs(get_string(46));
  860.     outs(curspeed);
  861.     outs("...\r\n");
  862.   }
  863.   wfc=0;
  864. }
  865.  
  866. ───[Step 4]───────────────────────────────────────────────────────────────────
  867.  
  868. Load UTILITY.C and modify the following line in function frequent_init:
  869.  
  870. =   checkit=0;
  871. =   topline=0;
  872. =   screenlinest=defscreenbottom+1;
  873. *   if (!restoring_shrink && !sysinfo.flags & OP_FLAGS_WFC_SCREEN)
  874. =     clrscrb();
  875. =   endofline[0]=0;
  876. =   hangup=0;
  877. =   hungup=0;
  878.  
  879. ───[Step 5]───────────────────────────────────────────────────────────────────
  880.  
  881. Load NETSUP.C and modify this code in function cleanup_net:
  882.  
  883. =      if (!net_sysnum)
  884. =        continue;
  885. =
  886. =      set_protect(0);
  887. +      if ((wfcinfo.wfc_scr==0) || (!sysinfo.flags & OP_FLAGS_WFC_SCREEN))
  888. =        clrscrb();
  889. =
  890. =      ok2=1;
  891. =      abort=0;
  892.  
  893. Lower in the code...
  894.  
  895. =          if (ok) {
  896. +            reset_screen(0);
  897. =            holdphone(1);
  898. =            hangup=0;
  899.  
  900. A bit down...
  901.  
  902. =          if (ok2) {
  903. +            reset_screen(0);
  904. =            clrscrb();
  905. =            zap_contacts();
  906. =          }
  907.  
  908. Still in NETSUP.C and look for the following lines in void attempt_callout:
  909.  
  910.  
  911. =      }
  912. =      if (i1!=-1) {
  913. =        free_vars(weight, try);
  914. =        weight=NULL;
  915. =        try=NULL;
  916. +        reset_screen(0);
  917. =        do_callout(net_networks[net_num].con[i1].sysnum);
  918. +        if (sysinfo.flags & OP_FLAGS_WFC_SCREEN)
  919. +        {
  920. +          if ((timer() - wfcinfo.wfct)<sysinfo.screen_saver_time)
  921. +            wfc_screen();
  922. +          else
  923. +            (wfcinfo.wfct)=(timer()-(sysinfo.screen_saver_time+11));
  924. +        }
  925. =        time(&l);
  926. =        last_time_c=l;
  927. =        break;
  928. =      }
  929. =    }
  930. =  }
  931. =
  932. =  free_vars(weight, try);
  933. =
  934. =  set_net_num(0);
  935. =}
  936.  
  937. ───[Step 6]───────────────────────────────────────────────────────────────────
  938.  
  939. Load MODEM.C, do the following modifications in void holdphone:
  940.  
  941. =         dtr(1);
  942. =         if (fabs(xtime-timer())<modem_time)
  943. +         {
  944. +           if (wfcinfo.wfc_scr==0)
  945. +             nln(2);
  946. *           wfcprt("Waiting for modem...");
  947. +         }
  948. =         while (fabs(xtime-timer())<modem_time)
  949. =           ;
  950.  
  951.  
  952. Now replace the next 2 voids
  953.  
  954. void imodem(int x)
  955. {
  956.   int i,done;
  957.   char *is;
  958.   char s[81];
  959.  
  960.   if (!ok_modem_stuff) {
  961.     if ((sysinfo.flags & OP_FLAGS_WFC_SCREEN) && (wfcinfo.wfc_scr==0))
  962.       outs("\x0c");
  963.     return;
  964.   }
  965.  
  966.   if (x)
  967.     is=modem_i->setu;
  968.   else
  969.     is=modem_i->init;
  970.  
  971.   if (!(*is))
  972.     return;
  973.  
  974.   if (sysinfo.flags & OP_FLAGS_WFC_SCREEN) {
  975.     if  (wfcinfo.wfc_scr==0)
  976.       clrscr();
  977.     } else {
  978.       outs("\x0c");
  979.     }
  980.   wfcprt("Waiting...");
  981.   /* begin_crit(); */
  982.   rts(1);
  983.   dtr(1);
  984.   do_result(&(modem_i->defl));
  985.   i=0;
  986.   done=0;
  987.   wait1(9);
  988.   while (!done) {
  989.     initport(syscfgovr.primaryport);
  990.     pr1(is);
  991.     dump();
  992.     if (mode_switch(5.0,0)==mode_norm) {
  993.       done=1;
  994.     } else {
  995.       ++i;
  996.       if ((sysinfo.flags & OP_FLAGS_WFC_SCREEN) && (wfcinfo.wfc_scr))
  997.         curatr=0x1c;
  998.       sprintf(s,"(%d)...",modem_mode);
  999.       outs(s);
  1000.     }
  1001.     if (i>5)
  1002.       done=1;
  1003.   }
  1004.   /* end_crit(); */
  1005.   if (!(sysinfo.flags & OP_FLAGS_WFC_SCREEN) || (wfcinfo.wfc_scr==0))
  1006.     outs("\x0c");
  1007. }
  1008.  
  1009.  
  1010. void answer_phone(void)
  1011. {
  1012.   double d;
  1013.   union REGS regs;
  1014.  
  1015.   if (!ok_modem_stuff)
  1016.     return;
  1017.   cid_num[0]=0;
  1018.   cid_name[0]=0;
  1019.  
  1020.   if (sysinfo.flags & OP_FLAGS_WFC_SCREEN) {
  1021.     if (wfcinfo.wfc_scr==2)
  1022.     {
  1023.       regs.h.al=0x03;
  1024.       regs.h.ah=0x00;
  1025.       int86(0x10, ®s, ®s);
  1026.       wfc_screen();
  1027.       wfcinfo.wfc_scr=1;
  1028.     }
  1029.   }
  1030.   wfcprt("Answering phone, 'H' to abort.");
  1031.   _setcursortype(_NORMALCURSOR);
  1032.   do_result(&(modem_i->defl));
  1033.   pr1(modem_i->ansr);
  1034.   d=timer();
  1035.   rts(1);
  1036.   if ((mode_switch(45.0,1)!=mode_con) && (modem_mode!=mode_fax)) {
  1037.     if (modem_mode == 0) {
  1038.       outcomch(' ');
  1039.       outcomch('\r');
  1040.       wait1(18);
  1041.       if (fabs(timer()-d)<modem_time) {
  1042.         wfcprt("Waiting for modem...");
  1043.         while (fabs(timer()-d)<modem_time)
  1044.           ;
  1045.       }
  1046.       imodem(0);
  1047.       imodem(0);
  1048.     } else {
  1049.       outs(curspeed);
  1050.       imodem(0);
  1051.       imodem(0);
  1052.     }
  1053.     if (sysinfo.flags & OP_FLAGS_WFC_SCREEN) {
  1054.       if ((timer() - wfcinfo.wfct)<sysinfo.screen_saver_time)
  1055.         wfc_screen();
  1056.       if (cid_name[0])
  1057.         wfcprt("CID Name: %s, Number: %s", cid_name, cid_num);
  1058.     }
  1059.   } else {
  1060.     incom=outcom=1;
  1061.     if (!(modem_flag & flag_ec))
  1062.       wait1(72);
  1063.     else
  1064.       wait1(36);
  1065.     reset_screen(1);
  1066.   }
  1067. }
  1068.  
  1069. ───[Step 7]───────────────────────────────────────────────────────────────────
  1070.  
  1071. In this archive, you should have the following files:
  1072.  
  1073. FMD-02.MOD  : Main Modification File
  1074. WFC.C       : New File to Add at WWIV
  1075. INITWFC.EXE : Utility To Init WFC
  1076. WFC.DAT     : WFC Screen Data File
  1077. WFC.ANS     : WFC Ansi Screen
  1078. FILE_ID.DIZ : Description File
  1079. PRODUCTS.FMD: French Mod Division Products List
  1080.  
  1081.  
  1082. Copy WFC.C in your source directory, copy INITWFC.EXE in your main WWIV
  1083. directory and copy WFC.DAT in your WWIV data directory.
  1084.  
  1085. ───[Step 8]───────────────────────────────────────────────────────────────────
  1086.  
  1087. Load the file MAKEFILE.MAK and modify this part of the file:
  1088.  
  1089. >>> BORLAND C++ USERS
  1090.  
  1091. Do the change here (Line 125)
  1092.  
  1093. =        uedit.obj    voteedit.obj xferovl.obj  xferovl2.obj \
  1094. =        xfertmp.obj  xinit.obj    qwk.obj      qwk1.obj     \
  1095. *        ripovl.obj   wfc.obj
  1096.  
  1097. And here (Line 140)
  1098.  
  1099. =        $(OBJ)\xferovl.obj  $(OBJ)\xferovl2.obj $(OBJ)\xfertmp.obj  \
  1100. =        $(OBJ)\xinit.obj    $(OBJ)\qwk.obj      $(OBJ)\qwk1.obj     \
  1101. *        $(OBJ)\ripovl.obj   $(OBJ)\wfc.obj
  1102.  
  1103. And here (Line 317)
  1104.  
  1105. = ripovl.obj  : ripovl.c
  1106. =   $(TCC_OVL)
  1107. + wfc.obj     : wfc.c
  1108. +   $(TCC_OVL)
  1109. =
  1110. = fix.obj     : fix.c
  1111.  
  1112. >>> TURBO C / TURBO C++ USERS:
  1113.  
  1114. Load MAKEFILE.MAK and do the following changes:
  1115.  
  1116. =                $(OBJ)bbsovl1.obj $(OBJ)shrink.obj $(OBJ)bbsovl2.obj\
  1117. *                $(OBJ)sr.obj $(OBJ)wfc.obj
  1118.  
  1119. a bit down...
  1120.  
  1121. * $(OBJ)bbs.obj     : bbs.c      vars.h vardec.h net.h wfc.h
  1122. =   $(TCC_NRM)
  1123. * $(OBJ)modem.obj   : modem.c    vars.h vardec.h net.h wfc.h
  1124.  
  1125. Lower:
  1126.  
  1127. * $(OBJ)netsup.obj  : netsup.c   vars.h vardec.h net.h wfc.h
  1128.  
  1129. Lower:
  1130.  
  1131. = $(OBJ)bbsovl2.obj : bbsovl2.c  vars.h vardec.h net.h
  1132. =   $(TCC_OVL)
  1133. + $(OBJ)wfc.obj     : wfc.c      vars.h vardec.h net.h wfc.h
  1134. +   $(TCC_OVL)
  1135.  
  1136. ───[Step 9]───────────────────────────────────────────────────────────────────
  1137.  
  1138. Load WWIV.INI, which should be in your WWIV directory and add this to the end
  1139. of the file:
  1140.  
  1141. [WFC]
  1142. ; Time between each movement in the scroll bar
  1143. SCROLL_TIME       = 0.25
  1144. ; Time before polling (rotation of informations)
  1145. POLLING_TIME      = 20
  1146. ; Execute command or not while in the screen saver
  1147. EXIT_SAVER        = YES
  1148. ; Screen Saver
  1149. SCREEN_SAVER      = YES
  1150. ; Use the starfield simulation screen saver
  1151. STARFIELD         = NO
  1152. ; Center the text in the side menu
  1153. MENU_CENTERED     = NO
  1154. ; Show percentage in activity bar
  1155. SHOW_PERCENTAGE   = NO
  1156. ; Amount of options in the side menu
  1157. OPTIONS           = 31
  1158. ; Highlighted Color of the side menu
  1159. WFC_HIGH_COLOR    = 59
  1160. ; Normal Color of the side menu
  1161. WFC_LOW_COLOR     = 113
  1162. ; Text color of the WFC Screen
  1163. WFC_PRT_COLOR     = 126
  1164. ; Network Pending Color
  1165. WFC_NET_COLOR     = 15
  1166. ; Activity Bar Color
  1167. WFC_BAR_COLOR     = 12
  1168. ; Status Bar Color
  1169. WFC_SBAR_COLOR    = 127
  1170. ; Textmode when quitting WFC Screen
  1171. ; C80   = 80x25
  1172. ; C4350 = 80x50
  1173. SCREEN            = C80
  1174.  
  1175. Then in the [WWIV] sub section, you should define the following items:
  1176.  
  1177. ; WFC Screen
  1178. WFC_SCREEN        = YES
  1179. ; Seconds before starting screen saver
  1180. SCREEN_SAVER_TIME = 180
  1181.  
  1182. Defined all those variable to your own needs. The color chart is available
  1183. in the stock WWIV.INI, all times are in seconds.
  1184.  
  1185. ───[Step 10]──────────────────────────────────────────────────────────────────
  1186.  
  1187. Recompile your FCNS.H file with a MAKE FCNS or insert yourself the functions
  1188. prototype in FCNS.H:
  1189.  
  1190. /* File: wfc.c */
  1191.  
  1192. void set_43(void);
  1193. void set_25(void);
  1194. unsigned char *wfc_string(void);
  1195. void wfc_prlocate(int x, int y, int c, char *fmt, ...);
  1196. void display(int type, int pos);
  1197. void init_wfc(void);
  1198. void wfc_screen(void);
  1199. void alternate_pending(void);
  1200. void alternate_instance(void);
  1201. void wfcprt(char *fmt, ...);
  1202. void reset_screen(int mode);
  1203. long memavail(void);
  1204. void pixel(int x, int y, int attr);
  1205. void display_stars(void);
  1206.  
  1207.   Then recompile your BBS, you need to recompile the whole system since you
  1208. have modified VARDEC.H and VARS.H, but since technology is growing so fast,
  1209. it shouldn't take too much time. Then copy BBS.EXE in your WWIV directory.
  1210.  
  1211. ───[Step 11]──────────────────────────────────────────────────────────────────
  1212.  
  1213.   If you are running WWIV v4.24 since a few days or more, you have a variable
  1214. increasing daily which is the amount of days since your system is opened.
  1215. Since WWIV has that feature only since WWIV v4.24, this number is not accurate
  1216. if you were running previous versions of WWIV.
  1217.  
  1218.   INITWFC.EXE will help you setting this number to the right number, type
  1219. "INITWFC.EXE -?" to know how to use it. You can also use WWIVsys to set the
  1220. amount of days. You will have to find yourself the amount of days since you're
  1221. opened.
  1222.  
  1223.   If you are running WWIV v4.24 for the first time, you NEED to set this value
  1224. before running WWIV for the first time with this modification, otherwise you
  1225. will get a floating point error because your value will be to 0 by default.
  1226.  
  1227.  
  1228.  ┌┬═══════════════┐
  1229.  ││ Multi-Taskers ││
  1230.   └═══════════════┴┘
  1231.  
  1232.   This modification has been tested under Windows v3.1, Windows For Workgroups
  1233. v3.11 and Windows 95, there is no problems with it. The only "problem" you may
  1234. find is that you see double in the starfield, we are currently trying to fix
  1235. that problem.
  1236.  
  1237.   This modification has been tested also under OS/2 and WARP, it is working
  1238. fine, but some people are experiencing problems running it in a windowed
  1239. session.
  1240.  
  1241.   Of course, running a graphical multi-tasker and having the starfield screen
  1242. saver disabled will force you to run in a full-screen session.
  1243.  
  1244.   Under DESQview, you will have more troubles than anyone else, but it will
  1245. work too. Sorry about the cursor, in any other multi-tasker, you won't see
  1246. the cursor, but DESQview doesn't get that. You have to change your MAXIMUM
  1247. HEIGHT to 43, it will automatically switch to 80x25 when you will log on
  1248. locally and for remote logs.
  1249.  
  1250.   Good Luck! And don't hesitate to send your own settings.
  1251.  
  1252.  ┌┬════════════════════════════┐
  1253.  ││ Frequently Asked Questions ││
  1254.   └════════════════════════════┴┘
  1255.  
  1256. Q. When I load WWIV, it gives me a "floating point error", what's up?
  1257.  
  1258. A. You didn't run INITWFC to initialize your amount of days.
  1259.  
  1260. ────────────────────────────────────────────────────────────────────────────
  1261.  
  1262. For comments, bug report and suggestion, e-mail at the following address:
  1263.  
  1264. Nicolas LeBlanc  2@20302.WWIVnet (aka Spotnick)
  1265.                  -> spotnick@gamemaster.qc.ca
  1266. Martin Bourdages 242@20306 / 3@20302.WWIVnet (aka Dark Shadow)
  1267.                  -> martin.bourdages@radio.magicnet.com
  1268.  
  1269.                  =>   French Mod Division Support Sub   <=
  1270.                                 SubType: FMD
  1271.                            Host: @20302 (WWIVnet)
  1272.                       Scan sublist for other networks
  1273.  
  1274.         Read PRODUCTS.FMD for the full list of our support systems.
  1275.  
  1276. ───[EOF]──────────────────────────────────────────────────────────────────────
  1277.