home *** CD-ROM | disk | FTP | other *** search
/ The Arcade BBS / arcadebbs.zip / arcadebbs / bbstools / MODS / FMD-33A.ZIP / FMD-33A.MOD < prev   
Encoding:
Text File  |  1995-06-22  |  8.7 KB  |  271 lines

  1. Nicolas Leblanc #2 @20302
  2. Sun Jun 18 23:39:45 1995
  3.    ┌┬─── ──  ─   ─  ── ───────────────────────────────────────────────────┬─ ∙∙
  4.    ││                    Alternative Worlds Presents                      │
  5.    └┼─────────────────────────────────────────────────────────────────────┐
  6.    ││ Mod Name       » FMD-33a.MOD                                        │∙
  7.    ││ Difficulty     » █▒▒▒▒▒▒▒▒▒▒ (1/10)                                 │:
  8.    ││ WWIV Version   » 4.24                                               ││
  9.    ││ Date Affected  » 06/01/95                                           ││
  10.    :│ Files Affected » XFER.C / XFEROVL2.C                                ││
  11.    ∙│ Description    » See Extended Description In File Tagging System    ││
  12.     └─────────────────────────────────────────────────────────────────────┼┐
  13.     │       A French Mod Division Release - (C) 1995 FMD Software         ││
  14. ∙∙ ─┴─────────────────────────────────────────────────── ──  ─   ─  ── ───└┘
  15.  
  16.  ┌┬══════════════════┐
  17.  ││ Long Description ││
  18.   └══════════════════┴┘
  19.  
  20.   This modification will allow the WWIV v4.23's internal file tagging system
  21. to print extended descriptions in each and every situations, file tagging or
  22. not, it will show extended description in the file listing if the user set
  23. his extended description lines to another value than 0.
  24.  
  25.   This modification will work with and without file tagging, with the notag
  26. option in the file tagging menu and in the downloadable file listing. It won't
  27. work with the tag relist function to be faster.
  28.  
  29. Revision A:
  30.  
  31.   - Updated for WWIV v4.24
  32.   - Code lookup, there were errors in the doc
  33.  
  34.  ┌┬═══════┐
  35.  ││ Tests ││
  36.   └═══════┴┘
  37.  
  38.   This modification has been tested on a virgin WWIV v4.24 source using
  39.   Borland C++ v4.5
  40.  
  41. ──────────────────────────────────────────────────────────────────────────────
  42.                                    Legend
  43.                           ╔═══╤══════════════════┐
  44.                           │ + │ Add This Line    │
  45.                           │ - │ Delete This Line │
  46.                           │ * │ Modify This Line │
  47.                           │ = │ Existing Line    │
  48.                           └═══╧══════════════════╝
  49. ───[Step 1]────────────────────────────────────────────────────────────────────
  50.  
  51. Load XFER.C and do the following changes:
  52.  
  53. = #define FRAME 7
  54. =
  55. = /* How far to indent extended descriptions */
  56. * #define INDENTION 27
  57. =
  58. = /* Max # of lines for extended description */
  59. = #define MAX_LINES 10
  60.  
  61. ───[Step 2]────────────────────────────────────────────────────────────────────
  62.  
  63. Go down to function print_extended and do the following changes:
  64.  
  65.  
  66. =  ss=read_extended_description(fn);
  67. =  if (ss) {
  68. =    if (indent!=2)
  69. =      ch=10;
  70. =    while ((ss[cpos]) && (!(*abort)) && (numl<numlist)) {
  71. =      if (ch==10) {
  72. *        if ((indent==1) || (indent==3)) {
  73. +          if (indent==1) {
  74. =            for (i=0; i<INDENTION; i++) {
  75. *              if ((i==2) || (i==15) || (i==21) || (i==26))
  76. =                s[i]=(okansi() ? '║' : '|');
  77. =              else
  78. =                s[i]=32;
  79. =            }
  80. +          } else {
  81. +            for (i=0; i<19; i++) {
  82. +              if ((i==12) || (i==18))
  83. +                s[i]=(okansi() ? '║' : '|');
  84. +              else
  85. +                s[i]=32;
  86. +            }
  87. +          }
  88. +          if (tagging==1)
  89. =            s[INDENTION]=0;
  90. +          else
  91. +            s[19]='\0';
  92. =          ansic((thisuser.sysstatus & sysstatus_extra_color)
  93. =            && (!(*abort)) ? FRAME : 0);
  94. =          osan(s,abort,&next);
  95. =          if ((thisuser.sysstatus & sysstatus_extra_color) && (!(*abort)))
  96. =            ansic(1);
  97.  
  98. ───[Step 3]────────────────────────────────────────────────────────────────────
  99.  
  100. Go down to void printinfo and do the following changes:
  101.  
  102.  
  103. =void printinfo(uploadsrec *u, int *abort)
  104. ={
  105. =  char s[85],s1[40],s2[81];
  106. =  int i,next,fc;
  107. +  char *ss;
  108. +  int numlines;
  109. =
  110. =  fc=thisuser.sysstatus & sysstatus_extra_color;
  111. =  if (titled!=0)
  112. =    printtitle(abort);
  113. =  if ((tagging==0) && (!x_only))
  114. =    return;
  115. =  if ((tagging == 1) && !(thisuser.sysstatus & sysstatus_no_tag)
  116. =    && (!x_only)) {
  117. +    if ((u->mask & mask_extended) && (tagptr)) {
  118. +      numlines=1;
  119. +      ss=read_extended_description(u->filename);
  120. +      for (i=0; i<strlen(ss); i++)
  121. +        if (ss[i]==10)
  122. +          ++numlines;
  123. +      farfree(ss);
  124. +      if ((lines_listed+numlines >= screenlinest - 2)) {
  125. +        tag_files();
  126. +        if (tagging==0)
  127. +           return;
  128. +        printtitle(abort);
  129. +      }
  130. +    }
  131. =    if (!filelist) {
  132. =      filelist=(tagrec *)malloca(50 * sizeof(tagrec));
  133. =      tagptr=0;
  134. =    }
  135. =    if (filelist) {
  136. =    filelist[tagptr].u=*u;
  137. =    filelist[tagptr].directory= udir[curdir].subnum;
  138. =    filelist[tagptr].dir_mask=  directories[udir[curdir].subnum].mask;
  139. =    tagptr++;
  140. =    sprintf(s,"\r%d%2d%d%c",
  141. =      (check_batch_queue(filelist[tagptr-1].u.filename)) ? 6 : 0,
  142. =      tagptr,fc ? FRAME : 0, okansi() ? '║' : '|' );
  143. +    if (tagging==1) // May seem not needed, but it is.
  144. =      osan(s,abort,&next);
  145. =    }
  146. =  } else
  147. =    if (!x_only)
  148. =      outstr("\r");
  149. =  if (fc)
  150. =    ansic(1);
  151. =  strncpy(s,u->filename,8);
  152. =  s[8]=0;
  153. =  osan(s,abort,&next);
  154. =  strncpy(s,&((u->filename)[8]),4);
  155. =  s[4]=0;
  156. =  if (fc)
  157. =    ansic(1);
  158. =  osan(s,abort,&next);
  159. =  ansic(fc ? FRAME : 0);
  160. =  osan((okansi() ? "║" : "|"),abort,&next);
  161. =
  162. =  ltoa(bytes_to_k(u->numbytes),s1,10);
  163. =  strcat(s1,"k");
  164. =
  165. =  if (!(directories[udir[curdir].subnum].mask & mask_cdrom)) {
  166. =    strcpy(s2,directories[udir[curdir].subnum].path);
  167. =    strcat(s2,u->filename);
  168. =    if (!exist(s2))
  169. =      strcpy(s1,get_string(741));
  170. =  }
  171. =
  172. =  for (i=0; i<5-(int)strlen(s1); i++)
  173. =    s[i]=32;
  174. =  s[i]=0;
  175. =  strcat(s,s1);
  176. =  if (fc)
  177. =    ansic(2);
  178. =  osan(s,abort,&next);
  179. =
  180. =  if ((tagging == 1) && !(thisuser.sysstatus & sysstatus_no_tag)
  181. =    && (!x_only)) {
  182. =    ansic(fc ? FRAME : 0);
  183. =    osan((okansi() ? "║" : "|"),abort,&next);
  184. =    sprintf(s1,"%d",u->numdloads);
  185. =
  186. =    for (i=0; i<4-(int)strlen(s1); i++)
  187. =      s[i]=32;
  188. =    s[i]=0;
  189. =    strcat(s,s1);
  190. =    if (fc)
  191. =      ansic(2);
  192. =    osan(s,abort,&next);
  193. =  }
  194. =
  195. =  ansic(fc ? FRAME : 0);
  196. =  osan((okansi() ? "║" : "|"),abort,&next);
  197. =  sprintf(s,"%d%s",
  198. =    (u->mask & mask_extended) ? 1 : 2, u->description);
  199. =  if ((tagging) && !(thisuser.sysstatus & sysstatus_no_tag)
  200. =    && (!x_only)) {
  201. =    plal(s,thisuser.screenchars-28,abort);
  202. +    if ((!*abort) && (thisuser.num_extended) && (u->mask & mask_extended))
  203. +      if (tagging==1)
  204. +        print_extended(u->filename,abort,thisuser.num_extended,1);
  205. +      else
  206. +        print_extended(u->filename,abort,thisuser.num_extended,3);
  207. =  } else {
  208. =    plal(s,strlen(s),abort);
  209. =    if ((!*abort) && (thisuser.num_extended) && (u->mask & mask_extended))
  210. *      print_extended(u->filename,abort,thisuser.num_extended,3);
  211. =  }
  212. =  if (!(*abort)) {
  213. =    ++num_listed;
  214.  
  215. ───[Step 4]────────────────────────────────────────────────────────────────────
  216.  
  217. Load XFEROVL2.C and do this small little change to function get_file_idz:
  218.  
  219. =    if (sysinfo.flags & OP_FLAGS_IDZ_DESC) {
  220. =      ss=strtok(b,"\n");
  221. *      sprintf(u->description,"%.59s",ss);
  222. =      ss=strtok(NULL,"");
  223. =    } else {
  224. =      ss=b;
  225. =    }
  226.  
  227. ───[Step 5]────────────────────────────────────────────────────────────────────
  228.  
  229. That's it, just compile back your system and enjoy. You may need to do
  230. a global //READIDZ of your files if you want the description to "fit" on
  231. the screen, since stock WWIV, for an unknown reason, tab 3 spaces the
  232. first line of description. Don't forget to ask your users to set their
  233. extended lines. If you wish to have everyone to have full extended
  234. descriptions, you might add the line:
  235.  
  236. =  if (actsl<=syscfg.newusersl)
  237. =    i1=0;
  238. +  thisuser.extended=10;
  239. =  if (i1 && live_user) {
  240. =    nl();
  241.  
  242. In LILO.C, or in NEWUSER.C if you want only your new users to have it:
  243.  
  244. =      nl();
  245. =    }
  246. +    thisuser.extended=10;
  247. =    prt(5,get_string(569));
  248. =    if (yn()) {
  249. =      nl();
  250. =      pl(get_string(570));
  251.  
  252. And that will do it.
  253.  
  254. French Proverb: L'intention vaut le fait.
  255.  
  256. For comments, bug report and suggestion, e-mail at the following address:
  257.  
  258. Nicolas LeBlanc  2@20302.WWIVnet (aka Spotnick)
  259.                  -> spotnick@gamemaster.qc.ca
  260. Martin Bourdages 242@20306 / 3@20302.WWIVnet (aka Dark Shadow)
  261.                  -> martin.bourdages@radio.magicnet.com
  262.  
  263.                  =>   French Mod Division Support Sub   <=
  264.                                 SubType: FMD
  265.                            Host: @20302 (WWIVnet)
  266.                       Scan sublist for other networks
  267.  
  268.         Read PRODUCTS.FMD for the full list of our support systems.
  269.  
  270. ───[EOF]──────────────────────────────────────────────────────────────────────
  271.