{ ROSDEF.INC - Remote Operating System Definitions } const version = 'ROS v3.3'; ver_date = '8/25/85'; { User settable constants } def_acc = 10; { Default access level } def_time = 20; { Default time limit } val_acc = 20; { Access level for validated users } val_time = 45; { Time limit for validated users } ChatStart = 19; { Chat hours } ChatEnd = 22; columns = 4; { Columns in directory } fence = '|'; { Character between directory columns } unv_days = 14; { Days to retain unvalidated user } val_days = 180; { Days to retain validated user } Max_Tries = 3; { Max number of tries for password } DispLines = 23; { Lines to display before pausing } lps = 1252.0 ; { Loops per second } BufBlocks = 1; { Blocks in transfer buffer } BufSize = 128; { Bytes in transfer buffer } { File names } user_data = 'USERDAT'; { User data } user_indx = 'USERIDX'; { Index to user data } logr_name = 'LOG'; { Log file } mesg_name = 'MESSAGE'; { Messages } summ_name = 'SUMMARY'; { Summaries } sysm_name = 'SYSMSG'; { System messages } sect_name = 'SECTION'; { Section names } stat_name = 'STATS'; { Statistics } nwin_name = 'NEWIN'; { New uploads list } ext = '.BB#'; { File type } { ASCII constants } NUL = #$00; SOH = #$01; ETX = #$03; EOT = #$04; ACK = #$06; BEL = #$07; BS = #$08; TAB = #$09; LF = #$0A; FF = #$0C; CR = #$0D; DC1 = #$11; { XON } DC3 = #$13; { XOFF } NAK = #$15; CAN = #$18; ESC = #$1B; RUB = #$7F; { Turbo Toolbox constants } MaxDataRecSize = 83; { max record Size } MaxKeyLen = 26; { max key Size } PageSize = 16; { page Size } Order = 8; { half page Size } PageStackSize = 5; { page buffer Size } MaxHeight = 5; { max B-tree height } { CP/M-80 constants } seldrive = 14; { BDOS drive select } findfirst = 17; { BDOS search for first file } findnext = 18; { BDOS search for next file } getdrive = 25; { BDOS get default drive } setdma = 26; { BDOS set DMA buffer address } getallocvec = 27; { BDOS get allocation vector } getdiskparm = 31; { BDOS get disk parameters } getseluser = 32; { BDOS get/select user area } fcb = $80; { Default DMA buffer address } { ROS constants } mesg_pub = -1; { public message flag } mesg_era = -2; { erased message flag } len_fn = 10; { length of firstname } len_ln = 15; { length of lastname } len_name = 25; { sum of above } len_ad = 20; { length of address } len_pw = 10; { length of password } len_subj = 56; { length of subject } len_msg = 72; { length of message } message_mode = 1; files_mode = 2; utility_mode = 3; sysop_mode = 4; pr_msg : array[1..4] of string[7] = ('Message', 'Files', 'Utility', 'Sysop'); rep_msg : array[1..4] of string[105] = ('ChangeEnterFilesGoodbyeKillQuick-scanReadSummaryUtilityInfoOthers', 'ChangeDirectoryFilesizeGoodbyeLibraryMessageNewinReceiveSendTypeUtility', 'AlterChatFilesGoodbyeMessageStatsTimeUsers', 'AssignAuditDeleteEditFilesGoodbyeIndexKrunchLogMessageNewinMacroPurgeReadSys_dirToggleUtilityValidate'); type Str3 = string[3]; Str10 = string[10]; FileName = string[14]; { d:filename.ext } StrTAD = string[30]; StrPr = string[50]; StrStd = string[80]; StrPrint = string[132]; StrName = string[len_name]; firstname = string[len_fn]; lastname = string[len_ln]; address = string[len_ad]; password = string[len_pw]; subject = string[len_subj]; message = string[len_msg]; tad_array = array[0..5] of byte; name_array = array[1..11] of byte; untype_file = file; SysmPtr = ^SysmRecord; SysmRecord = record key : char; { Key value } loc : integer; { Location of record in file } next : SysmPtr { Pointer to next element on list } end; MesgPtr = ^MesgRecord; MesgRecord = record MesgNo, { Message number } SummLoc : integer; { Summary index } TypMsg : byte; { Message type } next : MesgPtr { Pointer to next element on list } end; FilePtr = ^FileRecord; FileRecord = record fname : FileName; { Name of a matching file } index, { Libraries only: location of file } fsize : integer; { Size of file } next : FilePtr { Pointer to next element on list } end; SectPtr = ^SectRecord; SectRecord = record SectDrive, { Drive } SectUser, { User area } SectAccs : integer; { Access level required } SectName : Str10; { Section name } SectDesc : string[50]; { Description } next : SectPtr { Pointer to next element on list } end; AreaPtr = ^AreaRecord; AreaRecord = record Area, { Area number } AreaAccs : integer; { Access level required } AreaName : Str10; { Message area name } AreaDesc : string[50]; { Description } next : AreaPtr { Pointer to next element on list } end; FileBlock = record drive : byte; { Byte code } fname : name_array; { File name } extent, { Current extent } s1, s2, reccount: byte; { Used to compute file size } map : array[16..31] of byte { Data map } end; EntryBlock = record status : byte; fname : name_array; index, fsize, CRC, CreationDate, LastChangeDate, CreationTime, LastChangeTime: integer; PadCount : byte; filler : array[27..31] of byte end; user_list = record used : integer; { 2 } fn : firstname; { 11 } ln : lastname; { 16 } ad : address; { 21 } pw : password; { 11 } access : byte; { 1 } help_level : byte; { 1 } reserved : byte; { 1 } limit : byte; { 1 } upload : integer; { 2 } download : integer; { 2 } nulls : byte; { 1 } case_sw : boolean; { 1 } laston : tad_array; { 6 } lasthi : integer; { 2 } time_today : integer; { 2 } time_total : integer { 2 } end; logr_list = record time_stamp : tad_array; action : byte; user : integer; text : FileName end; summ_list = record summ_area : byte; summ_num : integer; summ_date : tad_array; summ_from_num, summ_to_num: integer; summ_subject: subject; summ_st_rec, summ_size : integer end; stat_list = record t : tad_array; users_per_hour: array[0..23] of integer; users_per_day : array[0..6] of integer; busy_per_hour : array[0..23] of integer; busy_per_day : array[0..6] of integer end; nwin_list = record status : byte; name : FileName; t : tad_array; user : integer; descr : StrPr end; sysm_list = StrStd; mesg_list = message; var { System message global } SysmBase : SysmPtr; { Start of linked list } { Section globals } SectBase : SectPtr; { Start of linked list } SectReq : Str10; { Section name } { Message area globals } AreaBase : AreaPtr; { Start of linked list } AreaReq : Str10; { Message area name } AreaSet : integer; { Current message area } { Directory globals } DirBase : FilePtr; { Start of linked list } DirEntries, { Count of directory entries } DirSpace : integer; { Disk space used } { Library globals } LibBase : FilePtr; { Start of linked list } LibEntries, { Count of library entries } LibSpace : integer; { Space used } LibReq : FileName; { Library name } { Message system globals } msg_all, { Public message count } msg_ind, { Private message count } msg_aut, { Authored message count } msg_sys, { Sysop viewable message count } msg_hi : integer; { High message number } MesgBase, MesgLast, MesgCurr: MesgPtr; { Pointers } { System globals } cold, { Cold start } delay_down, { Shutdown between users } op_chat, { Operator requested chat } fini, { Finished with ROS } in_use, { Successful login } remote_online, { Remote use allowed } local_online, { Local use allowed } local_copy, { Console display } remote_copy, { Remote display } printer_copy, { Printer display } audit_on, { Audit file enabled } noisy, { Prompt bell enable } up_down_display, { Up/download display } st_switch, { Size/time switch } new_dir, { New section or library selected } area_assign, { Message area reassignment switch } in_library : boolean; { Library/section switch } ch : char; { Input character } HomDrv, HomUsr, { Default drive/user } RcvDrv, RcvUsr, { Upload drive/user } SetDrv, SetUsr, { User selected drive/user } user_loc, { Location in data file of user record } time_on, time_left, extra_time, { Timers } timeout, mode, { Current mode of operation } macro_ptr, free_space, { Space remaining on current drive } rate : integer; { Current bps rate } st, macro : StrPr; { Automatic 'keyboard' input } next_inpstr : StrStd; { Input string - used for word wrap } login_t : tad_array; { Login time } Buffer: array[1..BufSize] of byte; { Transfer buffer } { Files } user_rec : user_list; sysm_rec : sysm_list; sysm_file : file of sysm_list; summ_rec : summ_list; summ_file : file of summ_list; mesg_rec : mesg_list; mesg_file : file of mesg_list; logr_rec : logr_list; logr_file : file of logr_list; stat_rec : stat_list; stat_file : file of stat_list; nwin_rec : nwin_list; nwin_file : file of nwin_list; libr_file : file; AuditFile : text;