home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Garbo
/
Garbo.cdr
/
pc
/
opus
/
opin103d.lzh
/
OP-TYPES.TXT
< prev
next >
Wrap
Text File
|
1989-12-03
|
32KB
|
542 lines
Unit OpInt;
{*****************************************************************************}
{* *}
{* O p u s I n t e r f a c e V e r 1.03 *}
{* *}
{* Opus V 1.0x Interface for Turbo Pascal Ver 4.0, 5.0 and 5.5 *}
{* *}
{* (C) COPYRIGHT Per Holm & Bifrost Unlimited - 1988, 1989 *}
{* *}
{* FidoNet: Per Holm - Asgaard BBS 2:230/22.0 *}
{* Internet: perholm@daimi.DK *}
{* *}
{*****************************************************************************}
Interface
Uses Dos;
CONST { Some Nice helpfull constants }
_Months = 'JanFebMarAprMayJunJulAugSepOctNovDec';
TYPE
_Lines = String[81];
_StrSys = String[39];
_Str = STRING[64];
_String12 = String[12];
_String20 = String[20];
_String64 = String[64];
_String80 = String[80];
VAR
_MsgNew: Boolean; {* OLD MESSAGE TYPE OR NOT (Default True) *}
{***************************************************************************}
{* MESSAGE AND FILE AREAS *}
{***************************************************************************}
{---------------------------------------------------------------------------}
{- Area attributes ( Limit or describe the behavior of an area ) -}
{---------------------------------------------------------------------------}
CONST
SYSMAIL = $01; {* Is a mail area *}
SYSOVR = $02; {* Overwrite files is OK *}
NOPUBLIC = $04; {* OPUS: Disallow public messages *}
NOPRIVATE = $08; {* OPUS: Disallow private messages *}
ANON_OK = $10; {* OPUS: Enable anonymous messages *}
ECHOMAIL = $20; {* OPUS: Set = Echo-Mail, Clear = no echo mail *}
{---------------------------------------------------------------------------}
{- System??.BBS structure ( Don't consider the structure stable ) -}
{---------------------------------------------------------------------------}
TYPE
_Sys = RECORD {******************************************}
ls_caller : Word; {* *}
priv : Integer; {* Privilege to use this area *}
Msgpath : _StrSys; {* Path to message directory *}
Bbspath : _StrSys; {* Path to .BBS files / Barricade files *}
Hlppath : _StrSys; {* Path to help directory *}
Uplpath : _StrSys; {* Path to Upload Directory. *}
filepath : _StrSys; {* Path to download directory *}
attrib : Integer; {* Message/File Atributes (look up.) *}
ms_caller : Integer; {* *}
Quote : LongInt; {* *}
End; {******************************************}
_MSGAREA = RECORD {******************************************}
AREA: Integer; {* Area Number (0-99) *}
MSG: Integer; {* Message Number *}
END; {******************************************}
{***************************************************************************}
{* OPUS USER FILE Structure *}
{***************************************************************************}
{---------------------------------------------------------------------------}
{- User Privileges -}
{---------------------------------------------------------------------------}
CONST
Twit = -2;
Disgrace = 0;
Normal = 2;
Privil = 4;
Privileged = 4;
Extra = 6;
AsstSysOp = 8;
SysOp = 10;
Hidden = 11;
{---------------------------------------------------------------------------}
{- User Setup Flags. -}
{---------------------------------------------------------------------------}
Usr_UseLore = $08; { Use the Line Oriented Editor }
Usr_More = $10; { Want's the More Prompt }
Usr_Ansi = $20; { OPUS: User wants ANSI }
Usr_Kludge = $40; { OPUS: Opus Used before }
Usr_FormFeed = $80; { OPUS: Transmit <FF> }
MaxUserRec = 4000; { The maximum number of Records available in memory }
{---------------------------------------------------------------------------}
{- Userfile Structure -}
{---------------------------------------------------------------------------}
TYPE
_Usr = RECORD {*********************************}
Name, {* First and Last-name. *}
City:String[35]; {* City,Country. *}
Lastread:Array[1..10] of _MsgArea;{* Lastread msg# for 10 areas. *}
Password:String[15]; {* Password. *}
Calls, {* Number of calls to system. *}
HelpLevel, {* Helplevel (Nov,Reg,Exp). *}
Tabs, {* Number of spaces pr. tab. *}
Nulls, {* Number of nulls (delays). *}
LastMsgArea, {* Message area last visited. *}
Flags, {* Misc. flags for ANSI etc. *}
Privilege:integer; {* Privilege level (T,D,N,P..H) *}
LastDate:String[19]; {* Last time on system (ASCII). *}
TimeToday, {* Number of minutes used today. *}
BaudRate, {* Baudrate (Used with ^OC). *}
Upload, {* Total upload in Kbytes. *}
Download, {* Total download in Kbytes. *}
Download_Now, {* Download this session in Kb. *}
LastFileArea:integer; {* File area last visited. *}
ScreenWidth, {* Width of users monitor. *}
ScreenLength:byte; {* Hight of users monitor. *}
Credit, {* Mail-credit in cents. *}
Debit:integer; {* Mail-debit in cents. *}
End; {*********************************}
_UsrPtr = RECORD { For Use With UserFast routines }
_Ptr : ARRAY[1..MaxUserRec] OF ^__Usr;
_Recs : Integer;
END;
{***************************************************************************}
{* OPUS MESSAGE HEADER Structure *}
{***************************************************************************}
CONST
MaxTextLines = 300; {* Absolute max number of msg lines *}
MsgPrivate = $0001; { Private Messages * 0000 0000 0000 0001 }
MsgCrash = $0002; { Squirt Mail * 0000 0000 0000 0010 }
Msgread = $0004; { Read by addressee * 0000 0000 0000 0100 }
MsgSent = $0008; { Sent OK (remote) 0000 0000 0000 1000 }
MsgFile = $0010; { File Attached to message * 0000 0000 0001 0000 }
MsgFwd = $0020; { In Transit 0000 0000 0010 0000 }
MsgOrphan = $0040; { Unknown Destination Node * 0000 0000 0100 0000 }
MsgKill = $0080; { kill after bundling 0000 0000 1000 0000 }
MsgLocal = $0100; { FidoNet vs Local 0000 0001 0000 0000 }
MsgHold = $0200; { Hold Don't send * 0000 0010 0000 0000 }
MsgXX2 = $0400; { reserved X? 0000 0100 0000 0000 }
MsgFrq = $0800; { File request * 0000 1000 0000 0000 }
MsgRrq = $1000; { Receipt requested X* 0001 0000 0000 0000 }
MsgCpt = $2000; { is a return receipt X* 0010 0000 0000 0000 }
MsgArq = $4000; { Audit trail requested X* 0100 0000 0000 0000 }
MsgUrq = $8000; { Update Request X* 1000 0000 0000 0000 }
{------------------------}
{ ^ }
{ | }
{ * = Preserved by }
{ the Network }
{ ? = Stripped by the }
{ net (FTSC spec) }
{ but preserved by }
{ Seadog <TM> }
{ X = Not used by OPUS }
{------------------------}
TYPE
_MsgHead = Record
_From:String[35];
_To:String[35];
_Subj:String[71];
_Date:String[19];
_Times:Integer;
_Dest:Integer;
_Orig:Integer;
_Cost:Integer;
_OrigNet:Integer;
_DestNet:Integer;
_Written:LongInt;
_Arived:LongInt;
_Reply:Integer;
_Attr:Word;
_Up:Integer;
End;
_Msg = Record
_From:String[35];
_To:String[35];
_Subj:String[71];
_Date:String[19];
_Times:Integer;
_Dest:Integer;
_Orig:Integer;
_Cost:Integer;
_OrigNet:Integer;
_DestNet:Integer;
_Written:LongInt;
_Arived:LongInt;
_Reply:Integer;
_Attr:Word;
_Up:Integer;
Lines:ARRAY[1..MaxTextLines] OF _Lines;
NumberOfLines: Integer;
End;
_MsgRaw = Record
_From:String[35];
_To:String[35];
_Subj:String[71];
_Date:String[19];
_Times:Integer;
_Dest:Integer;
_Orig:Integer;
_Cost:Integer;
_OrigNet:Integer;
_DestNet:Integer;
_Written:LongInt;
_Arived:LongInt;
_Reply:Integer;
_Attr:Word;
_Up:Integer;
Body: Pointer;
Counter: Word;
END;
{***************************************************************************}
{* NODELIST *}
{***************************************************************************}
{* *}
{* NodeList.Sys *}
{* *}
{* NET > 0 and NODE > 0 Normal node *}
{* *}
{* NET > 0 and NODE <= 0 Host node *}
{* Net host........node== 0 *}
{* Regional host...node==-1 *}
{* Country host....node==-2 *}
{* *}
{* NET == -1 Nodelist.Sys revision *}
{* *}
{* NET == -2 Nodelist statement *}
{* *}
{***************************************************************************}
{---------------------------------------------------------------------------}
{- NODE Old style (Nodelist Version 5) -}
{---------------------------------------------------------------------------}
_Node = RECORD
Number: Integer; { Node number }
Net: Integer; { Net Number }
Cost: Integer; { cost of a message to this node }
Rate: Integer; { Baud rate }
Name: STRING[19]; { Node Name }
Phone: STRING[39]; { Phone Number }
City: STRING[39]; { City and State }
Password: STRING[6]; { Password String }
END;
CONST
{---------------------------------------------------------------------------}
{- Values for the `NodeFlags' field (Version 6 Nodelist, Binkley version) -}
{---------------------------------------------------------------------------}
B_hub = $0001; { node is a net hub 0000 0000 0000 0001 }
B_host = $0002; { node is a net host 0000 0000 0000 0010 }
B_region = $0004; { node is region coord 0000 0000 0000 0100 }
B_zone = $0008; { node is a zone coord 0000 0000 0000 1000 }
B_CM = $0010; { runs continuous mail 0000 0000 0001 0000 }
B_ores1 = $0020; { reserved for Opus 0000 0000 0010 0000 }
B_ores2 = $0040; { reserved for Opus 0000 0000 0100 0000 }
B_ores3 = $0080; { reserved for Opus 0000 0000 1000 0000 }
B_ores4 = $0100; { reserved for Opus 0000 0001 0000 0000 }
B_ores5 = $0200; { reserved for Opus 0000 0010 0000 0000 }
B_res1 = $0400; { reserved for non-Opus 0000 0100 0000 0000 }
B_res2 = $0800; { reserved for non-Opus 0000 1000 0000 0000 }
B_res3 = $1000; { reserved for non-Opus 0001 0000 0000 0000 }
B_res4 = $2000; { reserved for non-Opus 0010 0000 0000 0000 }
B_res5 = $4000; { reserved for non-Opus 0100 0000 0000 0000 }
B_res6 = $8000; { reserved for non-Opus 1000 0000 0000 0000 }
{---------------------------------------------------------------------------}
{- NODE New style (Nodelist Version 6) (Stolen from Binkley) -}
{---------------------------------------------------------------------------}
TYPE
_NewNode = RECORD
Number: Word; { Node number }
Net: Word; { Net Number }
Cost: Word; { cost of a message to this node }
Rate: Integer; { Baud rate }
Name: STRING[33]; { Node Name }
Phone: STRING[39]; { Phone Number }
City: STRING[29]; { City and State }
Password: STRING[8]; { Password String }
RealCost: Word; { Phone company's charge }
HubNode: Word; { node # of this node's hub or 0 if none }
ModemType: Byte; { RESERVED for Modem Type }
NodeFlags: Word; { Set of flags (See above) }
END;
{---------------------------------------------------------------------------}
{- Nodelist.Idx File is terminated by EOF -}
{---------------------------------------------------------------------------}
_ndi = Record
Node: INTEGER; { Node Number }
Net: INTEGER; { Net Number }
END;
{***************************************************************************}
{* OPUS CONTROL FILE AND PARM FILE DECLARATIONS *}
{*************************************************************************-*}
CONST
CTL_VERSION=14; { OPUS Control file version }
MAX_EXTERN=8; { Max external programs }
MAXCLASS=12; { Number of possible priv levels }
{---------------------------------------------------------------------------}
{- Multitaskers (possible values for 'ctl.multitasker' 0 = no multask -}
{---------------------------------------------------------------------------}
DoubleDos = 1;
DesqView = 2;
TopView = 3;
TaskView = 4;
MsWindows = 5;
{---------------------------------------------------------------------------}
{- Matrix Mask Undefined bits are reserved for OPUS -}
{---------------------------------------------------------------------------}
No_Traffic = $0001; { OK to send outbound lokal 0000 0000 0000 0001 }
Local_Only = $0002; { ok to send Outbound local 0000 0000 0000 0010 }
Opus_Only = $0002; { only send to #CM systems 0000 0000 0000 0100 }
No_Exits = $2000; { Crash/Arc exits ignored 0010 0000 0000 0000 }
Mail_Only = $4000; { no human callers allowed 0100 0000 0000 0000 }
Take_Req = $8000; { File requests are OK 1000 0000 0000 0000 }
{---------------------------------------------------------------------------}
{- Flags -}
{---------------------------------------------------------------------------}
Logecho = $0001; { Log echoMail areas. 0000 0000 0000 0001 }
Steady = $0002; { never change baudrate 0000 0000 0000 0010 }
MatrixScan = $0004; { Matrix Scan Echo Areas 0000 0000 0000 0100 }
TYPE
{---------------------------------------------------------------------------}
{- Information about a class of users. (Unstable Structure) -}
{---------------------------------------------------------------------------}
_ClassRec = RECORD
Priv: INTEGER;
Max_Time: INTEGER; { Max cume time per day }
Max_Call: INTEGER; { Max time for one call }
Max_DL: INTEGER; { Max download bytes per day }
Ratio: WORD; { ul:dl ratio }
Min_Baud: WORD; { Speed needed for logon }
Min_File_Baud: WORD; { Speed needed for xfer }
END;
{---------------------------------------------------------------------------}
{- The structure of a PRM file (Unstable Structure) -}
{- -}
{- Please notice the Version Number at offset zero. -}
{---------------------------------------------------------------------------}
_Prm = RECORD
Version: BYTE; { For Safety }
TestMode: BYTE; { Input From KeyBoard, Not Modem }
{-} TotalCallers: LongInt; { Total Number of callers to system }
{-} QuotePosition: LongInt; { Last position in Quote file }
Multitasker: BYTE; { Multitasker Type See up Front }
Snooping: BYTE; { Local Monitor Active }
EditExit: BYTE; { 1= Use newuser questionaire }
Verbose: BYTE; { Wordy SysOp Log }
Terse: BYTE; { Brief SysOp Log }
Trace: BYTE; { Log trace mode }
ShowAreaPath: BYTE; { use path not DIR.BBS }
TaskNum: BYTE; { Task number for multitask Systems }
ExitVal: BYTE; { ERRORLEVEL to use after caller }
ValOutside: BYTE; { ERRORLEVEL for O)utside }
ValZero: BYTE; { ERRORLEVEL for SysOp O) command }
NoCrashmail: BYTE; { 1= Don't accept Crashmail }
AutoKill: BYTE; { RECD PVT msgs. 0=no, 1=ask, 2=yes }
CrashExit: BYTE; { non zere = Errorlevel exit }
UnpackArc: BYTE; { 1= Unpack incomming arcmail }
TossEcho: BYTE; { 1=Toss incomming echomail }
ArcExit: BYTE; { ERRORLEVEL for after rec. arcmail }
UseDTR: BYTE; { 1 = DROP dtr look busy,0 off hook }
CarrierMask: INTEGER; { }
HandshakeMask: INTEGER; { }
CtlaPriv: INTEGER; { Privil to se ^A lines in msgs }
MaxBaud: INTEGER; { Fastest speed we can use }
MinBaud: INTEGER; { Min baud rate to get online }
SpeedGraphics: INTEGER; { Min Baud for graphics }
ComPort:INTEGER; { 0=COM1, 1=COM2 ... }
LogonPriv:INTEGER; { Accesslevel for new users }
DateStyle: INTEGER; { Used for files.BBS display }
SeenPriv: INTEGER; { Minimum priv to see SEEN-BY line }
MsgAsk: ARRAY[1..16] OF INTEGER; { Array of Privs. for }
{ Massage attr ask's }
MsgAssume: ARRAY[1..16] OF INTEGER; { Array of Privs. for }
{ Massage attr assumes }
MsgFromfile:INTEGER; { Priv for doing msg from file }
WatchDog: BYTE; { 1=set Fossil to reboot during Out }
Video: BYTE; { 0=DOS, 1=FOSSIL, 2=IBM }
{-} Filler: ARRAY[1..11] OF BYTE;
EchoExit: BYTE; { Errorlevel after Echo Edit }
Flags: BYTE; { Flags def up front }
OurZone: WORD; { The current Zone }
MatrixMask: WORD; { Look Up Front }
_ClassRec: ARRAY[1..MAXCLASS] OF Class_Rec; { Class Records }
Alias: ARRAY[1..15] OF _ndi; { Node Numbers / Aliasses }
MInit: _Str; { Modem init string }
PreDial: _Str; { dial prefix sent before number }
PostDial: _Str; { Sent after number }
TimeFormat: _Str; { Look in BBS.CTL file }
DateFormat: _Str; { Look in BBS.CTL file }
FkeyPath: _Str; { Path to f-key files }
ParmOutside: _Str; { Prog/Parms for outside file }
ParmZero: _Str; { Parm for sysop O) command }
SysPath: _Str; { Path to system??.BBS files }
UserFile: _Str; { Path/filename to User.BBS file }
NetInfo: _Str; { Path to nodelist }
SchedName: _Str; { Name of SCHED FILE }
Logo: _Str; { First file shown to caller }
Welcome: _Str; { Shown after logon }
Bulletin: _Str; { Shown after Welcome file }
Edtorial: _Str; { Edtorial Menu file }
Quote: _Str; { File containing Quotes }
Question: _Str; { Questionaire available main menu }
RequestList: _Str; { List of files approved for f.req }
Newuser1: _Str; { Shown before new user enters PW }
Newuser2: _Str; { Shown after new user enters Passw}
Rookie: _Str; { Shown too rookies after Pasword }
Application: _Str; { New user questionaire }
AvailList: _Str; { File List FILES (f.req) }
HlpEditor: _Str; { Intro to msg editor }
HlpReplace: _Str; { Explain MSG editor E)dit command }
MsgInquire: _Str; { Explain MSG I)nquire command }
HlpLocate: _Str; { Explain File L)ocate command }
HlpContents: _Str; { Explain the files contents comm }
OutLeaving: _Str; { Bon Voyage a l'outside }
OutReturn: _Str; { Welcome back from outside }
DayLimit: _Str; { Sorry, You've been to long.... }
TimeWarn: _Str; { Warning about forced hangup }
SysOp: _Str; { SysOp's name }
TooSlow: _Str; { Explains min logon baud. }
Xferbaud: _Str; { Explains min file transf baud }
MsgAreaList: _Str; { Dump file instead of DIR.BBS }
FileAreaList: _Str; { Dump file instead of Dir.BBS }
MailListFile: _Str; { Default nodelist file }
ByeBye: _Str; { Displayed at logoff }
FileProt1: _Str; { Some external file protocols }
FileProt2: _Str;
FileProt3: _Str;
FileProt4: _Str;
FileProt5: _Str;
FileProt6: _Str;
FileProt7: _Str;
FileProt8: _Str;
LocalEditor: _Str; { SysOps Local Editor }
FileMgt: _Str; { External File Section Management }
HoldArea: _Str; { Path to Outbound area }
Barricade: _Str;
Badaccess: _Str;
MsgMgt: _Str; { External Message section mgt }
MailPath: _Str; { Path to inbound bundles (MATRIX) }
FilePath: _Str; { Path for inbound matrix files }
OpedHelp: _Str; { OpEd help file }
TempPath: _Str; { Place to put temporary files }
ModemBusy: _Str; { Modem Busy String }
SystemName: _Str; { System name string }
AboutFile: _Str; { System Info file (About File) }
LogName: _Str; { Log File Name }
END;
{***************************************************************************}
{* OPUS SCHEDule file Structure *}
{***************************************************************************}
CONST
MaxScheds = 35; {* Maximum number of events *}
ExtEvent = 'X'; {* External event (return to Dos) *}
YellEvent = 'Y'; {* Yell event (when yell is on) *}
ForceEvent = $0001; {* Force this event. *}
CleanHold = $0001; {* This Z-Event is a house cleaning event *}
TYPE
_Sched = Record
Year: Word; {* Usable but doesn't make much sense *}
Month: Word; {* Month of the current event *}
Day: Word; {* Day of the Month *}
DayWk: Word; {* Day of the week 0=Sun, 6=Sat, 7=all. *}
Hour: Word; {* 0..23 Starting hour *}
Min: Word; {* 0..59 Starting minute *}
Sec: Word; {* Unused *}
Len: Word; {* Length of the event *}
Enable: Integer; {* 1= enabled *}
Trigger: Word; {* Unknown/Unused *}
Result: Word; {* X errorlevel, Y duration of Bell *}
Tag: Char; {* Event Type 'A' .. 'Z' *}
Junk_1: Byte; {* Dummy *}
Last_ran: Word; {* Day of month when event was executed last *}
B: Word; {* Reserved for OPUS *}
C: Word; {* Reserved for external utilities *}
Behavior: Word; {* Behavior of Z events. See tabble earlier *}
EventMask: Byte; {* Force this event *}
GMT: Byte; {* Set = GMT, Clear = Local time *}
END;
{---------------------------------------------------------------------------}
{- Z-Event Behavior... -}
{- IF RESULT = 1, The 'behavior' field contains a "Matrix Mask". Those -}
{- are described in the PRM definations. -}
{- IF RESULT = 2, It is an internal hausecleaning event. -}
{---------------------------------------------------------------------------}
_Scheds = ARRAY[1..MaxScheds] OF _Sched;