home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C!T ROM 2
/
ctrom_ii_b.zip
/
ctrom_ii_b
/
PROGRAM
/
PASCAL
/
CUNIT_20
/
COMUNIT.REF
< prev
Wrap
Text File
|
1992-03-18
|
5KB
|
104 lines
(*************************************************************************
INTERFACE for the best DOOR unit every assembled!
Copyright (c) 1991-1992 Harms Software Engineering, all rights reserved.
This is ONLY the beta version. Please DO NOT spread this unit around!
*************************************************************************)
INTERFACE
Type CharSet = Set of Char;
UserRec = Record
Name: String[35]; { Name of the User online }
City: String[25]; { City where User lives }
TimeLeft: word; { Time user has left }
TimeOut : byte; { Inactivity time for user }
Ansi : Boolean; { Does the user support ANSI}
end;
var Port : byte; {comm port 0-3}
Baud : word; {current connect speed}
Online : boolean; {whether it's a local/remote login}
Mstatus : word; {Modem status, word}
Foreground: byte; {foreground color, so you can check and change...}
Background: byte; {background color so you can check and change...}
Stop : Boolean; {variable used for some stop procedures.}
ModemOnly : Boolean; {If True then output will only be sent to
the modem!}
SysopName : String; {Name of the System Operator}
ShowStatWin: Boolean;
User : UserRec;
Procedure Send(s: string); {modem equivalent of write}
Procedure SendLn(s: string); {modem equivalent of writeln}
Procedure ReadStr(var s : string;
len: byte); {read a string with max length = len}
Procedure ReadInt(var int: word;
len: byte); {read a word with max number of chars = len}
Procedure EditStr(var s : string;
len: byte); {edit a string with max length = len,
if the string s has a length > len then
len := length(s) !! }
Procedure PortColor(f: byte); {modem equivalent of textcolor}
Procedure PortBackGround(b: byte);{modem equivalent of textbackground}
Procedure ClrPortScr; {modem equivalent of clrscr}
Procedure ClrPortEol; {modem equivalent of clreol}
Procedure AutoAnsiDetect; {detect if remote has User.Ansi support}
Procedure PurgeInBuffer; {purge input buffer}
Procedure PortXY(x,y: byte); {modem equivalent of gotoXY}
Procedure DisplayFile(Fname: string;
StopKeys: CharSet;
PauseKeys: CharSet;
Var Ch : Char);
{display a file with hotkeys in set HotKeys}
Function WaitChar(Cset: CharSet): Char;
{waits till a key has been pressed in
Cset and returns that key}
Procedure InitTimes; {you MUST run this after assign the
User.TimeLeft, and User.TimeOut variables in order
for the unit to start counting down...}
Function PortX: byte; {modem equivalent of wherex}
Function PortY: byte; {modem equivalent of wherey}
Function ReadChar: Char; {modem equivalent of readch}
Function GetStatus: word; {returns modem status}
Function PortKeyPressed: Boolean;{modem equivalent of keypressed}
Procedure ResetCounter(num: byte;Col: byte);
{reset line counter to num lines
and with prompt color = col}
Procedure StopCounter; {stop the line counter.}
Procedure HangUp; {Hang up the modem!}
{Other helpfull functions and procedures}
Function Ms(l: longint): string; {convert a word to a string fast}
Function Rep(Ch: char;b: byte): string;
{Return a string with filled with Ch and
with length b}
Function UprCase(s: string): string;
{convert a string to uprcase}
Procedure Trim(var s: string); {Trim all leading and trailing #0 and #32}
Function Byte_Set(b,bit: byte): Boolean;
{Checks to see if bit is set in b}
Function Lz(w: word): String; {Aka Leading Zero, adds a 0 before one digit
numbers, handy for dates!}
Procedure Chat(Full: Boolean); {Full refers to FULL screen or normal
move}
Procedure ShowSysopStatWin; {show sysop status window}
{This option isn't really finished yet, but
the part that is done works...}
Procedure Delay(Num: byte); {A replacement for the Delay in the CRT
unit. This Delay works with seconds, and
it works in and outside of DV}
*************************************************************************)