home *** CD-ROM | disk | FTP | other *** search
- Nicolas Leblanc #2 @20302
- Sun Jun 18 23:39:45 1995
- ┌┬─── ── ─ ─ ── ───────────────────────────────────────────────────┬─ ∙∙
- ││ Alternative Worlds Presents │
- └┼─────────────────────────────────────────────────────────────────────┐
- ││ Mod Name » FMD-33a.MOD │∙
- ││ Difficulty » █▒▒▒▒▒▒▒▒▒▒ (1/10) │:
- ││ WWIV Version » 4.24 ││
- ││ Date Affected » 06/01/95 ││
- :│ Files Affected » XFER.C / XFEROVL2.C ││
- ∙│ Description » See Extended Description In File Tagging System ││
- └─────────────────────────────────────────────────────────────────────┼┐
- │ A French Mod Division Release - (C) 1995 FMD Software ││
- ∙∙ ─┴─────────────────────────────────────────────────── ── ─ ─ ── ───└┘
-
- ┌┬══════════════════┐
- ││ Long Description ││
- └══════════════════┴┘
-
- This modification will allow the WWIV v4.23's internal file tagging system
- to print extended descriptions in each and every situations, file tagging or
- not, it will show extended description in the file listing if the user set
- his extended description lines to another value than 0.
-
- This modification will work with and without file tagging, with the notag
- option in the file tagging menu and in the downloadable file listing. It won't
- work with the tag relist function to be faster.
-
- Revision A:
-
- - Updated for WWIV v4.24
- - Code lookup, there were errors in the doc
-
- ┌┬═══════┐
- ││ Tests ││
- └═══════┴┘
-
- This modification has been tested on a virgin WWIV v4.24 source using
- Borland C++ v4.5
-
- ──────────────────────────────────────────────────────────────────────────────
- Legend
- ╔═══╤══════════════════┐
- │ + │ Add This Line │
- │ - │ Delete This Line │
- │ * │ Modify This Line │
- │ = │ Existing Line │
- └═══╧══════════════════╝
- ───[Step 1]────────────────────────────────────────────────────────────────────
-
- Load XFER.C and do the following changes:
-
- = #define FRAME 7
- =
- = /* How far to indent extended descriptions */
- * #define INDENTION 27
- =
- = /* Max # of lines for extended description */
- = #define MAX_LINES 10
-
- ───[Step 2]────────────────────────────────────────────────────────────────────
-
- Go down to function print_extended and do the following changes:
-
-
- = ss=read_extended_description(fn);
- = if (ss) {
- = if (indent!=2)
- = ch=10;
- = while ((ss[cpos]) && (!(*abort)) && (numl<numlist)) {
- = if (ch==10) {
- * if ((indent==1) || (indent==3)) {
- + if (indent==1) {
- = for (i=0; i<INDENTION; i++) {
- * if ((i==2) || (i==15) || (i==21) || (i==26))
- = s[i]=(okansi() ? '║' : '|');
- = else
- = s[i]=32;
- = }
- + } else {
- + for (i=0; i<19; i++) {
- + if ((i==12) || (i==18))
- + s[i]=(okansi() ? '║' : '|');
- + else
- + s[i]=32;
- + }
- + }
- + if (tagging==1)
- = s[INDENTION]=0;
- + else
- + s[19]='\0';
- = ansic((thisuser.sysstatus & sysstatus_extra_color)
- = && (!(*abort)) ? FRAME : 0);
- = osan(s,abort,&next);
- = if ((thisuser.sysstatus & sysstatus_extra_color) && (!(*abort)))
- = ansic(1);
-
- ───[Step 3]────────────────────────────────────────────────────────────────────
-
- Go down to void printinfo and do the following changes:
-
-
- =void printinfo(uploadsrec *u, int *abort)
- ={
- = char s[85],s1[40],s2[81];
- = int i,next,fc;
- + char *ss;
- + int numlines;
- =
- = fc=thisuser.sysstatus & sysstatus_extra_color;
- = if (titled!=0)
- = printtitle(abort);
- = if ((tagging==0) && (!x_only))
- = return;
- = if ((tagging == 1) && !(thisuser.sysstatus & sysstatus_no_tag)
- = && (!x_only)) {
- + if ((u->mask & mask_extended) && (tagptr)) {
- + numlines=1;
- + ss=read_extended_description(u->filename);
- + for (i=0; i<strlen(ss); i++)
- + if (ss[i]==10)
- + ++numlines;
- + farfree(ss);
- + if ((lines_listed+numlines >= screenlinest - 2)) {
- + tag_files();
- + if (tagging==0)
- + return;
- + printtitle(abort);
- + }
- + }
- = if (!filelist) {
- = filelist=(tagrec *)malloca(50 * sizeof(tagrec));
- = tagptr=0;
- = }
- = if (filelist) {
- = filelist[tagptr].u=*u;
- = filelist[tagptr].directory= udir[curdir].subnum;
- = filelist[tagptr].dir_mask= directories[udir[curdir].subnum].mask;
- = tagptr++;
- = sprintf(s,"\r%d%2d%d%c",
- = (check_batch_queue(filelist[tagptr-1].u.filename)) ? 6 : 0,
- = tagptr,fc ? FRAME : 0, okansi() ? '║' : '|' );
- + if (tagging==1) // May seem not needed, but it is.
- = osan(s,abort,&next);
- = }
- = } else
- = if (!x_only)
- = outstr("\r");
- = if (fc)
- = ansic(1);
- = strncpy(s,u->filename,8);
- = s[8]=0;
- = osan(s,abort,&next);
- = strncpy(s,&((u->filename)[8]),4);
- = s[4]=0;
- = if (fc)
- = ansic(1);
- = osan(s,abort,&next);
- = ansic(fc ? FRAME : 0);
- = osan((okansi() ? "║" : "|"),abort,&next);
- =
- = ltoa(bytes_to_k(u->numbytes),s1,10);
- = strcat(s1,"k");
- =
- = if (!(directories[udir[curdir].subnum].mask & mask_cdrom)) {
- = strcpy(s2,directories[udir[curdir].subnum].path);
- = strcat(s2,u->filename);
- = if (!exist(s2))
- = strcpy(s1,get_string(741));
- = }
- =
- = for (i=0; i<5-(int)strlen(s1); i++)
- = s[i]=32;
- = s[i]=0;
- = strcat(s,s1);
- = if (fc)
- = ansic(2);
- = osan(s,abort,&next);
- =
- = if ((tagging == 1) && !(thisuser.sysstatus & sysstatus_no_tag)
- = && (!x_only)) {
- = ansic(fc ? FRAME : 0);
- = osan((okansi() ? "║" : "|"),abort,&next);
- = sprintf(s1,"%d",u->numdloads);
- =
- = for (i=0; i<4-(int)strlen(s1); i++)
- = s[i]=32;
- = s[i]=0;
- = strcat(s,s1);
- = if (fc)
- = ansic(2);
- = osan(s,abort,&next);
- = }
- =
- = ansic(fc ? FRAME : 0);
- = osan((okansi() ? "║" : "|"),abort,&next);
- = sprintf(s,"%d%s",
- = (u->mask & mask_extended) ? 1 : 2, u->description);
- = if ((tagging) && !(thisuser.sysstatus & sysstatus_no_tag)
- = && (!x_only)) {
- = plal(s,thisuser.screenchars-28,abort);
- + if ((!*abort) && (thisuser.num_extended) && (u->mask & mask_extended))
- + if (tagging==1)
- + print_extended(u->filename,abort,thisuser.num_extended,1);
- + else
- + print_extended(u->filename,abort,thisuser.num_extended,3);
- = } else {
- = plal(s,strlen(s),abort);
- = if ((!*abort) && (thisuser.num_extended) && (u->mask & mask_extended))
- * print_extended(u->filename,abort,thisuser.num_extended,3);
- = }
- = if (!(*abort)) {
- = ++num_listed;
-
- ───[Step 4]────────────────────────────────────────────────────────────────────
-
- Load XFEROVL2.C and do this small little change to function get_file_idz:
-
- = if (sysinfo.flags & OP_FLAGS_IDZ_DESC) {
- = ss=strtok(b,"\n");
- * sprintf(u->description,"%.59s",ss);
- = ss=strtok(NULL,"");
- = } else {
- = ss=b;
- = }
-
- ───[Step 5]────────────────────────────────────────────────────────────────────
-
- That's it, just compile back your system and enjoy. You may need to do
- a global //READIDZ of your files if you want the description to "fit" on
- the screen, since stock WWIV, for an unknown reason, tab 3 spaces the
- first line of description. Don't forget to ask your users to set their
- extended lines. If you wish to have everyone to have full extended
- descriptions, you might add the line:
-
- = if (actsl<=syscfg.newusersl)
- = i1=0;
- + thisuser.extended=10;
- = if (i1 && live_user) {
- = nl();
-
- In LILO.C, or in NEWUSER.C if you want only your new users to have it:
-
- = nl();
- = }
- + thisuser.extended=10;
- = prt(5,get_string(569));
- = if (yn()) {
- = nl();
- = pl(get_string(570));
-
- And that will do it.
-
- French Proverb: L'intention vaut le fait.
-
- For comments, bug report and suggestion, e-mail at the following address:
-
- Nicolas LeBlanc 2@20302.WWIVnet (aka Spotnick)
- -> spotnick@gamemaster.qc.ca
- Martin Bourdages 242@20306 / 3@20302.WWIVnet (aka Dark Shadow)
- -> martin.bourdages@radio.magicnet.com
-
- => French Mod Division Support Sub <=
- SubType: FMD
- Host: @20302 (WWIVnet)
- Scan sublist for other networks
-
- Read PRODUCTS.FMD for the full list of our support systems.
-
- ───[EOF]──────────────────────────────────────────────────────────────────────
-