home *** CD-ROM | disk | FTP | other *** search
/ The Arcade BBS / arcadebbs.zip / arcadebbs / bbstools / MODS / ALLMODS.ZIP / FMD-08A.ZIP / FMD-08A.MOD
Encoding:
Text File  |  1995-06-06  |  7.2 KB  |  177 lines

  1. Nicolas Leblanc #2 @20302
  2. Sat Jun 03 00:39:10 1995
  3. 0R 34 06/05 03:54 WWIVNET 4051->8421
  4. 0R 34 06/04 23:20 WWIVNet 4001->4051
  5. 0R 34 06/05 04:05 WWIVnet 4000->4001
  6. 0R 34 06/04 17:53 WWIVnet ->4000
  7. 0R 34 06/04 03:24 WWIVnet 4001->4000
  8. 0R 34 06/04 05:40 WWIVnet 20001->4001
  9. 0R 34 06/03 00:47 WWIVnet 20302->20001
  10. 0R 34 06/03 00:42 WWIVnet ->20302
  11.  
  12.    ┌┬─── ──  ─   ─  ── ───────────────────────────────────────────────────┬─ ∙∙
  13.    ││                    Alternative Worlds Presents                      │
  14.    └┼─────────────────────────────────────────────────────────────────────┐
  15.    ││ Mod Name       » FMD-08a.MOD                                        │∙
  16.    ││ Difficulty     » █▒▒▒▒▒▒▒▒▒▒ (1/10)                                 │:
  17.    ││ WWIV Version   » 4.24                                               ││
  18.    ││ Date Affected  » 06/01/95                                           ││
  19.    :│ Files Affected » MMENU.C / SYSOPF.C                                 ││
  20.    ∙│ Description    » Graphical Activity Log For WWIV                    ││
  21.     └─────────────────────────────────────────────────────────────────────┼┐
  22.     │       A French Mod Division Release - (C) 1995 FMD Software         ││
  23. ∙∙ ─┴─────────────────────────────────────────────────── ──  ─   ─  ── ───└┘
  24.  
  25.  
  26.  ┌┬══════════════════┐
  27.  ││ Long Description ││
  28.   └══════════════════┴┘
  29.  
  30.   This modification will great a nice graphic design of your activity log
  31. (zlog) that can be used everywhere on your system. This graphic is now
  32. ANSI and Ascii compatible. Here is a snapshot of what this will look like:
  33.  
  34. D┌────────╥───────────────────────────────────────────────────────┐
  35. │  Date  ║ Activity: 1 ▒C= 1.8% activity.C
  36. ├────────╫─┬─┬─┬─┼─┬─┬─┬─┼─┬─┬─┬─┼─┬─┬─┬─┼─┬─┬─┬─┼─┬─┬─┬─┼─┬─┬─┬─┤
  37. 11/28/94                                                       
  38. 11/21/94                                                       
  39. 11/13/94▒▒▒                                                    
  40. 11/12/94▒▒▒▒▒▒▒                                                
  41. 11/11/94▒▒▒▒▒                                                  
  42. 11/10/94▒▒▒▒▒▒▒▒▒                                              
  43. 11/09/94▒▒▒▒▒▒                                                 
  44. 11/08/94▒▒▒▒▒▒▒                                                
  45. 11/07/94▒▒▒▒▒▒▒▒▒▒▒▒▒▒                                         
  46. 11/06/94▒▒▒▒▒▒▒▒▒▒▒▒▒                                          
  47. 11/05/94▒▒▒                                                    
  48. 11/04/94▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒                                       
  49. 11/03/94                                                       
  50. 11/01/94                                                       
  51. 10/31/94                                                       
  52. └────────╨───────────────────────────────────────────────────────┘0
  53.  
  54. Revision A:
  55.  
  56.  - Updated for WWIV v4.24
  57.  
  58.  ┌┬═══════┐
  59.  ││ Tests ││
  60.   └═══════┴┘
  61.  
  62.   This modification has been tested on a virgin WWIV v4.24 source using
  63.   Borland C++ v4.5
  64.  
  65. ──────────────────────────────────────────────────────────────────────────────
  66.                                    Legend
  67.                           ╔═══╤══════════════════┐
  68.                           │ + │ Add This Line    │
  69.                           │ - │ Delete This Line │
  70.                           │ * │ Modify This Line │
  71.                           │ = │ Existing Line    │
  72.                           └═══╧══════════════════╝
  73. ───[Step 1]────────────────────────────────────────────────────────────────────
  74.  
  75. Load SYSOPF.C and put the following function at the end of the file.
  76.  
  77. void build_graph(void)
  78. {
  79.   char s[81];
  80.   int abort=0, f, i=0, percent;
  81.   zlogrec z;
  82.   float block;
  83.  
  84.   outchr(12);
  85.   sysoplog("@View Graphical Zlog");
  86.   sprintf(s,"%sZLOG.DAT",syscfg.datadir);
  87.   f = sh_open1(s, O_RDWR | O_BINARY);
  88.   if (f < 0)
  89.     return;
  90.   block = 100.0 / 55.0;
  91.   sh_read(f, (void *)&z, sizeof(zlogrec));
  92.   if (okansi()) {
  93.     npr("7┌────────╥%s┐\r\n", charstr(55, '─'));
  94.     npr("7│ 9 Date 7 ║ 9Activity: 1 4▒9 = %1.1f%% activity.%s7│\r\n",
  95.          block, charstr(24, ' '));
  96.     npr("7├────────╫─┬─┬─┬─┼─┬─┬─┬─┼─┬─┬─┬─┼─┬─┬─┬─┼─┬─┬─┬─┼─┬─┬─┬─┼─┬─┬─┬─┤\r\n");
  97.     while ((i<15) && (abort!=32))
  98.     {
  99.        npr("7│9%8s7║",z.date);
  100.        percent = 10 * z.active / 144;
  101.        percent = (int)((float)percent / block);
  102.        npr("4%-55.55s7│", charstr(percent-1, '▒'));
  103.        i++;
  104.        sh_lseek(f, ((long)i) * sizeof(zlogrec), SEEK_SET);
  105.        sh_read(f, (void *)&z, sizeof(zlogrec));
  106.        abort = inkey();
  107.        nl();
  108.     }
  109.     npr("7└────────╨%s┘\r\n", charstr(55, '─'));
  110.   } else {
  111.     npr("+--------+%s+\r\n", charstr(55, '-'));
  112.     npr("|  Date  | Activity: 1 * = %1.1f%% activity.%s|\r\n",
  113.          block, charstr(24, ' '));
  114.     npr("|--------|-+-+-+-|-+-+-+-|-+-+-+-|-+-+-+-|-+-+-+-|-+-+-+-|-+-+-+-|\r\n");
  115.     while ((i<15) && (abort!=32))
  116.     {
  117.        npr("|%8s|",z.date);
  118.        percent = 10 * z.active / 144;
  119.        percent = (int)((float)percent / block);
  120.        npr("%-55.55s|", charstr(percent-1, '*'));
  121.        i++;
  122.        sh_lseek(f, ((long)i) * sizeof(zlogrec), SEEK_SET);
  123.        sh_read(f, (void *)&z, sizeof(zlogrec));
  124.        abort = inkey();
  125.        nl();
  126.     }
  127.     npr("+--------+%s+\r\n", charstr(55, '-'));
  128.   }
  129.   sh_close(f);
  130.   pausescr();
  131. }
  132.  
  133.  
  134. Close SYSOPF.C
  135.  
  136. ───[Step 2]────────────────────────────────────────────────────────────────────
  137.  
  138. Load MMENU.C and do the following change to mainmenu:
  139.  
  140. =    if (strcmp(s,"ZLOG")==0) {
  141. =      zlog();
  142. +      prt(5, "See the graphical zlog? ");
  143. +      if (yn())
  144. +        build_graph();
  145. =    }
  146. +    if ((strcmp(s,"GRAPH")==0)) {
  147. +      build_graph();
  148. +    }
  149.  
  150. Save BBS.C
  151.  
  152. ───[Step 3]────────────────────────────────────────────────────────────────────
  153.  
  154. Now MAKE FCNS and compile the BBS and it's done. Optimize for your needs.
  155.  
  156. You can use this modification wherever you want, some people like to have it
  157. in their logon, then you simply have to put a "build_graph();" just after
  158. read_automessage(); in LILO.C, etc etc.. very easy to use for your own needs.
  159.  
  160. French Proverb: C'est dans les moments difficiles qu'on trouve les vrais amis.
  161.  
  162. For comments, bug report and suggestion, e-mail at the following address:
  163.  
  164. Nicolas LeBlanc  2@20302.WWIVnet (aka Spotnick)
  165.                  -> spotnick@gamemaster.qc.ca
  166. Martin Bourdages 242@20306 / 3@20302.WWIVnet (aka Dark Shadow)
  167.                  -> martin.bourdages@radio.magicnet.com
  168.  
  169.                  =>   French Mod Division Support Sub   <=
  170.                                 SubType: FMD
  171.                            Host: @20302 (WWIVnet)
  172.                       Scan sublist for other networks
  173.  
  174.         Read PRODUCTS.FMD for the full list of our support systems.
  175.  
  176. ───[EOF]──────────────────────────────────────────────────────────────────────
  177.