home *** CD-ROM | disk | FTP | other *** search
/ The Arcade BBS / arcadebbs.zip / arcadebbs / bbstools / MODS / ALLMODS.ZIP / JIFF-04.ZIP / JIFF-04.MOD < prev   
Encoding:
Text File  |  1995-06-29  |  4.6 KB  |  169 lines

  1. ``Jiff`` IceNET #4 AT 7668
  2. Sun Jun 18 00:13:38 1995
  3. ┌───────────────────────────────────────────┬────────────Cow Header (Moo)───┐
  4. │ Mod Name: JIFF-04.MOD    The Author: Jiff │ 4@7668 IceNET  1@7604 Penguin │
  5. │ Difficulty: █▒▒▒▒▒▒▒▒▒                    │ 1@1    CowLink 1@7666 GoldNET │
  6. │ WWIV Version: v4.24      Date: 06/17/95   │ 1@7669 ZeppNET 1@7666 RoadNET │
  7. │ Files Affected: COM.C GFILES.C            │                1@52 AstralNET │
  8. │ Description: Replacement for Gfiles.      │  The Pinnacle (716) 646-3272  │
  9. └───────────────────────────────────────────┴───────────────────────────────┘
  10.  
  11.     This is the first G-Files mod I've seen for 4.24...  This should be
  12. pretty simple, since all you do is copy and paste...  I'd recomend changing
  13. the colours a little, but not too much or the JiffBar will look weird...
  14.     For anyone who has non-ANSI users, this does do ANSI checks, and it
  15. should work fine for all...  Just a simple, colourful, boxed-style G-files!
  16.     Thanks to Spotnick for his LiteBar function that I edited to become
  17. JiffBar...  As always, any problems aren't my fault, but I will help you if
  18. you need it...  Please back up your source code now, before you try a tough
  19. mod...  =)
  20.  
  21. ─═[░▒▓Secret Codes!▓▒░]═─
  22. = means "This is stock code!"
  23. + means "Add me here please!"
  24. - means "Rip me out now!!!"
  25. % means "Change me to the line shown"
  26. $ means "Send Jiff Money!!!"
  27.  
  28.  
  29. ─═[Step 1]═─
  30.     Open up COM.C and add this little function at the end...  Feel free
  31. to use it in any modification you want, as long as Spotnick doesn't mind...
  32. Just mail me the mod (and say JiffBar is by me & Spotnick).  It should work
  33. just like a pl with 'wings' or like:
  34.  
  35.     jiffbar("Your name is: %s",thisuser.name);
  36.  
  37. /* Added for JIFF-04.MOD */
  38. void jiffbar(char *fmt, ...)
  39. {
  40.   va_list ap;
  41.   char s[512], s2[250];
  42.  
  43.   va_start(ap, fmt);
  44.   vsprintf(s, fmt, ap);
  45.   va_end(ap);
  46.  
  47.   if (okansi())
  48.   {
  49.     sprintf(s2,"7░░▒▒▓▓4  %s  7▓▓▒▒░░",stripcolors(s));
  50.     pl(s2);
  51.   } else
  52.     pl(s);
  53.   ansic(0);
  54. }
  55. /* Done adding for JIFF-04.MOD */
  56.  
  57. Save up COM.C
  58.  
  59. ─═[Step 2]═─
  60.     Open up GFILES.C...  This is where the rest of the mod goes...
  61.  
  62. ─═[Step 3]═─
  63.     Replace void list_sec and void list_gfiles with these:
  64.  
  65. void list_sec(int *map, int nmap)
  66. {
  67.   int i,abort;
  68.   char s[81];
  69.  
  70.   abort=0;
  71.   outchr(12);
  72.   pla("",&abort);
  73.   pla("",&abort);
  74.   jiffbar("G-Files Sections Available on %s",syscfg.systemname);
  75.   pla("",&abort);
  76.   if (okansi()) {
  77.     npr("7╒═══───∙·.\r\n");
  78.     for (i=0; (i<nmap) && (!abort) && (!hangup); i++) {
  79.       sprintf(s,"7│ 1%2d3.9 %s",i+1, gfilesec[map[i]].name);
  80.       pla(s,&abort);
  81.     }
  82.     npr("7└──────∙∙··\r\n");
  83.   } else {
  84.     for (i=0; (i<nmap) && (!abort) && (!hangup); i++) {
  85.       sprintf(s,"%2d. %s",i+1, gfilesec[map[i]].name);
  86.       pla(s,&abort);
  87.     }
  88.   }
  89. }
  90.  
  91. void list_gfiles(gfilerec *g, int nf)
  92. {
  93.   int i,abort;
  94.   char s[81];
  95.  
  96.   abort=0;
  97.   outchr(12);
  98.   pla("",&abort);
  99.   pla("",&abort);
  100.   jiffbar("G-Files In This Section");
  101.   pla("",&abort);
  102.   if (okansi()) {
  103.     npr("7╒═══───∙·.\r\n");
  104.     if ((nf==0) && (abort==0)) {
  105.       pl("7│ 6No G-Files in This Section");
  106.     }
  107.     for (i=0; (i<nf) && (!abort) && (!hangup); i++) {
  108.       sprintf(s,"7│ 1%2d3.9 %s",i+1, g[i].description);
  109.       pla(s,&abort);
  110.     }
  111.     if ((!abort) && (cs())) {
  112.       pl("7├───────∙∙··");
  113.       pl("7│  1A3.9 Add G-files");
  114.       pl("7│  1D3.9 Delete G-files");
  115.     }
  116.     if ((!abort) && (so())) {
  117.       pl("7│  1G3.9 G-file Editor");
  118.     }
  119.     pl("7└──────∙∙··");
  120.   } else {
  121.     if ((nf==0) && (abort==0)) {
  122.       nl();
  123.       pl(get_string(5));
  124.       nl();
  125.     }
  126.     for (i=0; (i<nf) && (!abort) && (!hangup); i++) {
  127.       sprintf(s,"%2d. %s",i+1, g[i].description);
  128.       pla(s,&abort);
  129.     }
  130.     nl();
  131.     if ((!abort) && (cs())) {
  132.       pl(get_string(50));
  133.       pl(get_string(51));
  134.       nl();
  135.     }
  136.   }
  137. }
  138.  
  139. ─═[Step 4]═─
  140.     Go to void gfile_sec and do this:
  141.  
  142. =      return;
  143. =    for (i=0; i<20; i++)
  144. =      odc[i]=0;
  145. =    for (i=1; i<=nf/10; i++)
  146. =      odc[i-1]=i+'0';
  147. +     } else if ((strcmp(ss,"G")==0) && (so())) {
  148. +    write_inst(INST_LOC_GFILEEDIT,0,INST_FLAGS_NONE);
  149. +    sysoplog(get_stringx(1,5));
  150. +    gfileedit();
  151. =     } else if ((strcmp(ss,"D")==0) && (cs())) {
  152. =    nl();
  153. =    prt(2,get_string(53));
  154.  
  155.  
  156. ─═[Step 5]═─
  157.    Done!  Make your BBS and e-mail me saying you used it, or need help!
  158. Rememeber, I am not responsable if this screws up something, but I will
  159. try to help you out...
  160.  
  161.             ─═[Jiff]═─
  162.             ─═[Sysop ■ The Cow Pasture]═─
  163.             ─═[Co-Sysop ■ The Pinnacle]═─
  164.  
  165. JIFF-01 .MOD  ■  Boxed DirEdit
  166. JIFF-02 .MOD  ■  Boxed SubEdit
  167. JIFF-03 .MOD  ■  Pending list at callout
  168. JIFF-04 .MOD  ■  New G-Files
  169.