home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Devil's Doorknob BBS Capture (1996-2003)
/
devilsdoorknobbbscapture1996-2003.iso
/
Dloads
/
WWIVMODS
/
MODSUNKN.ZIP
/
CENTRTN.MOD
< prev
next >
Wrap
Text File
|
1992-12-01
|
1KB
|
38 lines
CENTERING ROUTINE
By The Captain of the White Star Line (@2370)
=============================================
This is a function which will center any line of text on the user's screen.
It checks the user's screen width, so it will center just as well for 40-column users as it will for 80-column.
It is used the same way you use the prt() command. For example,
center(2,"General Text Files");
will print out General Text Files with color 2, which is usually yellow.
In COM.C, add the following block after void pl(char *s);
---------------------------------------------------------
void center(int a, char *s)
{
int i,i1,i2;
i1 = strlen(s)/2;
i2 = (thisuser.screenchars/2)-i1;
for (i=0; i<i2; i++)
outstr(" ");
ansic(a);
outstr(s);
ansic(0);
}
---------------------------------------------------------
In FCNS.H, add the following line at the end:
void center(int a, char *s);
---------------------------------------------------------
Now just recompile the BBS and start finding places to use it. A suggestion
would be the titles of file directories in XFER.C.
______________________________________________________________________________