home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / WWIVMODS / MODSUNKN.ZIP / COLRFIL2.MOD < prev    next >
Text File  |  1992-12-01  |  5KB  |  163 lines

  1. Grim Reaper #1 @3511
  2. 04/15/90 at 1:39 pm <EST>
  3. [Msg Status] Reply Wanted.
  4. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  5. /*****************************************************************************/
  6.  
  7.                    Multi COLOR File Type Listings (ADD ONS)
  8.                                Version 2.0
  9.  
  10.                    By: The Grim Reaper - The Reaper's Domain
  11.                                          (305) 983-8533
  12.                                          300/1200/2400 Baud
  13.                                          WWIVnet @3511
  14.  
  15.    Ok...  What this mod does is add a TCS style header for MCFL Mod.
  16.    It makes the MCFL.MOD look better!!  It also lines up the extended
  17.    description to line up with the MCFL Mod.
  18.  
  19.    * NOTE:  To put this mod in you must know how to block read!  Unless you
  20.    want to type it all in letter by letter!   This also give the directory's
  21.    Name in the Nscan, Search, and Find Desc.
  22.  
  23. /*****************************************************************************/
  24.  
  25. [ Step #1 ]
  26. Load up xfer.c and delete the void printtitle(int *abort) and replace it
  27. with this one!
  28.  
  29. void printtitle(int *abort)
  30. {
  31.   char s[81],s1[20],s2[101];
  32.   int i,i1,fc;
  33.  
  34.   fc=thisuser.sysstatus & sysstatus_funky_colors;
  35.  
  36.   if (fc) {
  37.   nl();
  38.   nl();
  39.   print("7Area:1 %s",directories[udir[curdir].subnum].name,"");
  40.   nl();
  41.   pla2("3┌───────────┬───────┬─────────────────────────────────────┬───────────────────┐",abort); nl();
  42.   sprintf(s2,"3│ 1Filename3  │1  Size 3│ 1Description  3                       │ 1Total Files:2 %3d 3 │",numf);
  43.   pla2(s2,abort); nl();
  44.   pla2("3└───────────┼───────┼─────────────────────────────────────┴───────────────────┘",abort); nl();
  45.   }
  46.  
  47.   if (!fc) {
  48.   pla("",abort);
  49.   pla("",abort);
  50.   sprintf(s,"%s - #%s, %d files.",directories[udir[curdir].subnum].name,
  51.                                   udir[curdir].keys,numf);
  52.   i=strlen(s);
  53.   pla(s,abort);
  54.   if (!okansi()) {
  55.   for (i1=0; i1<i; i1++)
  56.     s[i1]='=';
  57.   }
  58.   if (okansi()) {
  59.   for (i1=0; i1<i; i1++)
  60.     s[i1]='═';
  61.   }
  62.   s[i]=0;
  63.   pla(s,abort);
  64.   pla("",abort);
  65.  }
  66. }
  67.  
  68. [ Step #2 ]
  69. Find the void listfiles() and delete it!  Then replace it with this one also!
  70.  
  71. void listfiles()
  72. {
  73.   char s[81];
  74.   int i,abort;
  75.   uploadsrec u;
  76.  
  77.   dliscan();
  78.   file_mask(s);
  79.   abort=0;
  80.   num_listed=0;
  81.   printtitle(&abort);
  82.   for (i=1; (i<=numf) && (!abort) && (!hangup); i++) {
  83.     SETREC(i);
  84.     read(dlf,(void *)&u,sizeof(uploadsrec));
  85.     if (compare(s,u.filename))
  86.       printinfo(&u,&abort);
  87.   }
  88.   closedl();
  89.   if (!abort) {
  90.    if (thisuser.sysstatus & sysstatus_funky_colors) {
  91.      pl("3────────────┴───────┴──────────────────────────────────────────────────────────");
  92.       nl();
  93.       sprintf(s,"3[ 6Files listed:1 %d",num_listed);
  94.       outstr(s);
  95.       pl(" 3]");
  96.    } else {
  97.       nl();
  98.       sprintf(s,"[ Files listed: %d",num_listed);
  99.       outstr(s);
  100.       pl(" ]");
  101.    }
  102.   nl();
  103.  }
  104. }
  105.  
  106. [ Step #3 ]
  107. Go to the top of xfer.c and find
  108.  
  109. #define INDENTION 24
  110. and change it to
  111. #difine INDENTION 20
  112.  
  113. [ Step #4 ]
  114. OK... Last Step!!  Go down till you find "print_extended(blah blah!)
  115. and delete that void and replace it with this one!
  116.  
  117. void print_extended(char *fn, int *abort, unsigned char numlist, int indent)
  118. {
  119.   char *ss;
  120.   int next=0;
  121.   unsigned char numl=0;
  122.   int cpos=0;
  123.   char ch,s[81];
  124.   int i;
  125.  
  126.   ss=read_extended_description(fn);
  127.   if (ss) {
  128.     ch=10;
  129.     while ((ss[cpos]) && (!(*abort)) && (numl<numlist)) {
  130.       if ((ch==10) && (indent)) {
  131.     if ((thisuser.sysstatus & sysstatus_funky_colors) && (okansi()))
  132.       sprintf(s,"\x1b[%dC3│2",INDENTION);
  133.         else {
  134.           for (i=0; i<INDENTION; i++)
  135.             s[i]=32;
  136.           s[INDENTION]=0;
  137.     }
  138.         osan(s,abort,&next);
  139.       }
  140.       outchr(ch=ss[cpos++]);
  141.       checka(abort,&next);
  142.       if (ch==10)
  143.         ++numl;
  144.       else
  145.         if ((ch!=13) && (wherex()>=78)) {
  146.           osan("\r\n",abort,&next);
  147.           ch=10;
  148.         }
  149.     }
  150.     if (wherex())
  151.       nl();
  152.   }
  153.   farfree(ss);
  154. }
  155.  
  156. /****************************************************************************/
  157.  
  158. OK... Thats all...  Just Press F2, to save and press F9, to compile!!
  159. If you have any problems or ideas please email me 1@3511,  If you like
  160. this mod call my BBS or email about it!!
  161.  
  162. /***************************************************************************/
  163.