Category : BBS Programs+Doors
Archive   : TONSMOD.ZIP
Filename : PAUSE.MOD

 
Output of file : PAUSE.MOD contained in archive : TONSMOD.ZIP
The Elder One #30 @7305
Mon May 14 02:04:29 1990
TO: Filo #1 @5252
RE: CONIO.C--function as moddified by Filo--does NOT work

Ed Drain's Multi-Length Random Pause Mod

This is a mod to the Pause mod by Eugene. His mod allowed you to change
what gets displayed when a user [PAUSE]'s. What it didn't allow you to do
was to have different length strings for your pause messages. To implement
it using his code you would either have to clear the longest possible space
every time, or have lots of IF statements. Some of you may notice that I
used strcpy() and strcat(). I'm told by some that using sprintf is more
efficient. Well, if you want, you can change it. Since pausescr() is such
a small function, just block copy it in and get rid of the old one. It
goes in com.c and the only other thing you will have to change (if you don't
have it in from the previous pause mod, is up at the top of COM.C you need to
have:
#include
This is so you get the prototype for the function random.
Once you have the function block copied into COM.C you can customize your
pauses by changing the values in *s3[]. Note that every 2nd element in *s3[]
is the length of the pause string you just defined in every 1st element.
Remember the commas seperating your elements! I forgot mine the first time
and everything ran together! Oh well, have fun.

If any of you want to call and tell me what a nice mod this is, I would be
happy to hear from you. My board goes up again 16 March, 1990. I'm at
703-534-9512, and the board supports Turbo C, Assembler and Pascal.
Have fun!

Ed Drain

void pausescr()
/* This will pause output, displaying the [PAUSE] message, and wait for
* a key to be hit.
*/
{
#define NUM_PAUSES 7
char esc_seq[]="\x1b[";
int i,
i1, /* i1 is the index into *s3[] -- which [Pause] string to use */
i2=0; /* i2 is the length of s3[i1] -- how many spaces to back up */
char s1[80], /* where our pause string gets placed. must be < 72 chars */
s2[8],
*s3[]={
"[Pause]", "7",
"[Chill]", "7",
"[Hang ten]", "10",
"[Relax...]", "10",
"[Just a Sec...]","15",
"[Toucha, toucha, toucha, TOUCH ME! I wanna feel dirrrtty!]","59",
"[Anhh, What's Up, Doc?]", "23"
};

i1 = (random(NUM_PAUSES) * 2); /* i1 = index of the string we want */
i2=atoi(s3[i1+1]); /* i2 = length of string */


if (okansi()) {
i = curatr;
setc((thisuser.sysstatus & sysstatus_color) ? thisuser.colors[3] :
thisuser.bwcolors[3]);
strnset(s1,' ',79);
strcpy(s1,s3[i1]); /* s1 now has word part of pause str */
strcpy(s2, esc_seq); /* s2 = 1st part of escape sequence */
strcat(s2,s3[i1+1]); /* s3[i+1] points to string length string */
strcat(s2, "D"); /* s2 now has full escape sequence */
strcat(s1,s2); /* s1 now has pause string + escape sequence */
outstr(s1);
setc(i);
getkey();
strnset(s1,' ',i2); /* spaces out the pause string but keeps the */
/* escape sequence intact. */
outstr(s1);
} else {
outstr(s3[i1]);
getkey();
for (i = 0; i < i2; i++)
backspace();
}
}

DISCLAIMER: I'm not responsible for anything you do to your code, your BBS,
or your computer. I'd probably be glad to help though, if you have a problem.
Give my board a call!

Ed Drain

  3 Responses to “Category : BBS Programs+Doors
Archive   : TONSMOD.ZIP
Filename : PAUSE.MOD

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/