home *** CD-ROM | disk | FTP | other *** search
/ The Arcade BBS / arcadebbs.zip / arcadebbs / bbstools / WWIV Mods / WWIVMOD.ZIP / DREAM004.MOD < prev    next >
Encoding:
Text File  |  1993-11-09  |  8.4 KB  |  291 lines

  1. Fix For Dream004  REQUIRED!!!  (Left out a function)
  2. ``Unca Scrooge`` WWIVnet #188 AT 2077
  3. Wed Mar 10 12:36:13 1993
  4. ┌────────────────────────────────────────────────────────────────────────────┐
  5. │ Mod Name:  Dream04A.mod           Date: 03/07/93                           │
  6. │ Difficulty:  █▒▒▒▒▒▒▒▒▒▒          Mod Authors: Unca Scrooge                │
  7. │ WWIV Version:  4.22                            1@3759 WWIVnet              │
  8. │ Files Affected:  Xfer.C                                                    │
  9. │ Description: New FileList (Looks Good!)                                    │
  10. │                                                                            │
  11. └────────────────────────────────────────────────────────────────────────────┘
  12.  
  13. Addition   :  DUH!!!!   I used Tolkien's Enhance.C in this and forgot
  14.               to include the function.  JEEZ!  Thanx to all that pointed it out
  15.               me!!!  Nothing has changed, and the function is added at the
  16.               end.  Sorry about that!!! And HOPEFULLY I didn't miss anymore
  17.               functions!!!  (Gad!)
  18.  
  19.  
  20. Long Descr :  I've been looking for a mod like this for a LOOOONG time!!!
  21.               Couldn't find one anywhere, so I finally did one...  welp, it
  22.               puts a box around the FileName and FileSize, adds new dir header
  23.               and a Palm Tree (optional, I like 'em) :)  I use Extended
  24.               Colors... (b-p).. if you don't have these.. I commented where
  25.               they are... just change 'em!  (Hopefully I commented them
  26.               all, if not you'll know!  8^]  (YOu really SHOULD add them, tho
  27.               I can't remember the name of the mod or who wrote the one I
  28.               added....  (Sorry whoever!!)  (I think it was HJxxxx.mod ??)
  29.  
  30. Disclamimer:  I wrote it, but YOU put it in!  Works here at DreamNET.  If ya
  31.               need help lemme know!
  32.  
  33. Da Mod     :
  34.  
  35.  
  36. Step 1     :  Load up Xfer.C and search for...
  37.               void print_extended(....  and replace it with this one...
  38.  
  39.  
  40. void print_extended(char *fn, int *abort, unsigned char numlist, int indent)
  41. {
  42.   char *ss;
  43.   int next=0;
  44.   unsigned char numl=0;
  45.   int cpos=0;
  46.   char ch,s[81];
  47.   int i;
  48.  
  49.   ss=read_extended_description(fn);
  50.   if (ss) {
  51.     ch=10;
  52.     while ((ss[cpos]) && (!(*abort)) && (numl<numlist)) {
  53.       if ((ch==10) && (indent)) {
  54.     if (okansi())
  55.       sprintf(s,"3║%s3║1       3║5",charstr(12,' '));
  56.      else {
  57.       for (i=0; i<INDENTION; i++)
  58.         s[i]=32;
  59.       s[INDENTION]=0;
  60.     }
  61.     osan(s,abort,&next);
  62.     if ((thisuser.sysstatus & sysstatus_funky_colors) && (!(*abort)))
  63.       ansic(2);
  64.       }
  65.       outchr(ch=ss[cpos++]);
  66.       checka(abort,&next);
  67.       if (ch==10)
  68.     ++numl;
  69.       else
  70.     if ((ch!=13) && (wherex()>=78)) {
  71.       osan("\r\n",abort,&next);
  72.       ch=10;
  73.     }
  74.     }
  75.     if (wherex())
  76.       nl();
  77.   }
  78.   farfree(ss);
  79. }
  80.  
  81. Step 2     :  Replace void printinfo(....  with this one.
  82.  
  83.  
  84. void printinfo(uploadsrec *u, int *abort)
  85. {
  86.   char s[85],s1[40],s2[81];
  87.   int i,i1,i2,next,fc;
  88.  
  89.   fc=thisuser.sysstatus & sysstatus_funky_colors;
  90.  
  91.   if (fc)
  92.     ansic(1);
  93.  osan("3║1",abort,&next);
  94.   strncpy(s,u->filename,8);
  95.   s[8]=0;
  96.   osan(s,abort,&next);
  97.   strncpy(s,&((u->filename)[8]),4);
  98.   s[4]=0;
  99.   if (fc)
  100.     ansic(2);
  101.   osan(s,abort,&next);
  102.   if (fc)
  103.     ansic(0);
  104.   osan("3║ 1",abort,&next);
  105.   ltoa((((u->numbytes)+1023)/1024),s1,10);
  106.   ansic(7);
  107.     strcat(s1,"k");
  108.  
  109. #ifdef CHECK_FOR_EXISTANCE
  110.   strcpy(s2,directories[udir[curdir].subnum].path);
  111.   strcat(s2,u->filename);
  112.   if (!exist(s2))
  113.    strcpy(s1,get_string(741));
  114. #endif
  115.  
  116.   for (i=0; i<5-strlen(s1); i++)
  117.     s[i]=32;
  118.   s[i]=0;
  119.   strcat(s,s1);
  120.   if (fc)
  121.     ansic(3);
  122.   osan(s,abort,&next);
  123.  
  124.   if (fc)
  125.     ansic(0);
  126.   osan("3 ║1",abort,&next);
  127.    if (fc)
  128.     ansic(5);
  129.    pla(u->description,abort);
  130.    if ((!*abort) && (thisuser.num_extended) && (u->mask & mask_extended))
  131.     print_extended(u->filename,abort,thisuser.num_extended,1);
  132.   if (!(*abort))
  133.     ++num_listed;
  134. }
  135.  
  136. Step 3     :  Replace void printtitle(...  with this
  137.  
  138.  
  139. void printtitle(int *abort)
  140. {
  141.   char s[81],s1[20];
  142.   int i,i1;
  143.  
  144. /*  pl("5   ▀■▄■▀");    ***** Uncomment this if you want the Palm Trees
  145.   pl("5   ■▀g█5▀■");        Heart-G is Brown  *****
  146.   pl("7▄█▄█▄g█   7DreamNET"); */
  147.   sprintf(s,"b%s - p#7%sp, 7%d b%s.",directories[udir[curdir].subnum].name,
  148.                   udir[curdir].keys,numf, get_string(742));
  149.  
  150.    /**** Above..  Heart-b is Dark Blue, Heart-p is White ****/
  151.  
  152.    i=strlen(s);
  153.    if (thisuser.sysstatus & sysstatus_funky_colors)
  154.     ansic(3);
  155.   pla(s,abort);
  156.   for (i1=0; i1<i; i1++)
  157.      s[i1]='═';
  158.   s[i]=0;
  159.    if (thisuser.sysstatus & sysstatus_funky_colors)
  160.     ansic(3);
  161.   pla(s,abort);
  162.   pla("",abort);
  163. }
  164.  
  165.  
  166. Step 4     :  Replace void listfiles(... with this.
  167.  
  168. void listfiles(void)
  169. {
  170.   char s[81];
  171.   int i,abort,next=0;
  172.   uploadsrec u;
  173.  
  174.   dliscan();
  175.   file_mask(s);
  176.   abort=0;
  177.   num_listed=0;
  178.   printtitle(&abort);
  179.   pl("7 FileName     Size     Description");
  180.   pl("3╔════════════╦═══════╗");
  181.   for (i=1; (i<=numf) && (!abort) && (!hangup); i++) {
  182.     SETREC(i);
  183.     read(dlf,(void *)&u,sizeof(uploadsrec));
  184.     if (compare(s,u.filename))
  185.       printinfo(&u,&abort);
  186.     else if (!empty())
  187.       checka(&abort,&next);
  188.   }
  189.   closedl();
  190.   pl("3╚════════════╩═══════╝");
  191.   if (!abort) {
  192.     pl("5   ▀■▄■▀");     ****  Uncomment this if you want the Palm Tree
  193.     pl("5   ■▀g█5▀■");         Heart-g is Brown  ****
  194.     pl("7▄█▄█▄g█"); */
  195.     sprintf(s,"7≡b≡≡m%sp: m%db≡≡7≡",get_string(744), num_listed);
  196.                      /* Above...  Heart-b is Dark Blue, Heart-m is Dark Red,
  197.                         Heart-p is White */
  198.     pl(s);
  199.   }
  200. }
  201.  
  202. That's it!
  203.  
  204.  
  205. Below is what is looks like......
  206.  
  207. 5   ▀■▄■▀
  208. 5   ■▀g█5▀■
  209. 7▄█▄█▄g█   7DreamNET
  210. bMiscellaneous            FREE DOWNLOADS! - p#b1p, b11 files.
  211. b════════════════════════════════════════════════════════════════════
  212.  
  213. 7 FileName     Size     Description
  214. 3╔════════════╦═══════╗
  215. 3║1AD      .ANS3║7    3k 3║1ANSI AD for DreamNET   Grab it and pass it around
  216. 3║1AD      .ASC3║7    2k 3║1ASCII AD for DreamNET  Grab it and pass it around
  217. 3║1ADULT   .TXT3║7    5k 3║1Adult Access registration form
  218. 3║1ALLFILES.TXT3║7   19k 3║1LIST OF ALL FILES AVAILABLE FOR DL ON DREAMNET !
  219. 3║1BBS0112 .ZIP3║7   13k 3║1Indy BBS List as of 1/12/93
  220. 3║1BBSPEAK .TXT3║7    2k 3║1Explanation of BBS symbols  ( :), TTFN, etc..)
  221. 3║1CONTEST .ARJ3║7    3k 3║1Vote for the BEST BBS in the country.
  222. 3║1DISK-ORD.FRM3║7    3k 3║1Order any program available on DreamNET by mail!
  223. 3║1DONATE  .REG3║7    2k 3║1Private Membership registration form
  224. 3║1TW-DOX  .ZIP3║7   26k 3║1TW 2002 Dox
  225. 3║1USER    .ZIP3║7   28k 3║1WWIV 4.22 User Dox....
  226. 3╚════════════╩═══════╝
  227. 5   ▀■▄■▀
  228. 5   ■▀g█5▀■
  229. 7▄█▄█▄g█
  230. 7≡b≡≡mFiles listedp: m11b≡≡7≡
  231.  
  232. From Tolkien's Enhance.C  (Great additions!!!!)  I recommend installing it!
  233.  
  234. Put this somewhere (end of Xfer.C !?) and add
  235.  
  236. unsigned char *charstr(int len, int repeatchar)  to FCNS.H or MAKE FCNS.
  237.  
  238.  
  239. /*═════════════════════════════════════════════════════════════════════════*/
  240.  
  241. /*
  242.  * This function is used to create long strings composed of an identical
  243.  * character, for boxes or underlining or whatever. Saves repetitive and
  244.  * time-consuming loops. The string returned will be len characters long,
  245.  * each character being a repeatchar character.
  246.  *
  247.  *
  248. unsigned char *charstr(int len, int repeatchar)
  249. {
  250.   static char s[81],c;
  251.   int i;
  252.  
  253.   if (len>80)
  254.     len=80;
  255.   if (len<0)
  256.     len=0;
  257.  
  258.   if ((repeatchar==0) || (len==0))
  259.     return("");
  260.  
  261.   c=repeatchar;
  262.   for (i=0;i<len;i++)
  263.     s[i]=c;
  264.   s[len]=0;
  265.   return(s);
  266. }
  267.  *
  268.  * Example(s):
  269.  *
  270.  * The following line would be very DGROUP wasteful:
  271.  *
  272.  * pl("--------------------------------------------------------------");
  273.  *
  274.  * The next line would be far more efficient and easier to type, while looking
  275.  *   exactly the same:
  276.  *
  277.  * pl(charstr(62,'-'));
  278.  *
  279.  */
  280.  
  281. /*═════════════════════════════════════════════════════════════════════════*/
  282.  
  283.  
  284. Oh Yeah    :  The block head and foot (╔════════════╦═══════╗, etc.) won't
  285.               be on it when you do an //UPLOAD or a Scan/Search... working
  286.               on those now...  will release a revision as soon as it's
  287.               finished.... but as it is now, it's nice!
  288.  
  289.               Lemme know if you use this!  I'd like to know...
  290.  
  291.