home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / UTILITY / UU121B11.ARJ / UU.MOD < prev    next >
Text File  |  1991-11-27  |  14KB  |  395 lines

  1. File        : UU???.ZIP
  2.  
  3. Includes    : UU.C
  4.             : UU.PRJ
  5.             : UU.HLP
  6.             : UU.CFG
  7.             : UU.MOD
  8.             : UU1.MSG
  9.             : UU2.MSG
  10.  
  11. Mod         : UU.MOD
  12. Version     : See UU.C #define UU_VER_NO
  13. Written for : WWIV 4.20e
  14. Author      : Jim Wire 1@3950
  15.                        1@13950
  16.  
  17. Affects     : File MSGBASE1.C:   step 1
  18.               File BBS.C         step 2
  19.               File MSGBASE.C:    step 3
  20.               File BBSUTL1.C:    step 4 (possibly)
  21.               File MAKEFILE.MAK: step 5 (if it is used)
  22.               File FCNS.H:       step 6 (either through MAKE FCNS or
  23.                                  manually insructions for both included)
  24.               File UTILITY.C     step 7
  25.               File BBS.PRJ:      step 8 (if it is used)
  26.  
  27. Indications : 1.   The mod provides multiple directories for extracted
  28.                    files.
  29.  
  30.               2.   If the extension UUE is given the extracted file, you
  31.                    will be offered the opportunity to decode the file.
  32.  
  33.               3.   You will be offered the opportunity to compress the
  34.                    extracted file.
  35.  
  36.               4.   A comment file is attached to new ZIP archives.
  37.  
  38.               5.   If the file is extracted to a directory marked as
  39.                    being a transfer directory (transfer=1;), it offers
  40.                    to //UPLOAD it for you.
  41.  
  42.               6.   In the extract mode, source file(s) for decoded UUE's
  43.                    is(are) deleted.
  44.  
  45.               7.   In the extract mode, source file(s) for new archives
  46.                    is(are) deleted.
  47.  
  48.               8.   Compatible with UU.EXE (of course) and UU??CODE single
  49.                    file formats.
  50.  
  51.               9.   //LOAD(ed) files can be encoded automatically.
  52.  
  53.               10.  Files can be //LOAD(ed) from a default directory
  54.                    or from any other directory.
  55.  
  56.               11.  //LOAD(ed) files can be chosen from a directory list.
  57.  
  58.               12.  //LOAD(ed) files can be editted.
  59.  
  60.               13.  Encoded files can be retained by not choosing to use the
  61.                    TEMP directory.
  62.  
  63.               14.  L and O commands in the read message fuction are
  64.                    improved.  Form letters and files to be loaded can be
  65.                    stored in special directories which are under the data
  66.                    directory.
  67.  
  68.               15.  The stand alone EXE version can be made by commenting
  69.                    out one line.  The creation of the EXE requires the use
  70.                    of the IDE.  The included PRJ will require the paths
  71.                    be changed to match your system.
  72.  
  73. Requires    : 1.   WWIV 4.20e
  74.  
  75. Cautions    : 1.   If you need to be reminded to back up your source, then
  76.                    consider yourself reminded.  As a matter of fact this
  77.                    would be a good time to back up your whole BBS.
  78.  
  79.               2.   If you have trouble getting this mod to work for you
  80.                    don't wait to drop me E-Mail.  I call Dragon's Den
  81.                    and Amber regularly.  I'm the only Jim Wire on either
  82.                    of those two BBS's.  You can NET E-Mail me at 3950.
  83.                    You can crash mail me too, I am the only Jim Wire in
  84.                    the Fidonet nodelist.
  85.  
  86.               3.   This mod is is installed by the deletion of other
  87.                    functions already in the BBS and a few very minor
  88.                    changes.
  89.  
  90.               4.   At this time the mod nor the EXE version of uu properly
  91.                    handles old format multi-segment files.  This feature
  92.                    is in the works.  As a stop gap measure the files can be
  93.                    copied into a single file and decoded.  This may be as
  94.                    far as I need to go on this problem.  Is it worth it?
  95.  
  96.               5.   At this time the mod makes no provision for the //LAODing
  97.                    of multi-segment files.  Do we need this?
  98.  
  99. Defaults    : Directories: C:\bbs\dloads\mods
  100.                            C:\bbs\dloads\wwivmodn
  101.                            C:\bbs\wwivnet\extract\mail
  102.                            C:\bbs\wwivnet\extract\feedback
  103.                            gfiles
  104.                            data
  105.                            data\load
  106.                            data\frm
  107.  
  108. NOTE:  Yes I know my directory structure is weird.  You can either match mine
  109.        or change the mod to match yours.  The source file (UU.C) is profusely
  110.        commented and should make any required changes obvious.  If you can't
  111.        see what needs to be changed let me know and I'll try to help.
  112.  
  113. Credits     : This mod includes information derived from a mods created by
  114.               Birdhunter (1@3451) and Alley Kat (1@8352).  There is none
  115.               of the code from these two mods left in the UU files; but
  116.               concept is still similar.  The ENCODING/DECODING algorith is
  117.               based on the BIT patterns of a program that is copyrighted.  I
  118.               use a different method to arrive at the same bit patterns and
  119.               owe nothing to the copyrighted program.  No code from that
  120.               program exists in this program.
  121.  
  122. The Mod     : 1.a  In MSGBASE1.C search for the funtion void extract_out
  123.                    (char *b, long len, char *title), and delete it.
  124.  
  125.               1.b  In void readmail() at the top, add the following
  126.                    variable declarations.
  127.  
  128.   char *sss;                                     /* uu.mod +*/
  129.   int f1;                                        /* uu.mod +*/
  130.   struct ffblk ff;                               /* uu.mod +*/
  131.  
  132.               1.c  In void readmail() search for case 'O' and replace the
  133.                    beginning with:
  134.  
  135.     case 'O':
  136.       if ((cs()) && (okmail) && (m.fromuser!=65535)) {
  137.             sprintf(s,"%sFRM\\*.FRM",syscfg.datadir);/* uu.mod +*/
  138.             f1=findfirst(s,&ff,0);               /* uu.mod +*/
  139.             if (f1) {                            /* uu.mod +*/
  140.               npr("\nNo form letters available.\r\n");/* uu.mod +*/
  141.               break;                             /* uu.mod +*/
  142.             }                                    /* uu.mod +*/
  143.             npr("\nAvailable form letters:\r\n");/* uu.mod +*/
  144.             while (f1==0) {                      /* uu.mod +*/
  145.               strcpy(s,ff.ff_name);              /* uu.mod +*/
  146.               sss=strchr(s,'.');                 /* uu.mod +*/
  147.               if (sss)                           /* uu.mod +*/
  148.                 *sss=0;                          /* uu.mod +*/
  149.               pl(s);                             /* uu.mod +*/
  150.               f1=findnext(&ff);                  /* uu.mod +*/
  151.             }                                    /* uu.mod +*/
  152.         nl();
  153.         prt(2,"Which form letter? ");
  154.             input(s,8);                          /* uu.mod +-*/
  155.             sprintf(s1,"%sFRM\\%s.FRM",syscfg.datadir,s);/* uu.mod +-*/
  156.         if (exist(s1)) {
  157.  
  158.  
  159.               1.d  In void readmail() search for case 'L' and replace it
  160.                    with:
  161.  
  162.         case 'L':
  163.           if (so())                              /* uu.mod +-*/
  164.             loadfile();                          /* uu.mod +*/
  165.           break;                                 /* uu.mod +*/
  166.       }
  167.  
  168.                    Save the file.
  169.  
  170. The Mod     : 2.   In BBS.C search for 'LOAD' and make the conditional look
  171.                    like:
  172.  
  173.     if (strcmp(s,"LOAD")==0) {                   /* uu.mod +=*/
  174.       loadfile();                                /* uu.mod +*/
  175.     }                                            /* uu.mod +=*/
  176.                    save the file.
  177.  
  178. The Mod     : 3.   In MSGBASE.C search for void load_workspace(char *fnx,
  179.                    int no_edit) in that function there are a couple of
  180.                    minor changes to be made.  One gives the user some
  181.                    feedback if the file to be loaded into work space is
  182.                    not found, the other allows the loaded uue'd file to
  183.                    be edited.
  184.  
  185.                    A.  search for:
  186.  
  187.   if (i5<1) {
  188.     nl();
  189.     pl("File not found.");
  190.     nl();
  191.     return;
  192.   }
  193.  
  194.                        change to:
  195.  
  196.   if (i5<1) {
  197.     npr("The file %s was not found.\r\n",fnx);   /* uu.mod +*/
  198.     return;
  199.   }
  200.  
  201.                    B.  search for:
  202.  
  203.   write(i5, (void *)b,l);
  204.   close(i5);
  205.  
  206.                        add:
  207.  
  208.   _chmod(s,S_IWRITE);                            /* uu.mod +*/
  209.  
  210.                    C.  search for:
  211.  
  212.     pl("Editing will be allowed.");
  213.  
  214.                        add:
  215.  
  216.     nl();                                        /* uu.mod */
  217.  
  218.                        above it.
  219.  
  220.  
  221.                    D.  in void inmsg search for:
  222.  
  223.       if (save) {
  224.     pl("Reading in file...");
  225.       }
  226.       use_workspace=0;
  227.     }
  228.   }
  229.                        change to:
  230.  
  231.       if (save) {
  232.     pl("Reading in file...");
  233.       }
  234.       prt(5,"Retain file in workspace? ");       /* uu.mod */
  235.       use_workspace=yn();                        /* uu.mod */
  236.     }
  237.   }
  238.                    E.  in void inmsg search for:
  239.  
  240.     if (fsed)
  241.       unlink(fnx);
  242.   } else {
  243.     if (fsed)
  244.       unlink(fnx);
  245.  
  246.                        change to:
  247.  
  248.     if ((fsed) && (!use_workspace))              /* uu.mod */
  249.       unlink(fnx);
  250.   } else {
  251.     if ((fsed) && (!use_workspace))              /* uu.mod */
  252.       unlink(fnx);
  253.  
  254.                        save the file.
  255.  
  256. NOTE:  Parts D and E above will allow the //LOADed file to be re-used
  257.        if you want.  Editing the //LOADed file will prevent re-use.
  258.  
  259. The Mod     : 4.   In BBSUTL1.C search for and remove the functions compress
  260.                    and comment if they are there.  They may not be there if
  261.                    you have not already installed other WIREMODS, or if the
  262.                    ones you have installed do not use them.  Save the file if
  263.                    changes were made, if no changes were made, close the file.
  264.  
  265. The Mod     : 5.   If you are using the make facility you will have to make
  266.                    some changes to MAKEFILE.MAK.  Search for:
  267.  
  268.         $(OBJ)srsend.obj $(OBJ)lilo.obj
  269.  
  270.                    add:
  271.                                         $(OBJ)uu.obj
  272.  
  273.                    so it looks like:
  274.  
  275.         $(OBJ)srsend.obj $(OBJ)lilo.obj $(OBJ)uu.obj
  276.  
  277.                   search for:
  278.  
  279. $(OBJ)lists.obj  : lists.c   vars.h vardec.h net.h
  280.   $(TCC_OVL)
  281.  
  282. $(OBJ)return.obj  : return.c   vars.h vardec.h net.h
  283.   $(TCC)
  284.  
  285.                   add:
  286.  
  287. $(OBJ)uu.obj  : uu.c   vars.h vardec.h net.h
  288.   $(TCC_OVL)
  289.  
  290.                    so it looks like:
  291.  
  292. $(OBJ)lists.obj  : lists.c   vars.h vardec.h net.h
  293.   $(TCC_OVL)
  294. $(OBJ)uu.obj  : uu.c   vars.h vardec.h net.h
  295.   $(TCC_OVL)
  296.  
  297. $(OBJ)return.obj  : return.c   vars.h vardec.h net.h
  298.   $(TCC)
  299.  
  300.                   save the file, MAKE FCNS, then MAKE.
  301.  
  302. The Mod     : 6.   If you are using the IDE you will have to make some
  303.                    changes to fcns.h.  If you are using the make facility
  304.                    this can be accomplised by a 'make fcns'.  For the IDE,
  305.                    at the end of the file FCNS.H, before the #endif, add:
  306.  
  307. /* File: uu.c */
  308.  
  309. void extract_out(char *b, long len, char *title);
  310. void loadfile();
  311. int get_name(char *path, char *ext);
  312. void compress1(char *fn, char *path);
  313. void compress();
  314. void comment();
  315. void fpr(FILE *out, char *fmt, ...);
  316. int find_dot (char *fn, char ch);
  317. char *forjon(char *ss, int x);
  318. void decout(char *p,  FILE *f,int n);
  319. void decode(FILE *in, FILE *out);
  320. int decd();
  321. void encout(char *p, FILE *f);
  322. void encode(FILE *in, FILE *out, char *sig);
  323. int encd();
  324.  
  325.                    so it looks like:
  326.  
  327. /* File: uu.c */
  328.  
  329. void extract_out(char *b, long len, char *title);
  330. void loadfile();
  331. int get_name(char *path, char *ext);
  332. void compress1(char *fn, char *path);
  333. void compress();
  334. void comment();
  335. void fpr(FILE *out, char *fmt, ...);
  336. int find_dot (char *fn, char ch);
  337. char *forjon(char *ss, int x);
  338. void decout(char *p,  FILE *f,int n);
  339. void decode(FILE *in, FILE *out);
  340. int decd();
  341. void encout(char *p, FILE *f);
  342. void encode(FILE *in, FILE *out, char *sig);
  343. int encd();
  344.  
  345. #endif
  346.  
  347.                    add uu.c to your project (.PRJ file) and make BBS.EXE.
  348.  
  349. NOTE:  If you are still able to get MAKE FCNS to work despite the fact that
  350.        you are using the IDE then do that instead.
  351.  
  352. The Mod     : 7.  Open utility.c and make the following changes to function
  353.                   int exist(char *s):
  354.  
  355.   if (f>0) {                                     /* uu.mod +-*/
  356.     _chmod(s,1,0);                               /* uu.mod +*/
  357.     return(1);
  358.   } else                                         /* uu.mod +*/
  359.  
  360.                   save utility.c.
  361.  
  362. The Mod     : 8.  You will have to add the following directories to be able
  363.                   to use the mod without making changes to UU.C:
  364.  
  365. D:\dloads\mods
  366. D:\dloads\wwivmodsn
  367. C:\bbs\wwivnet\extract\mail
  368. C:\bbs\wwivnet\extract\feedback
  369. gfiles
  370. data
  371. data\load
  372.  
  373. NOTE:  There is no reason that you should feel these are directories you
  374.        MUST use.  These are simply the ones I chose to define and install.
  375.        You can easily add as many directories as you want.
  376.  
  377. The Mod     : 9.  Make the new BBS however you do it.
  378.  
  379. The Mod     :10.  Put the UU?.MSG files in your GFILES directory.
  380.  
  381. NOTE:  In the compress function used here, and in other mods I've done,
  382.        I add a comment into the ZIP file.  All you need to do is put a file
  383.        gfiles\zipcomnt.msg  on your system and the comment will be added.
  384.  
  385. I take no responsiblity for damage to your system.  If you should decide to
  386. use this mod it is your choice.
  387.  
  388. Jim Wire
  389. HIT BBS
  390. (319) 296-1529
  391. Down Monday - Friday 6P-10P CT
  392. 24 Hours Weekends 10P Friday - 6P Monday
  393. WWIV Sysop AutoVal
  394. Call Back Verification
  395.