home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
PROG_GEN
/
BBSKIT31.ZIP
/
ADDENDUM.DOC
next >
Wrap
Text File
|
1994-01-06
|
8KB
|
153 lines
ADDENDUM TO THE BBSKIT DOCUMENTATION
====================================
This file contains information on the changes to the BBSkit
distribution since version 3.0. The hardcopy manual has not been updated
since 3.0, so any changes have been noted here.
NEW IN 3.1
----------
BBSKIT.PAS: HandleParseKey() [ New ]
SetParseDelimiter() [ New ]
TypeFileParseLine() [ Removed ]
TypeTextFile() [ New ]
These methods now have more flexible control over how parsing
is accomplished with BBSkit. 3.0 introduced parsing and
required that the programmer create his/her own method to do
everything involved with typing a file -- this is cumbersome
and can be avoided. The new method requires that all keywords
in a parsed file be surrounded by the same delimiting
character. For example, #USERNAME#.
FUNCTION TBBS.HandleParseKey(Key : String) : String; VIRTUAL;
Handles the actual parsing of a keyword. The parameter Key is
a string containing the uppercase text between the two
delimiter characters. '#USERNAME#' and '#username#' would
both be passed in Key as simply 'USERNAME'. Inside this
routine you will just have if..then constructs for each of
your valid keys, and return the string to substitute for each
key. If a key performs an action instead of substituting a
string, just return an empty string.
This function IS recursive. That is, you can return a value
for a keyword which is in itself another keyword, and it will
be translated. So be careful, unless you really want to do
this.
PROCEDURE TBBS.SetParseDelimiter(Ch : Char);
Sets the character which delimits a parser keyword. The
default is a pound sign (#).
PROCEDURE TBBS.TypeTextFile(F : Text);
This is the 3.0 method TypeRestOfFile under a new name. The
reason for the name change is to distinguish it from
TypeFile(), which reads in blocks of 255 characters instead of
on a line-by-line basis. If you are using ANSI, use
TypeFile(). If you are using parsed files, use
TypeTextFile(). You can mix the two (use parsed text in an
ANSI file) and send it through TypeFile(), however be warned
that there is the possibility that a keyword will span two
blocks read from disk. In these cases, the keyword will NOT
be parsed.
Note: you still have to manually open and close the text file
sent to TypeTextFile() so it still provides the same
functionality of the older method.
BBSKIT.PAS: SendBreak() [ New ]
BBSkit now implements its own SendBreak() procedure which
avoids calling the DOS unit's Delay() procedure. This keeps
the multithreading going, and permits breaks on more than one
port at a time.
COMM.PAS: TDriverInfo type [ New ]
GetDriverInfo() [ New ]
SetPortRoutines() [ New ]
You can now define which set of comm routines that a specified
port will make use of. You can use either the internal
assembler routines, or an external FOSSIL driver. You can
also mix and match these routines on a port-by-port basis.
TDriverInfo type
Defines a type returned by a FOSSIL driver for statistics on a
port. Also returns some information about the FOSSIL driver
itself, the sizes of the buffers, and other miscellaneous
information.
PROCEDURE GetDriverInfo(PortIdx : Byte; var Info : TDriverInfo)
Gets information on a port. Returns a string describing the
current serial driver routines, and some information on the
routines in use. FOSSIL drivers return a construct exactly in
the form of the TDriverInfo type, while the internal routines
return everything EXCEPT the screen height & width, and the
current bps rate of the port.
PROCEDURE SetPortRoutines(PortIdx, Routines : Byte)
Defines which set of routines to use for a given port. This
procedure MUST be called prior to initializing the port, or it
will simply return without doing anything. Legal values are
FOSSIL or INTERNAL.
COMM.PAS: ReceiveBufferUsed() [ New ]
SendBufferUsed() [ New ]
Two new procedures which isolate the programmer from the
internal structures used by the assembler routines. Use these
to find out how much space has been used for a given buffer,
instead of peeking directly into the record variable.
Continues to make the line between the driver layer and the
application layer of your program a little more fine. These
routines do not care which set of routines you are using -- so
use them instead of hardcoding peeks at memory (which would
fail if you ever decided to switch to a FOSSIL driver anyway).
COMM.PAS: FOSSIL support [ New ]
FOSSIL support is now implemented for every necessary routine
in the Comm unit. Routines which are not supported using the
FOSSIL routines are:
ClearPort() SetFlowLimits()
ClearToSend() SetInactiveLimit()
DataTerminalReady() SetParity()
DetectPort() SetRTS()
LineRinging() SetSoftHandshake()
Parity() SetStopBits()
SetBreakClearBuffer() SetWordLength()
SetClearBufferChar() StopBits()
SetFIFO() WaitForRingTrailer()
SetFIFOTrigger() WordLength()
Additionally, some routines have slightly different behaviors
when used with a FOSSIL driver:
DetectUART() returns 'FOSSIL' when a FOSSIL driver is used.
SetBps() automatically sets 8 data bits, no parity, and 1
stop bit. Supported bps values are 300, 600, 1200, 2400,
4800, 9600, 19200, and 38400 only.
VC.PAS: PeekKeyboard() [ New ]
Returns the next key in a VC's keybuffer without removing it.
This fixes a bug which would rarely allow a TypeFile() to be
interrupted.
VC.PAS: GotoVC() [ New ]
Allows a program to switch to another virtual console without
operator intervention at the next iteration of the system
task. The index of the VC must be in the range of 1 to 10, or
else it is ignored.