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 >
Wrap
Text File
|
1991-11-27
|
14KB
|
395 lines
File : UU???.ZIP
Includes : UU.C
: UU.PRJ
: UU.HLP
: UU.CFG
: UU.MOD
: UU1.MSG
: UU2.MSG
Mod : UU.MOD
Version : See UU.C #define UU_VER_NO
Written for : WWIV 4.20e
Author : Jim Wire 1@3950
1@13950
Affects : File MSGBASE1.C: step 1
File BBS.C step 2
File MSGBASE.C: step 3
File BBSUTL1.C: step 4 (possibly)
File MAKEFILE.MAK: step 5 (if it is used)
File FCNS.H: step 6 (either through MAKE FCNS or
manually insructions for both included)
File UTILITY.C step 7
File BBS.PRJ: step 8 (if it is used)
Indications : 1. The mod provides multiple directories for extracted
files.
2. If the extension UUE is given the extracted file, you
will be offered the opportunity to decode the file.
3. You will be offered the opportunity to compress the
extracted file.
4. A comment file is attached to new ZIP archives.
5. If the file is extracted to a directory marked as
being a transfer directory (transfer=1;), it offers
to //UPLOAD it for you.
6. In the extract mode, source file(s) for decoded UUE's
is(are) deleted.
7. In the extract mode, source file(s) for new archives
is(are) deleted.
8. Compatible with UU.EXE (of course) and UU??CODE single
file formats.
9. //LOAD(ed) files can be encoded automatically.
10. Files can be //LOAD(ed) from a default directory
or from any other directory.
11. //LOAD(ed) files can be chosen from a directory list.
12. //LOAD(ed) files can be editted.
13. Encoded files can be retained by not choosing to use the
TEMP directory.
14. L and O commands in the read message fuction are
improved. Form letters and files to be loaded can be
stored in special directories which are under the data
directory.
15. The stand alone EXE version can be made by commenting
out one line. The creation of the EXE requires the use
of the IDE. The included PRJ will require the paths
be changed to match your system.
Requires : 1. WWIV 4.20e
Cautions : 1. If you need to be reminded to back up your source, then
consider yourself reminded. As a matter of fact this
would be a good time to back up your whole BBS.
2. If you have trouble getting this mod to work for you
don't wait to drop me E-Mail. I call Dragon's Den
and Amber regularly. I'm the only Jim Wire on either
of those two BBS's. You can NET E-Mail me at 3950.
You can crash mail me too, I am the only Jim Wire in
the Fidonet nodelist.
3. This mod is is installed by the deletion of other
functions already in the BBS and a few very minor
changes.
4. At this time the mod nor the EXE version of uu properly
handles old format multi-segment files. This feature
is in the works. As a stop gap measure the files can be
copied into a single file and decoded. This may be as
far as I need to go on this problem. Is it worth it?
5. At this time the mod makes no provision for the //LAODing
of multi-segment files. Do we need this?
Defaults : Directories: C:\bbs\dloads\mods
C:\bbs\dloads\wwivmodn
C:\bbs\wwivnet\extract\mail
C:\bbs\wwivnet\extract\feedback
gfiles
data
data\load
data\frm
NOTE: Yes I know my directory structure is weird. You can either match mine
or change the mod to match yours. The source file (UU.C) is profusely
commented and should make any required changes obvious. If you can't
see what needs to be changed let me know and I'll try to help.
Credits : This mod includes information derived from a mods created by
Birdhunter (1@3451) and Alley Kat (1@8352). There is none
of the code from these two mods left in the UU files; but
concept is still similar. The ENCODING/DECODING algorith is
based on the BIT patterns of a program that is copyrighted. I
use a different method to arrive at the same bit patterns and
owe nothing to the copyrighted program. No code from that
program exists in this program.
The Mod : 1.a In MSGBASE1.C search for the funtion void extract_out
(char *b, long len, char *title), and delete it.
1.b In void readmail() at the top, add the following
variable declarations.
char *sss; /* uu.mod +*/
int f1; /* uu.mod +*/
struct ffblk ff; /* uu.mod +*/
1.c In void readmail() search for case 'O' and replace the
beginning with:
case 'O':
if ((cs()) && (okmail) && (m.fromuser!=65535)) {
sprintf(s,"%sFRM\\*.FRM",syscfg.datadir);/* uu.mod +*/
f1=findfirst(s,&ff,0); /* uu.mod +*/
if (f1) { /* uu.mod +*/
npr("\nNo form letters available.\r\n");/* uu.mod +*/
break; /* uu.mod +*/
} /* uu.mod +*/
npr("\nAvailable form letters:\r\n");/* uu.mod +*/
while (f1==0) { /* uu.mod +*/
strcpy(s,ff.ff_name); /* uu.mod +*/
sss=strchr(s,'.'); /* uu.mod +*/
if (sss) /* uu.mod +*/
*sss=0; /* uu.mod +*/
pl(s); /* uu.mod +*/
f1=findnext(&ff); /* uu.mod +*/
} /* uu.mod +*/
nl();
prt(2,"Which form letter? ");
input(s,8); /* uu.mod +-*/
sprintf(s1,"%sFRM\\%s.FRM",syscfg.datadir,s);/* uu.mod +-*/
if (exist(s1)) {
1.d In void readmail() search for case 'L' and replace it
with:
case 'L':
if (so()) /* uu.mod +-*/
loadfile(); /* uu.mod +*/
break; /* uu.mod +*/
}
Save the file.
The Mod : 2. In BBS.C search for 'LOAD' and make the conditional look
like:
if (strcmp(s,"LOAD")==0) { /* uu.mod +=*/
loadfile(); /* uu.mod +*/
} /* uu.mod +=*/
save the file.
The Mod : 3. In MSGBASE.C search for void load_workspace(char *fnx,
int no_edit) in that function there are a couple of
minor changes to be made. One gives the user some
feedback if the file to be loaded into work space is
not found, the other allows the loaded uue'd file to
be edited.
A. search for:
if (i5<1) {
nl();
pl("File not found.");
nl();
return;
}
change to:
if (i5<1) {
npr("The file %s was not found.\r\n",fnx); /* uu.mod +*/
return;
}
B. search for:
write(i5, (void *)b,l);
close(i5);
add:
_chmod(s,S_IWRITE); /* uu.mod +*/
C. search for:
pl("Editing will be allowed.");
add:
nl(); /* uu.mod */
above it.
D. in void inmsg search for:
if (save) {
pl("Reading in file...");
}
use_workspace=0;
}
}
change to:
if (save) {
pl("Reading in file...");
}
prt(5,"Retain file in workspace? "); /* uu.mod */
use_workspace=yn(); /* uu.mod */
}
}
E. in void inmsg search for:
if (fsed)
unlink(fnx);
} else {
if (fsed)
unlink(fnx);
change to:
if ((fsed) && (!use_workspace)) /* uu.mod */
unlink(fnx);
} else {
if ((fsed) && (!use_workspace)) /* uu.mod */
unlink(fnx);
save the file.
NOTE: Parts D and E above will allow the //LOADed file to be re-used
if you want. Editing the //LOADed file will prevent re-use.
The Mod : 4. In BBSUTL1.C search for and remove the functions compress
and comment if they are there. They may not be there if
you have not already installed other WIREMODS, or if the
ones you have installed do not use them. Save the file if
changes were made, if no changes were made, close the file.
The Mod : 5. If you are using the make facility you will have to make
some changes to MAKEFILE.MAK. Search for:
$(OBJ)srsend.obj $(OBJ)lilo.obj
add:
$(OBJ)uu.obj
so it looks like:
$(OBJ)srsend.obj $(OBJ)lilo.obj $(OBJ)uu.obj
search for:
$(OBJ)lists.obj : lists.c vars.h vardec.h net.h
$(TCC_OVL)
$(OBJ)return.obj : return.c vars.h vardec.h net.h
$(TCC)
add:
$(OBJ)uu.obj : uu.c vars.h vardec.h net.h
$(TCC_OVL)
so it looks like:
$(OBJ)lists.obj : lists.c vars.h vardec.h net.h
$(TCC_OVL)
$(OBJ)uu.obj : uu.c vars.h vardec.h net.h
$(TCC_OVL)
$(OBJ)return.obj : return.c vars.h vardec.h net.h
$(TCC)
save the file, MAKE FCNS, then MAKE.
The Mod : 6. If you are using the IDE you will have to make some
changes to fcns.h. If you are using the make facility
this can be accomplised by a 'make fcns'. For the IDE,
at the end of the file FCNS.H, before the #endif, add:
/* File: uu.c */
void extract_out(char *b, long len, char *title);
void loadfile();
int get_name(char *path, char *ext);
void compress1(char *fn, char *path);
void compress();
void comment();
void fpr(FILE *out, char *fmt, ...);
int find_dot (char *fn, char ch);
char *forjon(char *ss, int x);
void decout(char *p, FILE *f,int n);
void decode(FILE *in, FILE *out);
int decd();
void encout(char *p, FILE *f);
void encode(FILE *in, FILE *out, char *sig);
int encd();
so it looks like:
/* File: uu.c */
void extract_out(char *b, long len, char *title);
void loadfile();
int get_name(char *path, char *ext);
void compress1(char *fn, char *path);
void compress();
void comment();
void fpr(FILE *out, char *fmt, ...);
int find_dot (char *fn, char ch);
char *forjon(char *ss, int x);
void decout(char *p, FILE *f,int n);
void decode(FILE *in, FILE *out);
int decd();
void encout(char *p, FILE *f);
void encode(FILE *in, FILE *out, char *sig);
int encd();
#endif
add uu.c to your project (.PRJ file) and make BBS.EXE.
NOTE: If you are still able to get MAKE FCNS to work despite the fact that
you are using the IDE then do that instead.
The Mod : 7. Open utility.c and make the following changes to function
int exist(char *s):
if (f>0) { /* uu.mod +-*/
_chmod(s,1,0); /* uu.mod +*/
return(1);
} else /* uu.mod +*/
save utility.c.
The Mod : 8. You will have to add the following directories to be able
to use the mod without making changes to UU.C:
D:\dloads\mods
D:\dloads\wwivmodsn
C:\bbs\wwivnet\extract\mail
C:\bbs\wwivnet\extract\feedback
gfiles
data
data\load
NOTE: There is no reason that you should feel these are directories you
MUST use. These are simply the ones I chose to define and install.
You can easily add as many directories as you want.
The Mod : 9. Make the new BBS however you do it.
The Mod :10. Put the UU?.MSG files in your GFILES directory.
NOTE: In the compress function used here, and in other mods I've done,
I add a comment into the ZIP file. All you need to do is put a file
gfiles\zipcomnt.msg on your system and the comment will be added.
I take no responsiblity for damage to your system. If you should decide to
use this mod it is your choice.
Jim Wire
HIT BBS
(319) 296-1529
Down Monday - Friday 6P-10P CT
24 Hours Weekends 10P Friday - 6P Monday
WWIV Sysop AutoVal
Call Back Verification