home *** CD-ROM | disk | FTP | other *** search
/ The Arcade BBS / arcadebbs.zip / arcadebbs / bbstools / MODS / TRY2UL40.ZIP / TRYTOUL.MOD < prev   
Encoding:
Text File  |  1994-12-14  |  5.7 KB  |  214 lines

  1. (I know....  You have been wondering just what to ask Santa for this year...
  2. ...well, wonder no longer!  Here is the latest update of the greatest upload
  3. modification ever written for WWIV.....)
  4.  
  5.       Live, from Asylum.... It's the
  6.  
  7.             ╔═════════════════════════════╗
  8.             ║ Try to Upload, Version 1.1a ║
  9.              ╔══╝      December 8th 1994      ╚══╗
  10.              ║ aka The Blind Upload Modification ║
  11.              ╚═══════════════════════════════════╝
  12.  
  13. Have you ever had someone upload a file, only to have them spell the filename
  14. wrong, and watch as WWIV deletes the upload?  Wayne addresses this in the
  15. source code, but hasn't written anything to do anything about it yet.
  16.  
  17.                6ASYLUM to the RESCUE!0
  18.  
  19. This modification allows users to upload files without going through the
  20. usual process of pressing U, putting in description etc...  Best thing is it
  21. salvages those filenames the uploader might have spelled wrong.
  22.  
  23.  
  24.  
  25.  
  26. UPDATING?
  27.  
  28.   IF (and ONLY if) you already have this modification installed, then do this:
  29.  
  30.   1) Replace your old TRYTOUL.C with the new stuff.
  31.   2) Update FCNS.H by typing MAKE FCNS or use the prototypes provided below.
  32.   3) Make sure __423__ is defined if you use  WWIV 4.23 at top of TRYTOUL.C
  33.   3) You are Done!!!!
  34.  
  35.  
  36. What is new?
  37.   Will print a screen 'TRY2UL.MSG | TRY2UL.ANS' if it exists in your gfiles/
  38.   language dir.
  39.   Fixed the 1.1 (11/13) which didn't take the user into the describe screen.
  40.   Try to upload will no longer kill files that it thinks should not be
  41.   uploaded.  It will move them into a directory called TRY2UL off of your
  42.   dload dir, as defined in INIT.EXE
  43.  
  44.  
  45.  
  46. STEP A) COMMON
  47.  
  48.   A few functions are used from common, therefore, you need it installed.
  49. Current version is 2.2.  Get it.  Use it.  Know it.  Be the Mod, Danny.
  50. Be the mod.
  51.  
  52.  
  53. Step B) Put trytoul.c in your source directory.
  54.  
  55.  
  56. Step C) In TRYTOUL.C, make sure the correct #define __423__ or #define
  57.     __424__ is uncommented.  You will get errors (more than likely)
  58.     if you try compiling in the wrong version.
  59.  
  60.  
  61. Step 1) XFER.C - Remove function upload   (XFEROVL2.C in 4.24)
  62.   Take it out. It is replaced in trytoul.c. OrWif you want, you can read in
  63.   the new one.  (Just take the old one out Danny.  Just do it.)
  64.  
  65.  
  66. Step 2) BATCH.C - Remove function try_to_ul
  67.   (Mega) Ditto on step 1... These are the only 2 functions completely replaced
  68.   in trytoul.c
  69.  
  70.  
  71. STEP 3) BATCH.C - In function batchdl
  72.   You know how when you press 'B' with no files in your batch queue, it kicks
  73.   you out?  Well, this obviously won't work for what we want to do.
  74.  
  75.   Comment out the lines that I have commented out.
  76.  
  77.  
  78. void batchdl(int mode)
  79. {
  80.   int i,done,had,otag;
  81.   char s[81],ch;
  82.  
  83.   done=0;
  84. // Commented out to allow for uploads without being in batch
  85. //  if (numbatch==0) {
  86. //    nl();
  87. //    pl(get_string(871));
  88. //    nl();
  89. //    return;
  90. //  }
  91.   otag=tagging;
  92.  
  93. .... Same function, down some
  94.  
  95.       done=1;
  96.       pl(get_string(875));
  97.     }
  98.     done=1;
  99.     break;
  100.  
  101.  
  102.       case 'U':
  103. // Commented out to allow for uploads without being in batch
  104. //        if (numbatchdl==numbatch)
  105. //        {
  106. //          nl();
  107. //          pl(get_string(876));
  108. //          nl();
  109. //          break;
  110. //        }
  111.     nl();
  112.     prt(5,get_string(877));
  113.     had=yn();
  114.     nl();
  115.  
  116.  
  117.  
  118.  
  119. STEP 4) XFER.C - function get_file_idz  (XFEROVL2.C for 424)
  120.  
  121.   This step is optional, if you have OPT_IDZ_AS_DESCRIPTION defined, it will
  122.   put the first line at the start of the string, instead of 3 chars over,
  123.  
  124. ie:
  125.  
  126. old way = '   Read in description'
  127. new way = 'Read in description'
  128.  
  129.  (I told Wayne about this....for some reason, he seems to think the way he
  130.  does it in the code is the way it has to be done.  I'll be danged if I can
  131.  figure out why though.....)
  132.  
  133.     } else {
  134.       sh_read(f,b,(int)MAX_LINES*256);
  135.       b[(int)MAX_LINES*256]=0;
  136.     }
  137.     sh_close(f);
  138. #ifdef OPT_IDZ_AS_DESCRIPTION
  139.     ss=strtok(b,"\n");
  140.                     // fix idz, change 56 to 59 below
  141. /************* The line below is the one, in case it is hard to see **********/
  142.     sprintf(u->description,"%.59s",ss);  /* **** MODIFY THIS LINE *****/
  143.     ss=strtok(NULL,"");  /* ^^^^^ modified part, spaces
  144.                   removed, changed 56 to 59 */
  145. #else
  146.     ss=b;
  147. #endif
  148.     for (i=strlen(ss)-1; i>0; i--) {
  149.       if ((ss[i]==26) || (ss[i]==12))
  150.     ss[i]=32;
  151.     }
  152.  
  153.  
  154.  
  155.  
  156. Step 5) MAKEFILE
  157.   Add the new file (TRYTOUL.C) to your makefile, or if you just put those two
  158.   functions in xfer.c and/or batch.c ignore this step.
  159.  
  160.   I do this seperate file becuase it is a whole lot easier to update, just
  161.   replace the .c file....
  162.  
  163.   This is for Borland C++.  I don't have Turbo C. If you do, you will have to
  164.   do this yourself, or use the other method.
  165.  
  166. =         xfertmp.obj xinit.obj subxtr.obj multinst.obj conf.obj\
  167. =         readmail.obj instmsg.obj bbsovl1.obj bbsovl2.obj common.obj\
  168. +         trytoul.obj
  169.  
  170.  
  171.   And...
  172.  
  173. =         $(OBJ)\xinit.obj $(OBJ)\subxtr.obj $(OBJ)\multinst.obj\
  174. =         $(OBJ)\conf.obj $(OBJ)\readmail.obj $(OBJ)\instmsg.obj\
  175. =         $(OBJ)\bbsovl1.obj $(OBJ)\bbsovl2.obj $(OBJ)\common.obj\
  176. +         $(OBJ)\trytoul.obj
  177.  
  178.  
  179.   And...
  180.  
  181. = bbsovl1.obj : bbsovl1.c
  182. =   $(TCC_OVL)
  183. = bbsovl2.obj : bbsovl2.c
  184. =   $(TCC_OVL)
  185. = common.obj  : common.c
  186. =   $(TCC_OVL)
  187. + trytoul.obj  : trytoul.c
  188. +   $(TCC_OVL)
  189.  
  190.  
  191.  
  192. Step 6) FCNS.H
  193.   Type 'MAKE FCNS' or add the following two prototypes to FCNS.H:
  194.  
  195.  
  196. /* File: trytoul.c */
  197.  
  198. int try_to_ul_wh(char *fn);
  199. void t2u_error(char *fn, char *msg);
  200.  
  201.  
  202.  
  203.  
  204. Recompile.  Please let us know if you have any problems with this modification.
  205.  
  206. ASYLUM- Learn it Danny.  Learn it.  Learn Asylum.  Be, be it Danny...BE ASYLUM!
  207.  
  208.  
  209. ASYLUM!  Say it like SEGA!
  210.  
  211.  
  212. 4⌠0
  213.  4⌡am0
  214.