home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 2 BBS
/
02-BBS.zip
/
drsk.zip
/
doorskel.doc
next >
Wrap
Text File
|
1994-06-18
|
35KB
|
1,080 lines
DOORSKEL C BBS Door-building kit for OS/2 and MS-DOS
copyright (c) 1990-1993 by M. Kimes -- all rights reserved
==========================================================
Doorskel is a simple way to build Doors (external programs called by BBS
programs to provide additional functionality to online users) that can
be compiled for either OS/2 or MS-DOS from the same C source code.
Doorskel provides portable replacements for some OS and
compiler-specific functions, and provides a communications i/o API that
functions similarly under both DOS and OS/2. It provides a windowed
ANSI interpreter and protected status lines, and special local keys to
give you a ready-made local interface, and several custom menu
functions, a paged/TTY file reader, and integral dumb/ANSI split screen
chat to give you ready-made remote interfaces. You should find Doorskel
full-featured enough that you could add database and protocol functions
and create a custom BBS.
Doorskel Doors for MS-DOS require a FOSSIL (Fido/Opus/Seadog Standard
Interface Layer) driver to be installed. Most DOS BBSes already use
FOSSIL drivers, and several FOSSIL drivers are freely available, so this
is no large hardship.
Doorskel Doors may take all parameters from the command line, and will
optionally read a DORINFO?.DEF drop file (the most popular format) for
parameters. Command line parameters can override those in the drop
file.
License:
=======
You may use Doorskel to create FREE Doors (Doors for which you charge no
registration fee and do not sell) without charge or obligation. You may
not use it otherwise, period.
Rights to distribute are granted only to services which do not charge
for the distribution.
Disclaimer:
==========
There is no warranty whatsoever associated with Doorskel. There is no
support. There will be no upgrades. Doorskel was created to make it
possible for people to create FREE Doors that work identically under
OS/2 or MS-DOS (to promote the writing of Doors for OS/2), not to make
money.
How to use it:
=============
Here's how you'd build an extremely simple "Hello World" Door:
/* start file main.c: */
#include "doorskel.h"
int main (int argc,char *argv[]) {
if(DoorInit(argc,argv)) /* initialize Door driver */
return 1; /* initialization failed */
DoorCLS(); /* clear the screen */
DoorPuts("\r\nHello, world!\r\n");
DoorInkey(5000L); /* so it stays up long enough to read */
return 0;
}
/* end file main.c */
Compile to an OBJ, link with the appropriate library above, and you're
done. When this "Door" is run, you'll get a screen with a single status
line and "Hello, world!" printed on the first line (the cursor will be
on the line below that). After five seconds the Door will end (or
sooner, if you press a key).
See the code in SAMPLE.LZH for a more complex (beginner to intermediate)
example. Obtain the Fundy or Library Doors for more complicated
(intermediate to advanced) examples. See the API list below for more
information on what's available and how it's used.
File list:
=========
Here's what should have been in the archive DRSK_200.LZH:
DOORSKEL.DOC This file
DOORSKEL.H Include file for Doorskel Doors
HYDRA.H Include file for Doorskel's Hydra* implementation
XMODEM.C X/YModem using Doorskel library calls
LIBS.LZH Doorskel libraries
TCLIBD.LIB: Turbo C 2.01 library, large model, MS-DOS
MSCLIBD.LIB: Microsoft C 6.0a library, large model, MS-DOS
MSCLIB2.LIB: Microsoft C 6.0a library, large model, OS/2
SAMPLE.LZH Sample Door code
SAMPLE.C main module
SAMPLE.MAK MSC 6.0a make file (MS-DOS)
SAMPOS2.MAK MSC 6.0a make file (OS/2)
DOORCHAT.HLP Help file for chat mode
SAMPLE.HLP Sample help file for pulldown menu demo
SAMPLE.TC Turbo C 2.01 settings file
SAMPLE.PRJ Turbo C 2.01 project file (for IDE)
SAMPTC.BAT Turbo C 2.01 build file (for command line)
SAMPLE.EXE Sample Door compiled with MSC 6.0a for MS-DOS
*Hydra protocol designed by Arjen Lentz and Joaquim Homrighausen
Portions of the Hydra source in Doorskel were originally written
by Arjen Lentz.
The API: (follow along in DOORSKEL.H for additional nitty-gritty detail):
=======
int DoorGetDrive(void);
returns the current disk drive identifier as a number (1 == A, 2 == B,
etc.).
DoorSetDrive(int);
sets the current disk drive to number (1 == A, 2 == B, etc.).
DOORFINDBUF
typedef for the buffer required for DoorFindfirst/next/close
functions which should be used for portability. this buffer is
filled in by those functions.
Universally accessible members:
attrFile Attributes of the file
ftimeLastWrite FTIME structure (hours, minutes, twosecs members)
fdateLastWrite FDATE structure (year, month, day members)
cbFile Size of the file
achName Name of the file
int DoorFindFirst (int *handle,char *spec,DOORFINDBUF *buf,int attr);
handle is pre-set to either HDIR_SYSTEM or HDIR_CREATE (normally,
use HDIR_CREATE). spec is the mask to use in the find (for example,
"*.*"). buf is a buffer of type DOORFINDBUF. attr is an integer
describing the attributes of files to find. Attributes can be
FILE_NORMAL, FILE_READONLY, FILE_HIDDEN, FILE_SYSTEM, FILE_DIRECTORY
and/or FILE_ARCHIVED. You can combine these by ORing the constants
(i.e. FILE_NORMAL | FILE_ARCHIVED). Returns non-zero on error
(usually no matching files).
int DoorFindNext(int h,DOORFINDBUF *buf);
handle is the handle obtained from a DoorFindFirst call. buf is the
DOORFINDBUF buffer returned from a DoorFindFirst call. Returns
non-zero on error (usually no more matching files).
void DoorFindClose(int h);
close the handle obtained from a DoorFindFirst call. Don't forget
to call this, or, under OS/2, you'll run out of search handles.
BACKSPACE
a destructive backspace string. #defined to "\b \b". Normal
backspaces ("\b") are considered non-destructive by Doorskel display
routines.
DoorComCSendByte(char x);
send a byte out the commport with carrier check if someone's online.
DoorComCNSendByte(char x);
send a byte out the commport with carrier check.
DoorComSendByte(char x);
send a byte out the commport.
DoorComWriteByte(char x);
send a byte out the commport.
DoorComDTROn(void);
raise DTR.
DoorComDTROff(void);
drop DTR; usually hangs up.
DoorComLDTROff(void);
drop DTR after a one second pause.
int DoorComIsByte(void);
returns non-zero if there is a character waiting to be read from the
commport.
DoorInitComm(void);
internal; initialize communications functions. Called by
DoorInit().
DoorDeinitComm(void);
internal; deinitialize communications functions. Called by
Doorskel's deinitialization function which runs just before program
termination (via atexit()).
DoorComFlushOut(void);
flushes the commport's outbound buffers. Waits up to about 3
seconds for everything pending to be transmitted, if necessary.
DoorComPurgeIn(void);
purge the commport's inbound buffer.
DoorComPurgeOut(void);
purge the commport's outbound buffer.
DoorModemPuts(char *s);
print a null-terminated string out the commport. note this prints
remotely only, and only if someone's online.
DoorRemoteBell(void);
rings a bell on the remote (or local console, if no one's online).
equivalent to:
if(DoorGetBaudVar()) DoorModemPuts("\07");else DoorANSIPuts("\07");
long DoorMinsLeft(void);
returns number of minutes remaining to current user. You can get
the exact number of seconds left with DoorGetTime(). You can change
the user's time remaining with DoorSetTimeOff().
DoorANSISetPos(int x,int y);
position cursor to x,y on local and remote. Remote must have ANSI
graphics capability, obviously.
DoorANSISavePos(void);
cause the local and remote terminals to save their position for
subsequent recall. only one position at a time may be saved (ANSI
limitation).
DoorANSIRstrPos(void);
restores the last saved (via DoorANSISavePos()) local and remote
position.
int DoorIsANSI(void);
returns non-zero if the user has ANSI turned on. DoorGetGraphics()
could also be used.
int DoorIsLocal(void);
returns non-zero if there is no one online. DoorGetBaudVar() could
also be used.
DoorPrintGraphics(char *s);
display the null-terminated string if the user has ANSI turned on.
DoorPurgeInLocal(void);
flush the local keyboard.
DoorFlushOutLocal(void);
flush the local screen. not needed under normal circumstances.
word
typedef for "unsigned short" which under MS-DOS and OS/2 1.x is the
same thing as an unsigned int (a 16-bit integer with no sign).
CLOCKS_PER_SEC
under Turbo C 2.01, equal to CLK_TK. under other compilers, has
pre-defined value. it's the number of clock ticks per second.
clock_t DoorTimerSet(long milliseconds);
set a timer. the functions DoorTimerSet, DoorTimeUp and
DoorTimeLeft are used together to manipulate and inspect timers.
int DoorTimeUp(clock_t timer);
test a timer. return non-zero if timer has expired.
clock_t DoorTimeLeft(clock_t timer);
return milliseconds left on timer (0L if expired).
void DosSleep (clock_t millisecs);
sleep a number of milliseconds. This is the same as the OS/2 API.
In fact, under OS/2, it IS to the OS/2 API. Under MS-DOS it gives
up timeslices during the snooze. The minimum useful call would be
DosSleep(1L), which would give up one full timeslice under OS/2,
Windows, DV, Topview, etc.
int DoorANSIPuts (char *buf);
display a null-terminated string through the ANSI interpreter.
status line(s) is/are protected. Returns length of string printed.
note this prints locally only.
void DoorANSIPutc (char c);
display a single character through the ANSI interpreter. status
line(s) is/are protected. note this prints locally only, and is
less efficient for strings than DoorANSIPuts above.
void DoorSetScreensize (int reservedlines);
internal -- initializes the ANSI interpreter. called by DoorInit().
reservedlines is the number of lines at the bottom of the screen to
reserve as status lines. after a DoorSpawn() this is called again,
in case the screen size changes.
DoorCursor(int x,int y)
position the local cursor to x,y (1-based). To position locally and
remotely, use DoorPrintf("\x1b[%d;%dH",y,x); or DoorANSISetPos().
void DoorScrollUp (int tx,int ty,int bx,int by,char attr);
scroll a local window up. tx == top x coordinate, ty == top y
coordinate, bx == bottom x coordinate, by == bottom y coordinate,
attr == attribute with which to fill blanked lines (7 == pale grey
on black, 112 == black on grey).
void DoorClearWindow (int tx,int ty,int bx,int by,char attr);
clear a local window.
char * DoorStripCR(char *a);
strip trailing '\r' and '\n' from a null-terminated string.
char * DoorLStrip(char *a);
strip leading spaces from a null-terminated string.
char * DoorRStrip(char *a);
strip trailing spaces from a null-terminated string.
void DoorBackup (int num);
print num destructive backspaces.
void DoorBackupString(char *s);
print enough destructive backspaces to erase the string.
char * DoorAddToLog(char *text,...);
add an entry to the logfile (see DoorSetLogFile() and
DoorGetLogFile()).
int DoorInit(int argc,char **argv);
initialize Doorskel. If this returns non-zero your Door should
terminate.
int DoorDetectANSI(void);
returns non-zero if it appears that the user has ANSI graphics
capability.
long DoorGetTime(void);
checks time remaining (and returns time remaining). if user is out
of time, runs appropriate termination function (see
DoorSetOutOfTime() and DoorGetOutOfTime()). Updates time on status
line. This is normally called by all Doorskel high-level input
functions for you, but if you write your own, you may need to call
this and DoorCheckCarrier() in the busy loop.
int DoorInkey(long millisecs);
gets a keypress from local and/or remote. translates remote ANSI
cursor keys and "Doorway"-mode keys. handles local special keys
(like ALT-H to hang up, and function keys assigned with
DoorSetFunctionKeys()).
char * DoorGenericInput(int length,int password,int caps,
int hot,int type,char *prompt,
char *buffer);
gets a null-terminated string from the user. length is the length
of the string to receive (maximum 255 characters). if password is
non-zero, Doorskel "masks" the echoed characters to obscure what's
being typed from prying eyes. if caps is non-zero, input is echoed
and stored as upper case. type is the type of input (see below).
if prompt != NULL Doorskel displays the null-terminated string in
prompt before accepting input. if buffer != NULL Doorskel places
the string into buffer; otherwise it returns in a static string.
Note that this makes DoorGenericInput reentrant _if_ you use the
buffer.
input types:
ALLL All printable characters.
ALPHA Alphabetical [a...Z] characters.
NUM Decimal digits [0...9].
ALPHANUM Alphabetical characters and decimal digits.
YESNO Y or N.
FLE A filename.
FLEP A filename with path.
FLEW A filename with wildcards.
FLEPW A filename with path and wildcards.
NAME A name (capitalization enforced).
NEAT First character of words capitalized.
PHONE A phone number (formatted American-style, sorry).
DATE A date (formatted American-style, sorry).
SUBJECT First letter of input capitalized.
YESNOM Y or N, hot, no echo.
ARROWS ESC, CTRL_K, 0 (Enter), UPP, DN, LEFT or RIGHT.
FBATCH Batch filenames (separated by spaces).
FBATCHW Batch filenames with wildcards.
FBATCHWP Batch filenames with wildcards and path.
FBATCHP Batch filenames with path.
HYPER Internal.
FLENX Filename without extension.
YESNOQ Y, N or Q.
int DoorCheckCarrier(void);
check for carrier loss. if carrier has been lost, runs the
appropriate termination function (see DoorSetLostCarrier() and
DoorGetLostCarrier()). if bit 1 of the return is set, a character
is waiting at the commport.
void DoorHitReturn(void);
displays "\r\n[Enter] to continue..." message and then waits for the
user to press [Enter]. Erases its prompt.
void DoorCLS(void);
clears local and remote screens.
int DoorPrintf(char *string,...);
printf-clone that displays both locally (and remotely if someone's
online). returns length of string written.
void DoorANSIPrintf(char *string,...);
printf-clone that displays locally through ANSI interpreter.
void DoorDebugPrintf(char *string,...);
printf-clone that displays locally if debug mode is on (see
DoorSetDebugMode() and DoorGetDebugMode()). Note that debug mode
can be turned on at the command line of the Door.
int DoorPuts(char *text);
displays a null-terminated string both locally (and remotely if
someone's online). returns length of string written.
int DoorDirectPuts(int x,int y,char attr,char *str);
display a null-terminated string fast (usually directly to screen or
LVB) at location x,y with attribute attr.
int DoorDirectPrintf(int x,int y,char attr,char *str,...);
printf-clone that displays a null-terminated string fast (usually
directly to screen or LVB) at location x,y with attribute attr.
DoorMakeColor(fg,bg)
build attributes for direct screen writing and scrolling/clearing
functions. fg == foreground color (7 = white), bg == background
color (0 = black).
DoorClr(bg,fg,in)
as above, in == intensity bit.
char * DoorMakeANSI (int avacode,char *buf);
build an ANSI escape sequence string from a PC (Avatar) color code
(7 = light grey on black, 112 = black on white, etc.). If buf is
not NULL must point to a string sized long enough to receive the
built sequence (about 30 characters is more than sufficient).
If buf is NULL, an internal static buffer is used. Can be used in
conjunction with DoorMakeColor and DoorClr above.
DoorMakeANSIIf (int avacode,char *buf);
returns "\0" if user doesn't have ANSI graphics on, else returns
the built-up ANSI escape sequence to set the color (as for
DoorMakeANSI).
void DoorLoadHelp (char *helpfilename);
load a help file. help files are plain old flat ASCII files with
the following layout:
<topic1>
text for topic1
more text for topic1
<topic2>
text for topic2
void DoorSetHelp (char *topic);
set current help topic. do not include <> brackets.
void DoorHelp (void);
display text for current help topic.
int DoorANSIMenu2 (char tcolor,char color,char *title,
char *lineorig,char **variable,int startat);
create and process a pulldown menu. if the user is not an ANSI
graphics user, it creates and processes a tree menu. note that
pulldown menus are a good way to present the user with a few
options that have several related suboptions in a way that isn't
as "alien" as many online formats: most every user is familiar
with pulldown menus, so they're intuitive.
tcolor is the ANSI color to use for the title (37 == white). color
is the ANSI color to use for the rest of the window. title is the
string to print centered in the top of the pulldown. lineorig is a
string of options (up to 10) separated by spaces. variable is an
array of strings (must be the same number of strings in the array
that there are options in lineorig) containing suboptions for the
corresponding main option. startat can cause DoorANSIMenu2 to start
with something already selected. DoorANSIMenu2 returns an integer
that equates to the selected option or suboption as main option * 10
(+ suboption). this interfaces automatically with the DoorHelp
system to provide context-sensitive help. I'll refer you to the
sample archive for more on that.
that's seems pretty complicated, but it's really not. here's a
simple example:
int opt;
char *subopts[] = {"1st_Subopt1 2nd_Subopt1","1st_Subopt2 2nd_Subopt2",
NULL};
opt = 0;
while(opt != 30) { /* option 30 == "Exit" */
opt = DoorANSIMenu2(33,36," Example ",
"1st_Option 2nd_Option Exit",
subopts,opt);
switch(opt) {
case 0:
DoorPuts("\r\nYou selected nothing.\r\n");
break;
case 11:
case 12:
case 21:
case 22:
DoorPrintf("\r\nYou selected main option #%u suboption #%u.\r\n",
opt / 10,opt % 10);
break;
case 30:
break;
}
}
int DoorANSIMenu (char color, char *lineorig);
create and process a one-line ANSI menu (if the user is not in ANSI
graphics mode, it's a "standard" one-line menu). Returns the first
letter of the option selected. color is the base ANSI color to use
for the menu (37 == white), and lineorig is a string containing
options separated by spaces. this also interfaces automatically to
the DoorHelp system; again, see sample archive.
int DoorSelectOne (char **selections,int numselecs,char *prompt,
unsigned int flags);
creates and processes a "rolling" menu. selections contains an
array of strings containing selections. numselecs indicates how
many selections there are. prompt is the prompt presented to the
user. flags are bitmapped: 1 == show initial list of options
2 == show initial list of first letters 4 == no "roll"
returns the index of the selected item or -1 if cancelled with
CTRL-K or ESCape.
int DoorTopMenu (char **selections,int numselects);
similar to DoorSelectOne but only for ANSI users. this creates and
processes a top-of-screen menu, similar to the menu in Lotus 1-2-3.
the user can select from the menu using cursor keys (or numeric
keypad; not all terminals properly send arrow keys). the menu can
exceed the length of the screen. returns the index of the selected
item or -1 if cancelled with CTRL-K or ESCape.
int DoorReadText(char *filename,int paged);
display text file filename in typed (paged == 0) or paged (paged is
non-zero) mode.
int DoorReadDorInfo(void);
internal -- read a DORINFO?.DEF file. See DoorUseDorInfo().
int DoorDialTrans (char *str);
send a string to the modem with dial translation:
~ = 1 second pause
` = .1 second pause
| = carriage return
^ = DTR up
v = DTR down
char * DoorGetModemString (clock_t timer);
get a null-terminated cr-ended string from the modem in timer
milliseconds. usually used to get return codes from modem commands.
int DoorSetBaudRate (unsigned int baud,char parity,
int databits,int stopbits);
set current line characteristics. parity is 'N', 'E' or 'O'.
databits is 5, 6, 7 or 8. stopbits is 0 (for one stopbit) or 2 (for
two stopbits).
void DoorCurrCursor(int *x,int *y);
return location of local cursor (1-based).
int DoorWhereX(void);
return x coordinate of local cursor (1-based).
int DoorWhereY(void);
return y coordinate of local cursor (1-based).
int DoorSpawn(char *strr);
spawn an external process. clears screen, restores status lines on
return. returns error code of spawned process (note that spawning
through COMMAND.COM does not return a valid error code).
int DoorComReadByte (long msecs);
read a byte from the commport, waiting up to msecs milliseconds.
returns -1 if timeout occurs .
int DoorComOnLine (void);
return non-zero if carrier is detected. does not run any
termination functions if carrier is not found.
int DoorComWriteBlk (char *buf,int len);
write a block of len bytes in buf out the commport.
int DoorComPeekByte (long msecs);
return the waiting commport byte (if any). waits up to msecs
milliseconds for something to arrive if nothing's there. returns -1
if timeout occurs.
int DoorComReadBlk (char *buf,int len,long msecs);
read a block of up to len bytes into buf, waiting up to msecs
milliseconds for enough to arrive. returns length read or -1
if a timeout occurs.
DoorComOutEmpty (void);
return non-zero if output buffer is empty.
DoorComInEmpty (void);
return non-zer of input buffer is empty.
int DoorComOutWaiting(void);
return number of bytes in output buffer.
int DoorComInWaiting(void);
return number of bytes in input buffer.
char * DoorSearchPath(char *filename);
search the current directory and directories listed in the PATH
environment variable for a file. under OS/2, also searches
DPATH and XPATH (in that order).
char *DoorStrTime(time_t t,char *s);
returns the current time (if t == 0L, otherwise the time represented
by t) in format HH:MM:SS. The buffer s must be at least 9 bytes
long.
char *DoorStrDate(time_t t,char *s);
returns the current date (if t == 0L, otherwise the date represented
by t) in the unambigous and more-or-less universally accepted format
YYYY/MM/DD. The buffer s must be at least 11 bytes long.
void DoorReadScreenLine(int x,char *s);
reads line x from the screen into buffer s. buffer should be
DoorGetMaxx() + 1 bytes long. buffer will be null-terminated.
void DoorReadScreen(int *s);
reads the entire screen (well, the window that normal i/o goes into,
discounting status lines) into buffer s. buffer should be size
DoorGetMaxx() * DoorGetMaxy() * sizeof(short) long.
void DoorWriteScreen(int *s);
writes the entire screen (discounting status lines) from buffer s.
FILE * DoorFsopen (char *filename,char *mode,int sharemode);
open file stream with sharing. use instead of compiler-specific
functions like MSC's _fsopen.
char * DoorStristr (char *t, char *s);
a case insensitive strstr().
long DoorFreeSpace (char *path);
returns the amount of free space on the drive indicated by path
(i.e. if path is "C:\\DUH" returns free space on drive C).
void DoorSetFDate (char *name,long tim);
sets filename name to time tim (where tim == a time_t type,
should be seconds from 1970).
int DoorDoHydra(char *send,char *sendalias,long hydraopts);
engage Hydra file transfer protocol (Hydra designed by Arjen Lentz
and Joaquim Homrighausen). I have no idea if this works or not.
DoorSetTimeOff(time_t x);
set the time at which the user will be out of time. to give the
user 30 minutes, DoorSetTimeOff(time(NULL) + (30L * 60L));
DoorSetProgramName(char *x);
set the name of the program. should be called before DoorInit().
DoorSetCopyRight(char *x);
set the copyright notice for the program. should be called before
DoorInit().
DoorSetNumStatLines(int x);
set the number of status lines to reserve. should be called before
DoorInit(). one line is reserved for "standard" information (time
remaining, program name, user name).
DoorSetOutOfTime((void x)(void));
set the function to be run when the user runs out of time. this
function should usually terminate the Door via exit(). the default
displays an informational message and terminates with error level
200. the function should be declared like: void myfunc(void);
DoorSetTimedOut((void x)(void));
set the function to be run when the user times out (idle). this
function should usually terminate the Door via exit(). the default
displays an informational message and terminates with error level
201. the function should be declared like: void myfunc(void);
DoorSetLostCarrier((void x)(void));
set the function to be run when carrier is lost. this function
should usually terminate the Door via exit(). the default displays
a local informational message and terminates with error level 202.
the function should be declared like: void myfunc(void);
DoorSetExtraHelp((void x)(void));
set the function to be run (if any) when the sysop requests command
line help (programname /?). the default is none; standard help
only. the function should be declared like: void myfunc(void);
DoorSetExtraStatLine((void x)(void));
set the function to be run when the status line needs updating. the
default status line will already have been refreshed. use
DoorDirectPrintf() and DoorDirectPuts() to display your extra status
line(s). the function should be declared like: void myfunc(void);
DoorSetExtraArgs((int x)(char *arg));
set the function to be run when unknown arguments are encountered
while processing the command line. the default prints an error
message and continues. the function should be declared like:
int myfunc(char *); it should return non-zero to abort the Door.
DoorSetFunctionKey(int key,(void x)(int keynum));
set the function to be run when the local sysop presses ALT plus a
function key (F1 - F10). the default is to do nothing. the
function should be declared like: void myfunc(int);
DoorSetGraphics(int x);
sets the current state of the user's ANSI graphics capability.
only 0 and 1 are valid.
DoorSetBaudVar(word x);
sets the current baud rate. setting to 0 disables carrier detection
and commport interaction. this does NOT actually change the baud
rate, just what the Door considers the baud rate to be.
DoorSetLength(int x);
sets the length of the user's screen.
DoorSetSecLevel(word x);
sets the user's security level. Doorskel doesn't use this
internally; it's for your use.
DoorSetSysopIn(int x);
set whether the sysop is in or out. Doorskel doesn't use this
internally; it's for your use. only 0 and 1 are valid.
DoorSetLogFile(char *x);
sets the name of the log file.
DoorSetUserName(char *x);
sets the name of the user.
DoorSetWidth(int x);
sets the width of the user's screen.
DoorSetNodeNumber(int x);
sets the number of the node in use (default is one) for multinode
systems. Doorskel uses this to build the name of the DORINFO?.DEF
file to read.
DoorSetUseBIOS(int x); /* MS-DOS only */
if set to a non-zero number, Doorskel performs BIOS writes where it
would normally perform direct screen writes.
DoorSetUseANSI(int x);
if set to non-zero, the ANSI sequence interpreter is turned off
locally. not much need for that...
DoorSetTabSpaces(int x);
sets the number of spaces to which the ANSI sequence interpreter
expands tabs.
DoorUseDorInfo(void);
sets whether or not Doorskel will read a DORINFO?.DEF file. note
that this is normally determined by the sysop using the door via
the command line. must be set before calling DoorInit().
DoorSetVidHandle(int x); /* OS/2 only */
set the video handle to something besides 0. would only be useful
if you were trying to use AVIO, and would have to be set before
calling DoorInit.
DoorSetSystemName(char *x);
set the system name (name of the BBS).
DoorSetSysopName(char *x);
set the sysop's name.
DoorSetDebugMode(int x);
set debug mode. only 0 and 1 are valid. this is normally set by
the sysop via the command line.
DoorSetMaxx(int x);
internal; sets the maximum x coordinate used by the ANSI
interpreter. this shouldn't be used.
DoorSetMaxy(int x);
internal; sets the maximum y coordinate used by the ANSI
interpreter. this should normally be set by using DoorSetNumStat()
before calling DoorInit().
DoorSetRealMaxx(int x);
internal; sets the real maximum x coordinate of the local screen.
Doorskel normally figures this out for itself, and this shouldn't be
used.
DoorSetRealMaxy(int x);
internal; sets the real maximum y coordinate of the local screen.
Doorskel normally figures this out for itself, and this shouldn't be
used.
DoorSetCommHandle(int x);
sets the commport number (0 == COM1, 1 == COM2) under MS-DOS, or the
commport handle under OS/2. this is normally passed by the sysop on
the command line.
DoorSetCurx(int x);
internal; sets the current x coordinate for the ANSI interpreter.
You shouldn't play with this.
DoorSetCury(int x);
internal; sets the current y coordinate for the ANSI interpreter.
You shouldn't play with this.
DoorSetCurAttr(char x);
internal; sets the current attribute used by the ANSI interpreter.
You shouldn't play with this.
DoorSetLVB(word *x);
internal; sets the current LVB (Logical Video Buffer, video RAM
under MS-DOS) location. Doorskel normally figures this out for
itself, and you shouldn't mess with it.
DoorSetLVBLen(word x);
internal; sets the length of the LVB.
DoorSetLVBMin(word x);
internal; sets the minimum changed area of the LVB.
DoorSetLVBMax(word x);
internal; sets the maximum changed area of the LVB.
DoorFlushOutLocal() flushes the area between the LVBMin and LVBMax
to the screen. no flushing is performed under MS-DOS.
char *DoorGetProgramName(void);
returns the program's name.
char *DoorGetCopyRight(void);
returns the program's copyright information.
int DoorGetNumStatLines(void);
returns the number of status lines (minimum 1, Doorskel's reserved
line).
DoorGetOutOfTime(void);
returns the function set by DoorSetOutOfTime().
DoorGetTimedOut(void);
DoorGetLostCarrier(void);
DoorGetExtraHelp(void);
DoorGetExtraStatLine(void);
DoorGetExtraArgs(void);
DoorGetFunctionKey(int key);
DoorGetGraphics(void);
DoorGetBaudVar(void);
DoorGetLength(void);
DoorGetSecLevel(void);
DoorGetSysopIn(void);
DoorGetLogFile(void);
DoorGetUserName(void);
DoorGetWidth(void);
DoorGetNodeNumber(void);
DoorGetUseBIOS(void); /* MS-DOS only */
DoorGetUseANSI(void);
DoorGetTabSpaces(void);
DoorDontUseDorInfo(void);
DoorGetVidHandle(void); /* OS/2 only */
DoorGetSystemName(void);
DoorGetSysopName(void);
DoorGetDebugMode(void);
DoorGetDorInfo(void);
DoorGetMaxx(void);
DoorGetMaxy(void);
DoorGetRealMaxx(void);
DoorGetRealMaxy(void);
DoorGetCommHandle(void);
DoorGetTimeOff(void);
DoorToggleGraphics(void);
toggles graphics mode from on to off and off to on.
DoorGetCurx(void);
DoorGetCury(void);
DoorGetCurAttr(void);
DoorGetLVB(void);
internal; returns address of Logical Video Buffer (video RAM under
MS-DOS).
DoorGetLVBLen(void);
internal; returns length of LVB.
DoorGetLVBMin(void);
internal; returns minimum changed area of LVB.
DoorGetLVBMax(void);
internal; return maximum changed area of LVB.
M. Kimes
542 Merrick
Shreveport, LA USA 71104
(318)222-3455 data
Fidonet#1:380/16.0