home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Devil's Doorknob BBS Capture (1996-2003)
/
devilsdoorknobbbscapture1996-2003.iso
/
Dloads
/
WWIVMODS
/
PRE412.ZIP
/
ELRIC34.MOD
< prev
next >
Wrap
Text File
|
1990-04-18
|
4KB
|
139 lines
Elric 34, correct time estimation for DSZ transfers with locked baud rate
modems.
You see, I got an HST, but the one thing I hated was once I locked the
baud rate, the transfer estimation times for DSZ were horrid, since
they were based on the locked baud rate. So, someone at 300 baud could
download a 100K file, and DSZ would be saying "estimated time 1.0 minutes"
and it just kind of annoyed me. If you add "estimate 0 br" to the line, where
br is the baud rate, then it will estimate the time correctly. So, here is how
to do that. I added a %4 to the calling params, with the modem speed. I
had previously done this with the %1, but that precluded the use
of some protocols which HAD to have the correct com speed passed out. So,
with a little more playing around, I got it working.
/** this step is indeed a form step, much like a form letter **/
1. From DOS, in your dir where you keep your source....
PKZIP SOURCE *.c *.h
If you already have a source zip file, then
PKZIP -f source *.c *.h
This way you have a copy of everything before you screw it up with a bad mod.
If you decide to take the mod out, it's as easy as
PKUNZIP -x source
and hit Y to overwrite any files you changed.
/** we now resume our regularly scheduled mod with step 2.... **/
2. Load up SR.C. Look down for int extern_prot. First, add sx4[21] to the
char variables. This is where we will store the modem speed. Next, search
down for a line that looks like
ultoa(com_speed,....).
Add the line
ultoa(modem_speed,sx4,10);
Next, look down for a line that starts
stuff_in(s,....)
Change that to look like this.
stuff_in(s,s1,sx1,sx2,fn,sx4,""); /** change me **/
Now just re-compile. The code should look something like this when you
are done.
int extern_prot(int pn, char *fn1, int sending)
{
char s[81],s1[81],s2[81],fn[81],sx1[21],sx2[21],sx4[21]; /** mod **/
int i,i1;
i=0;
for (i1=0; i1<81; i1++) {
i+=externs[pn].description[i1];
i+=externs[pn].sendfn[i1];
i+=externs[pn].receivefn[i1];
}
if (i!=checkext[pn]) {
nl();
pl("Protocol Corrupted; can't use anymore.");
nl();
return(-5);
}
if (sending) {
nl();
pl("> Beginning file transmission, ^X to abort");
strcpy(s1,(externs[pn].sendfn));
} else {
nl();
pl("> Ready to receive, ^X to abort.");
strcpy(s1,(externs[pn].receivefn));
}
strcpy(fn,fn1);
stripfn1(fn);
ultoa(com_speed,sx1,10); /** mod **/
ultoa(modem_speed,sx4,10); /** add me **/
sx2[0]='0'+syscfg.primaryport;
sx2[1]=0;
stuff_in(s,s1,sx1,sx2,fn,sx4,""); /** change me **/
if (s[0]) {
set_protect(0);
outs("\r\n*> Current user: ");
outs(nam(&thisuser,usernum));
Now you can use %4 to pass the actual modem speed to your protocols for
estimation purposes. I had previously just changed %1, but that prevented
me from using some other protocols, since they DID need the com speed.
DSZ makes so much sense in the way it reads the com speed and assumes it
isnt going to change.
OK, some samples of how to use this...
Zmodem
send: DSZ port %2 ha on estimate 0 %4 sz -Zmk %3
receive: DSZ port %2 ha on estimate 0 %4 rz -Zmk %3
/** hey, it's the form info file **/
As usual, I take no responsibility for hard drive crashes, death in the
family, or end of the world as we know it resulting from this mod.
It's your fault if you didn't back up the files before you made the mod.
It's your fault if you don't back up your ENTIRE hard drive AT LEAST once
a month.
It works on my system with Turbo C 2.0, WWIV 4.1, V20/8088, 640K/640EMS.
If you use this, the only payment I ask is that you send me a note through
WWIVLink to 1@18251 saying you are using it...not too much to ask is it?
The Kingdom of Melnibone(LINK/NET)
812-877-3488 24 Hrs a day
3/12/2400/4800/9600/12,000/14,400 baud HST MNP5
Auto-validation of WWIV sysops on first call
Xmodem, Ymodem, DSZ Zmodem with retry, Ymodem-G
WWIV Link 1@18251
WWIV Net 1@8251