home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-09-26 | 63.7 KB | 1,888 lines |
-
- !short ASYNC UNIT
-
- This unit interfaces directly with the UART 8250, 16540 or 16550.
- Therefore it is highly platform dependent.
- It has been written so, that it might be emulated easily on
- other platforms. Do use the same functions and parameters, and
- dependents from this unit continue to function normally.
-
-
- !short contants used
- const { 8086/8088 hardware flags }
- ff = 12; { form feed } cr = 13; { carriage return }
- dle = 16; { data link esc. } xon = 17; { xon }
- xoff = 19; { xoff } sub = 26; { end of file }
- esc = 27; { escape } del = 127; { delete }
- fk_cr : char = '|'; { function key definition cr }
- fk_delay : char = '~'; { function key def. 1 second wait }
- fk_wait_for : char = '`'; { function key wait for next char }
- fk_ctrl_mark : char = '^'; { marks next char as ctrl character }
- fk_script_ch : char = '@'; { script to execute follows }
- fk_delay_time : integer = 10; { delay to insert between each char }
- bs_string : string = ^h; { string to send when back space hit}
- ctrl_bs_string : string = #127; { string to send when ctrl bs hit }
-
- half_second_delay = 500; one_second_delay = 1000;
- two_second_delay = 2000; three_second_delay = 3000;
- tenth_of_a_second_delay = 100; on = true; off = false;
-
- data_bits : 5..8 = 8; parity : char = 'N';
- stop_bits : 0..2 = 1; comm_port : 1..4 = 1;
- baud_rate : 110..38400 = 2400; cmd_line_port : 0..4 = 0;
-
- n_baud_rates = 11;
- baud_rates: array[ 1 .. n_baud_rates ] of word = (
- 110, 150, 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600
- );
-
- modem_init : string = 'ATZ|~ATX1|';
- modem_dial : string[30] = 'ATDT';
- modem_dial_end : string[30] = '|';
- modem_busy : string[30] = 'BUSY';
- modem_connect : string[30] = 'CONNECT';
- modem_no_carrier : string[30] = 'NO CARRIER';
- modem_escape : string[30] = '+++';
- modem_escape_time : integer = 1500;
- modem_hang_up : string[30] = 'ATH0|';
- modem_time_out : longint = 60;
- modem_redial_delay : longint = 45;
- modem_answer : string[30] = 'ATA|';
- modem_host_set : string = 'ATZ|~ATX1|~ATS0=1|';
- modem_host_unset : string = 'ATZ|~ATX1|~ATS0=0|';
- modem_command_delay : integer = 10;
- modem_carrier_high : boolean = false;
- modem_ring : string[30] = 'RING';
- host_auto_baud : boolean = true;
- modem_hold_line : boolean = false;
-
- { communications hardware addresses }
- { these are specific to IBM PCs and Close compatibles. }
- uart_thr = $00; { offset from base of uart registers for ibm pc }
- uart_rbr = $00; uart_ier = $01; uart_iir = $02; uart_lcr = $03;
- uart_mcr = $04; uart_lsr = $05; uart_msr = $06;
-
- i8088_imr = $21; { port address of the interrupt mask register }
-
- com1_base = $03f8; { port addresses for the uart }
- com2_base = $02f8; com3_base = $03e8; com4_base = $02e8;
- com1_irq = 4; { interrupt line for the uart }
- com2_irq = 3; com3_irq = 4; com4_irq = 3;
- com1_int = $0c; { interrupt number for the uart }
- com2_int = $0b; com3_int = $0c; com4_int = $0b;
-
- rs232_base = $0400 { address of rs 232 com port pointer };
- maxcomports = 4 { four ports allowed by this code };
- { port addresses of each com port }
- default_com_base : array[1..maxcomports] of word =
- ( com1_base, com2_base, com3_base, com4_base );
- { irq line for each port }
- default_com_irq : array[1..maxcomports] of integer =
- ( com1_irq, com2_irq, com3_irq, com4_irq );
- { interrupt for each port }
- default_com_int : array[1..maxcomports] of integer =
- ( com1_int, com2_int, com3_int, com4_int );
-
- {──────────────────────────────────────────────────────────────────────────}
- { }
- { communications buffer variables }
- { }
- { the communications buffers are implemented as circular (ring) }
- { buffers, or double-ended queues. the asynchronous i/o routines }
- { enter characters in the receive buffer as they arrive at the }
- { serial port. higher-level routines may extract characters from }
- { the receive buffer at leisure. higher-level routines insert }
- { characters into the send buffer. the asynchronous i/o routines }
- { then send characters out the serial port when possible. }
- { }
- {──────────────────────────────────────────────────────────────────────────}
-
- timeout = 256; { timeout value }
- async_xon = ^Q; { xon character }
- async_xoff = ^S; { xoff character }
- async_overrun_error = 2; { overrun }
- async_parity_error = 4; { parity error }
- async_framing_error = 8; { framing error }
- async_break_found = 16; { break interrupt }
- async_cts = $10; { clear to send }
- async_rts = $20; { request to send }
- async_dsr = $20; { data set ready }
- async_dtr = $10; { data terminal ready }
- async_rtsdtr = $30; { rts + dtr }
-
-
- type { i/o buffer type for serial port }
- async_buffer_type = array[0..1] of char;
- async_ptr = ^async_buffer_type;
-
- var { port addresses for serial ports }
- com_base : array[1..maxcomports] of word;
- { irq line for each serial port }
- com_irq : array[1..maxcomports] of integer;
- { interrupt for each serial port }
- com_int : array[1..maxcomports] of integer;
- async_buffer_ptr : async_ptr; { input buffer address }
- async_obuffer_ptr : async_ptr; { output buffer address }
- async_open_flag : boolean; { true if port opened }
- async_port : integer; { current open port number (1 ── 4) }
- async_base : integer; { base for current open port }
- async_irq : integer; { irq for current open port }
- async_int : integer; { interrupt # for current port }
- async_rs232 : integer; { rs232 address for current port }
- async_buffer_overflow : boolean; { true if buffer overflow's happened }
- async_buffer_used : integer; { amount of input buffer used so far }
- async_maxbufferused : integer; { maximum amount of input buffer used }
- { async_buffer empty if head = tail }
- async_buffer_head : integer; { loc in async_buf to put next char }
- async_buffer_tail : integer; { loc in async_buf to get next char }
- async_buffer_newtail : integer; { for updating tail value }
- async_obuffer_overflow : boolean; { true if buffer overflow's happened }
- async_obuffer_used : integer; { amount of output buffer used }
- async_maxobufferused : integer; { max amount of output buffer used }
- { async_buffer empty if head = tail }
- async_obuffer_head : integer; { loc in async_buf to put next char }
- async_obuffer_tail : integer; { loc in async_buf to get next char }
- async_obuffer_newtail : integer; { for updating tail value }
- async_buffer_low : integer; { low point in receive buffer for xon }
- async_buffer_high : integer; { high point in rec'buffer for xoff }
- async_buffer_high_2 : integer; { emergency point for xoff }
- async_xoff_sent : boolean; { if xoff sent }
- async_sender_on : boolean; { if sender is enabled }
- async_send_xoff : boolean; { true to send xoff asap }
- async_xoff_received : boolean; { if xoff received }
- async_xoff_rec_display : boolean; { if xoff received and displayed }
- async_xon_rec_display : boolean; { if xon received }
- async_baud_rate : word; { current baud rate }
- { save prev serial interrupt status }
- async_save_iaddr : pointer;
- async_do_cts : boolean; { true to do clear-to-send checking }
- async_do_dsr : boolean; { true to do data-set-ready checking }
- async_do_xonxoff : boolean; { true to do xon/xoff flow checking }
- async_ov_xonxoff : boolean; { true to do xon/xoff if buf overflow }
- async_hard_wired_on : boolean; { true if hard-wired connection }
- async_break_length : integer; { length of break in 1/10 seconds }
- async_line_status : byte; { line status reg at interrupt }
- async_modem_status : byte; { modem status reg at interrupt }
- async_line_error_flags : byte; { line status bits accumulated }
- async_buffer_size : integer; { stores input buffer size }
- async_obuffer_size : integer; { stores output buffer size }
- async_uart_ier : integer; { interrupt enable register address }
- async_uart_mcr : integer; { interrupt enable register address }
- async_uart_iir : integer; { interrupt id register address }
- async_uart_msr : integer; { modem status register address }
- async_uart_lsr : integer; { line status register address }
- async_output_delay : integer; { delay in ms when output buffer full }
- async_onemsdelay : integer; { loop count value to effect 1 ms delay}
- async_buffer_length : integer; { receive buffer length }
- async_obuffer_length : integer; { send buffer length }
- { pointer to async_send routine }
- async_send_addr : async_ptr;
- break_length : integer;
- current_carrier_status,
- new_carrier_status,
- attended_mode,
- hard_wired,
- reset_comm_port,
- comm_port_changed,
- check_cts,check_dsr,
- do_xon_xoff_checks : boolean;
-
-
-
- {──────────────────────────────────────────────────────────────────────}
- { multitasker definitions }
- {──────────────────────────────────────────────────────────────────────}
-
- type
- multitaskertype = (
- multitasker_none, doubledos, desqview, topview,
- mswindows, apxcore, ezdosit, concurrent_dos,
- taskview, multilink, other
- );
-
-
- var
- timesharingactive: boolean; { true if multitasker active }
- { which multitasker active }
- multitasker: multitaskertype;
-
-
- {──────────────────────────────────────────────────────────────────────}
- { dos jump stuff }
- {──────────────────────────────────────────────────────────────────────}
- {var}const
- heaptop : pointer = nil { top of heap at program start };
- stacksafetymargin : word = 1000 { safety margin for stack };
- minspacefordos : word = 20000 { minimum bytes for dos shell to run };
-
-
- !short procedures used
- procedure bios_rs232_init(comport: integer; comparm: word);
- procedure async_close(drop_dtr: boolean);
- procedure async_clear_errors;
- procedure async_reset_port(
- comport : integer;
- baudrate : word;
- parity : char;
- wordsize : integer;
- stopbits : integer
- );
- function async_open(
- comport : integer;
- baudrate : word;
- parity : char;
- wordsize : integer;
- stopbits : integer
- ): boolean;
- procedure async_send(c: char);
- function async_receive(var c: char): boolean;
- procedure async_receive_with_timeout(secs: integer; var c: integer);
- procedure async_stuff(ch: char);
- procedure async_find_delay(var one_ms_delay: integer);
- procedure async_init(
- async_buffer_max : integer;
- async_obuffer_max: integer;
- async_high_lev1 : integer;
- async_high_lev2 : integer;
- async_low_lev : integer
- );
- function async_carrier_detect: boolean;
- function async_carrier_drop: boolean;
- procedure async_term_ready(ready_status: boolean);
- function async_buffer_check: boolean;
- function async_line_error(var error_flags: byte): boolean;
- function async_ring_detect: boolean;
- procedure async_send_break;
- procedure async_send_string(s: string);
- procedure async_send_string_with_delays(
- s : string;
- char_delay : integer;
- eos_delay : integer
- );
- function async_percentage_used: real;
- procedure async_purge_buffer;
- function async_peek(nchars: integer): char;
- procedure async_setup_port(
- comport : integer;
- base_address : integer;
- irq_line : integer;
- int_numb : integer
- );
- procedure async_release_buffers;
- procedure async_flush_output_buffer;
- procedure async_drain_output_buffer(max_wait_time: integer);
- function async_port_address_given(com_port: integer): boolean;
- procedure async_send_now(c: char);
- function async_wait_for_quiet(
- max_wait: longint; wait_time: longint
- ): boolean;
- { --- }
- procedure send_modem_command(modem_text: string);
- function set_params(first_time: boolean): boolean;
- procedure initialize_modem;
-
-
- !short FIDO UNIT
-
- This unit defines some functions to work with standard
- IFNA/FIDO packages.
- For example, the name of a mailbag has to be named using
- certain codes, depicting the senders nodenumber.
-
-
- !short contants used
-
- type
- netmsg = record { netmessage record structure }
- from,
- too : string[35];
- subject : string[71];
- date : string[19];
- timesread,
- destnode,
- orignode,
- cost,
- orignet,
- destnet,
- replyto,
- attr,
- nextreply : word;
- areaname : string[20];
- end;
-
- pktheader = record { packet header of packet }
- orignode,
- destnode,
- year,
- month,
- day,
- hour,
- minute,
- second,
- baud,
- orignet,
- destnet : word;
- end;
-
- pktmessage = record { packet header of each individual message }
- orignode,
- destnode,
- orignet,
- destnet,
- attr,
- cost : word;
- date : string[19];
- too : string[35];
- from : string[35];
- subject : string[71];
- areaname : string[20];
- end;
-
- archivename = record { internal record structure used for }
- mynet, { determining the name of of an echomail }
- mynode, { archive. i.e. 00fa1fd3.mo1 }
- hisnet,
- hisnode : word;
- end;
-
-
- const { attribute flags }
- _private = $0001;
- _crash = $0002;
- _recvd = $0004;
- _sent = $0008;
- _file = $0010;
- _forward = $0020; { also know as in-transit }
- _orphan = $0040;
- _killsent = $0080;
- _local = $0100;
- _hold = $0200;
- _freq = $0800;
-
- months : array[1..12] of string[3] = (
- 'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'
- );
-
-
- var
- net : netmsg;
- ph : pktheader;
- pm : pktmessage;
- arcn : archivename;
-
- !short procedures used
-
- function packetname_ : string;
- function packetmessage_ : string;
- function packetheader_ : string;
- function netmessage_ : string;
- function getpath_(var fname : string) : boolean;
- function getnet_(gn : string) : string;
- function getnode_(gn : string) : string;
- function msgdatestamp_ : string;
- function lastmsgnum_( _netpath : string ) : integer;
- function hex_ (n : word) : string;
- function archivename_ : string;
- procedure expandnodenumbers_(var list : string; var totalnumber : integer );
- procedure convertnetnode_(netnode : string; var net, node : word);
-
-
- !short FOSL UNIT
-
- This unit interfaces with the FOSSIL
- (Fido Opus Seadog Standard Interface Layer) and
- is therefore quite platform dependent.
- However, since the DOS / OS/2(VDM) platform are
- the only OS platforms to support FOSSIL, this is
- a obsolete hinder in multiplatform development.
-
- !short procedures used
-
- procedure fos_ansi_ (character : char);
- function fos_atcmd_ (comport_ : byte; command_: string): boolean;
- function fos_avail_ (comport_ : byte): boolean;
- procedure fos_bios_ (character : char);
- function fos_cd_ (comport_ : byte): boolean;
- function fos_checkmodem_ (comport_ : byte): boolean;
- procedure fos_clear_regs_;
- procedure fos_close_ (comport_ : byte);
- procedure fos_dtr_ (comport_ : byte; state: boolean);
- function fos_empty_ (comport_ : byte): boolean;
- procedure fos_flow_ (comport_ : byte; state: boolean);
- procedure fos_flush_ (comport_ : byte);
- function fos_hangup_ (comport_ : byte): boolean;
- function fos_init_ (comport_ : byte): boolean;
- procedure fos_kill_out_ (comport_ : byte);
- procedure fos_kill_in_ (comport_ : byte);
- function fos_oktosend_ (comport_ : byte): boolean;
- procedure fos_parms_ (comport_ : byte; baud: integer; databits: byte;
- parity: char; stopbit: byte);
- function fos_present_ (comport_ : byte): boolean;
- procedure fos_reboot_;
- function fos_receive_ (comport_ : byte): char;
- procedure fos_string_ (comport_ : byte; outstring: string);
- procedure fos_stringcrlf_ (comport_ : byte; outstring: string);
- procedure fos_watchdog_ (comport_ : byte; state: boolean);
- procedure fos_write_ (comport_ : byte; character: char);
- function fos_name_(comport: byte) : string;
-
-
-
- !short HDSN UNIT
-
- This unit interfaces with a Hudson MSG*.BBS messagebase,
- including inspecting, reading, writing and updating to
- and from the 5-file database.
-
-
- !short constants used
-
- {$I rastruct.inc}
-
-
- type
- msgattrs = set of (
- m_del, m_transit, m_netm, m_priv, m_rcvd, m_echotr, m_local, m_r1
- );
- netattrs = set of (
- n_kill, n_sent, n_file, n_crash, n_reqrec, n_audreq, n_retrec, n_r2
- );
- namestring = string[35];
- subjstring = string[72];
-
-
- type
- lastcall = record
- line : byte;
- name : msgtoidxrecord;
- city : string[25];
- baud : word;
- times : longint;
- logon : string[5];
- logoff : string[5];
- end;
-
-
- msgboardsarray = array[1..200] of messagerecord;
- msgboardsarrayptr = ^msgboardsarray;
-
-
-
-
- const
- boardlim = 200; {maximum number of boards}
- ok = 0; {ioresult value}
-
- defaultmsgattr: array[msgtype] of msgattrs=( {may be modified}
- [m_transit, m_netm], {netmail}
- [m_echotr], {echomail}
- [m_local]); {local mail}
- defaultnetattr: array[msgtype] of netattrs=(
- [], {netmail}
- [], {echomail}
- []); {local mail}
-
-
- !short procedures used
-
- {- set the location of the *.bbs files, default is current directory -}
- procedure setbbspath(path: pathstr);
-
- {- set the location of the users*.bbs files, default is current directory -}
- procedure setuserspath(path: pathstr);
-
- {- set the user related files support -}
- procedure setusersupport(name: namestring; lastread, current: boolean);
-
- {-
- open all the files associated with the quickbbs message base.
- this function looks for the files in the bbspath directory and
- returns 0 iff everything went ok.
- -}
-
- function openmsgbase: integer;
- function flushmsgbase: integer;
- function closemsgbase: integer;
-
- {- create a header for a new message -}
- procedure createnewheader(var hdr: msghdrrecord; whofrom, whoto: namestring;
- subj: subjstring; brd: byte; typ: msgtype);
-
- {- update a header before calling writemessage after changing a message -}
- procedure changeheader(var hdr: msghdrrecord);
-
- {- create a new message or modify an old message -}
- function writemessage(var hdr: msghdrrecord; var t: textbuffer): integer;
-
- {- read a message -}
- function readmessage(msgno: integer; var hdr: msghdrrecord; var t: textbuffer): integer;
-
- {- get information about messages from index files -}
- function firstmsg(brd: byte): integer;
- function lastmsg(brd: byte): integer;
- function countmsg(brd: byte): integer;
- function lastreadmsg(brd: byte): integer;
- function curmsg(brd: byte): integer;
- function boardmsg(brd: byte; cur: integer): integer;
-
- {- set message pointers -}
- procedure setlastread(brd: byte; msgno: integer);
- procedure setcur(brd: byte; msgno: integer);
-
- {- get next/previous message, returns 0 if empty, -1 if not found -}
- function msgnext(brd: byte; cur: integer): integer;
- function msgprev(brd: byte; cur: integer): integer;
-
- {- return true iff there is a message at 'msgno' in board 'brd' -}
- function msgat(brd: byte; msgno: integer): boolean;
-
- {- read and write a message header, return 0 iff ok -}
- function readheader(msgno: integer; var hdr: msghdrrecord): integer;
- function writeheader(var hdr: msghdrrecord): integer;
-
- {- read message text, return 0 iff ok. return empty buffer on error. -}
- function readtext(var hdr: msghdrrecord; var t: textbuffer): integer;
-
- {- search for a message to a person -}
- function searchto(
- board: byte; var msgnum: integer; name: namestring
- ): integer;
-
- {- delete a message -}
- function msgdelete(msgnum: integer): integer;
-
-
-
- !short SQSH UNIT
-
- This unit interfaces with a Squish messagebase,
- including inspecting, reading, writing and updating to
- and from the N*3-file databases. Every Squish-area
- is provided with its own set of 3 files, 2 index and
- 1 text-base files.
-
-
- !short constants used
-
- type
- _fido_fromtype = string[35];
- _fido_totype = string[35];
- _fido_subtype = string[71];
- _fido_datetype = string[19];
-
-
- _fidomsgtype = record
- from : _fido_fromtype; (* 0 *)
- towhom : _fido_totype; (* 35 *)
- subject : _fido_subtype; (* 71 *)
- azdate : _fido_datetype; (* 142 obsolete/unused ascii date information *)
- timesread : word; (* 162 fido<tm>: number of times read *)
- dest_node : word; (* 164 destination node *)
- orig_node : word; (* 166 origination node number *)
- cost : word; (* 168 unit cost charged to send the message *)
- orig_net : word; (* 170 origination network number *)
- dest_net : word; (* 172 destination network number *)
-
- date_written : longint; (* 176 when user wrote the msg *)
- date_arrived : longint; (* 180 when msg arrived on-line *)
- reply : word; (* 184 current msg is a reply to this msg number *)
- attr : word; (* 186 attribute (behavior) of the message *)
- up : word; (* 188 Next message in the thread *)
- end;
-
-
-
-
- const
- msgprivate = $0001; (* for addressee *only* * 0000 0000 0000 0001 *)
- msgcrash = $0002; (* high priority * 0000 0000 0000 0010 *)
- msgread = $0004; (* was read by addressee * 0000 0000 0000 0100 *)
- msgsent = $0008; (* was sent by fidomail 0000 0000 0000 1000 *)
- msgfile = $0010; (* subj=file(s) to send * 0000 0000 0001 0000 *)
- msgfwd = $0020; (* msg from & to elsewhere 0000 0000 0010 0000 *)
- msgorphan = $0040; (* msg destination unknown 0000 0000 0100 0000 *)
- msgkill = $0080; (* delete after sending * 0000 0000 1000 0000 *)
- msglocal = $0100; (* msg is local, not net 0000 0001 0000 0000 *)
- msghold = $0200; (* hold msg for pickup * 0000 0010 0000 0000 *)
- msgcrap = $0400; (* ---------------------- x 0000 0100 0000 0000 *)
- msgfrq = $0800; (* subj=file(s) to get * 0000 1000 0000 0000 *)
- msgrrq = $1000; (* msg receipt requested x* 0001 0000 0000 0000 *)
- msgcpt = $2000; (* msg is a msg receipt x* 0010 0000 0000 0000 *)
- msgarq = $4000; (* audit trail requested x* 0100 0000 0000 0000 *)
- msgurq = $8000; (* subj=files(s) to upd 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 *)
- (*------------------------*)
-
-
- const
- sysmail = $0001; (* is a mail area *)
- p_rep = $0002; (* opus: net mail private echomail back *)
- nopublic = $0004; (* opus: disallow public messages *)
- noprivate = $0008; (* opus: disallow private messages *)
- anon_ok = $0010; (* opus: enable anonymous messages *)
- echomail = $0020; (* opus: set=echomail clear=not echomail *)
- opus_ualias = $0040; (* opus170: use user's alias in this area *)
- highbit = $0040; (* max: allow high-bit chars in this area *)
- passthrough = $0080; (* opus170: passthough area only *)
- inbound = $0100; (* opus170: inbound only area *)
- nrealname = $0200; (* max: don't use ^aREALNAME for this area *)
- userealname = $0400; (* max: use usr.name instead of alias *)
- conf = $0800; (* max: conference-type area (no origin/sb's) *)
- max_ualias = $1000; (* max: use usr.alias instead of usr.name *)
-
-
-
- type
- umsgid_type = longint;
- recpos_type = longint;
- _address = record zone,net,node,point : word end;
- msgbuftype = array[0..0] of char;
- msgbufptrtype = ^msgbuftype;
-
-
- const
- sqhdrid = $afae4453; (* squish headers must have this number *)
- linknext = 0;
- linkprev = 1;
- nullframe = 0;
- frame_msg = 0; (* it's a live message *)
- frame_free = 1; (* the message is dead, avail for new msg *)
- frame_rle = 2; (* type of compression, not implemented *)
- frame_lzw = 3; (* type of compression, not implemented *)
- sqmsg_from_size = 36;
- sqmsg_to_size = 36;
- sqmsg_subj_size = 72;
- max_reply = 10; (* max number of stored replies to one msg *)
-
- (* this is the first record in the *.sqd file *)
-
- type
- _sqbasetype = record
- len : word; (* length of this structure! 0 2 *)
- rsvd1 : word; (* reserved word 2 4 *)
- num_msg, (* number of msgs 4 8 *)
- high_msg, (* highest msg - always equal to num_msg 8 12 *)
- skip_msg: longint; (* # of msgs to keep in beginning of area 12 16 *)
- high_water : umsgid_type; (* high water marker (umsgid) 16 20 *)
- uid : umsgid_type; (* last usmgid 20 24 *)
- base : string[79]; (* base name for squishfile 24 104 *)
- begin_frame, (* offset of first frame in file 104 108 *)
- last_frame, (* offset to last frame in file 108 112 *)
- first_free, (* offset of first free frame in file 112 116 *)
- last_free, (* ofs of the last free frame 116 120 *)
- end_frame : recpos_type; (* pointer to end of file 120 124 *)
- max_msg : longint; (* maximum number of messages 124 128 *)
- keep_days : word; (* max age of messages 128 130 *)
- sz_sqhdr : word; (* size of fram header 130 132 *)
- rsvd2 : array[1..124] of byte (* reserved area 132 256 *)
- end;
-
-
- (*
- After thge BASE record, follows a frame record for EACH message. The
- begin_frame in the base should point to the first frame header, and
- the next_frame in the frame header should point to the next one, etc.
- *)
-
- _sqfhdrtype = record
- id : longint; (* sqhdr.id must always equal sqhdrid *)
- next_frame, (* pointer to next msg in base *)
- prev_frame : recpos_type; (* pointer to prior msg in base *)
- frame_length, (* length of this frame (not counting header) *)
- msg_length, (* length of msg in frame. may be less than
- frame_length if this frame has been recycled. *)
- clen : longint; (* length of the control information. *)
- frame_type : word; (* Either FRAME_MESSAGE or FRAME_FREE. The API
- has been designed to allow things such
- as FRAME_LZSS or FRAME_LZH to be hacked on
- later, without changing the application. *)
- rsvd : word; (* reserved *)
- end;
-
-
- (*
-
- But right after each frame header, follows the squish message header,
- then the control info, then the text.
-
- *)
-
- _sqmhdrtype = record
- attr : longint;
- fromwhom : string[sqmsg_from_size-1];
- towhom : string[sqmsg_to_size-1];
- subj : string[sqmsg_subj_size-1];
- orig,
- dest : _address; (* origination and destination addresses *)
- date_written, (* when user wrote the msg (utc) *)
- date_arrived : longint; (* when msg arrived on-line (utc) *)
- utc_ofs : word; (* minutes offset from utc of message writer *)
- replyto : umsgid_type;
- replies : array[1..max_reply] of umsgid_type;
- azdate : string[19]; (* ascii date *)
- end;
-
-
- (*
- Each SQD file has a SQI FILES. The message number YOU see (the user)
- in MAX is really the counter starting from 1 of each record in SQI.
- But the TRUE UNIQUE Message ID is in umsgid. The ofs value will
- point to the frame header in SQD. These files are small and you
- may read them into a array SqiPtrArrayType using the functions
- below.
-
- *)
-
- _sqidxtype = record
- ofs : recpos_type; (* offset of frame header *)
- umsgid : umsgid_type; (* unique message identifier *)
- hash : longint; (* 'To' name hash value *)
- end;
-
- sqiptrarraytype = array[1..1] of _sqidxtype;
- sqiptrtype = ^sqiptrarraytype;
-
-
- (*
-
- Sizes of various structures. WARNING, alot of the routines use these
- variables. You should be more dynamic and reading the true sizes SCOTT
- puts in the squish structures (if any).
-
- *)
-
-
- const
- _sqbsize : word = sizeof(_sqbasetype);
- _sqfsize : word = sizeof(_sqfhdrtype);
- _sqmsize : word = sizeof(_sqmhdrtype);
- _sqisize : word = sizeof(_sqidxtype);
- _sdmsize : word = sizeof(_fidomsgtype);
-
-
- (*
-
- Function Prototypes in this unit.
-
- *)
-
- !short procedures used
-
-
- function sqsetsqbsize(var fd: file): integer;
- function sqopensqd(name: string; var fd: file; lock : boolean): integer;
- function sqclosesqd(var fd: file): integer;
- function sqreadbhdr(var fd: file; var sb: _sqbasetype): integer;
- function sqwritebhdr(var fd: file; var sb: _sqbasetype): integer;
- function sqreadfhdr(var fd: file; var sf: _sqfhdrtype; fp: longint): integer;
- function sqwritefhdr(var fd: file; var sf: _sqfhdrtype; fp: longint): integer;
- function sqreadmhdr(var fd: file; var sm: _sqmhdrtype; fp: longint): integer;
- function sqwritemhdr(var fd: file; var sm: _sqmhdrtype; fp: longint): integer;
- function sqreadmtxt(var fd: file; var st; fp: longint; ml: longint): integer;
- function sqwritemtxt(var fd: file; var st; fp: longint; ml: longint): integer;
- function sqopensqi(name: string; var fd: file): integer;
- function sqclosesqi(var fd: file): integer;
- function sqreadsqi(var fd: file; var si: _sqidxtype; fp: longint): integer;
- function sqwritesqi(var fd: file; var si: _sqidxtype; fp: longint): integer;
- function sdmread(name: string; var mh: _fidomsgtype; var mb: msgbufptrtype; var mz: longint): integer;
- function squnlinkframe(var fd: file; var sf: _sqfhdrtype): integer;
- function sqlinkframe(var fd: file; var sf: _sqfhdrtype; tp, lp: longint; op: word): integer;
- function sqfreeframe(var fd: file; var sb: _sqbasetype; rp: longint): integer;
- function sqfindframe(var fd: file; var sb: _sqbasetype; var fl, rp: longint): integer;
- function sqnewframe(var fd: file; var sb: _sqbasetype; var sf: _sqfhdrtype; var ml, rp: longint): integer;
- function sqreplaceframe(var fd: file; var sb: _sqbasetype; var sf: _sqfhdrtype; var rp, ml: longint): integer;
-
- function sqazhashname(var s): longint;
- function sqhashname (name : string) : longint;
- procedure squishsqiptr(var sqiptr : sqiptrtype; fn :pathstr; var sqisize : longint);
- function squishmsgntouid(var sqiptr : sqiptrtype; msgn : word ; totalsqi : word) : longint;
- function squishuidtomsgn(var sqiptr : sqiptrtype; uid : longint; totalsqi : word) : word;
- function getsquishbaserec(fn : pathstr; var sqbaserec : _sqbasetype) : integer;
- function setsquishmsgattribute(var fvsqd : file; var fpos : longint; newattr : longint) : integer;
-
-
- { conversion from MSG to Squish }
- function sdmtosqd(
- mname,
- sname: string;
- var mh : _fidomsgtype;
- var newnum : word;
- lockit : boolean
- ): integer;
-
- procedure arrangetxt(var msg: msgbufptrtype; var msiz, csiz: longint);
-
-
-
-
- The BASE RECORD and the FRAME RECORD are potentially dynamic records.
- When a squish file SQD is open, you should call SQSetSQBSize to reset
- the SQBSIZE variable to proper the length, and when do you read in the
- BASE RECORD, set the SBFSIZE variable to the value defined in the base
- record. Doing so, will atleast conform to the way MAX today is setup for
- the future changes in the base structure.
-
- There is no critical error trap routines here. It is your programming
- responsibility to TRAP and CLOSE, and especially UNLOCK any open SQUISH
- file if a critical error occurs. There is a local unit variable
- _SQD_FILE_LOCKED which is used here to determine if a message based is
- locked when a closing function is called. It is suggested that you test
- for this variable's logical state in your critical error trap routine.
-
- Description:
-
- Squish has four files:
-
- *.SQL - the lastread pointers are stored for the user. The lastus00.dat
- file has the user's record number. Seek to it and read a word
- to get lastread value for the user for the message base.
-
- *.SQI - is a index of LIVE MESSAGES in the Squish *.SQD file. It
- basically stores the 'unique' message id for each message,
- the offset of the SQUISH messahe header (sqhdr) and the
- HASH of the TOWHOM user's name.
-
- *.SQD - has all the mail. The basic layout is:
-
- BASE_RECORD
-
- then for each message
-
- SQUISH MESSAGE HEADER
- CONTROL INFORMATION Where all ^A stuff is stored
- TEXT MESSAGE may not always be null terminated
-
- The base record will tell you where the first squish msg header
- is at, and each msg header will point to the next or prev one.
-
- In addition, the base record also will point to the first FREE
- (one that was marked deleted) Squish Message Header and so on.
-
- So from the base record, you can get a "Doublely linked list"
- of both the live messages and free messages.
-
- *.SQB - something to do with dupe checking and I think it's for the
- squish mail processor. Not discussed or used in the this API.
-
-
-
- !short ZMOD UNIT
-
- This unit interfaces with another system, via either
- FOSSIL or direct UART, using the ZModem protocol.
- It support error-trapping, direct recovering, line faults and
- afterwards Error-recovering from broken transmission.
- It uses ECO_LIB.TPU for a nice directscreen real-time display.
- A version will be written, undependent from ECO_LIB, where
- a pointer to a display routine can be used for either
- no-, direct or stdio screenwrites.
-
-
- !short constants used
-
- const
- zmodemlogging: boolean = false;
-
- var
- alreadycarrier : boolean;
- filenum : word;
-
- !short procedures used
-
- function zmodem_receive(
- path: string; comport: word; baudrate: longint; init: boolean
- ): boolean;
-
-
- function zmodem_send(
- pathname: string; lastfile: boolean; comport: word; baudrate: longint;
- init: boolean
- ): boolean;
-
- procedure z_message(s: string);
- procedure z_setcomport(port: byte; fossiloverride: boolean);
- procedure z_sendcan;
-
-
- !short
- !short PutEMSI
-
- This is an ECO_LIB using, shining example on how to use EMSI, whilst
- calling.
- Receiving part is being written.
-
-
-
- procedure putemsi;
- var
- i : byte;
- ch : char;
- res : string;
- pp : word;
- pack : ar1024;
-
- begin
- writeln('° Writing EMSI-enquiry...');
- if debugmode then __logapp('Writing EMSI-enquiry...');
- __clr1024(pack); __app1024(pack, emsi_inq + #13); send1024(pack);
-
- __clr1024(pack);
- __app1024(pack, 'EMSI_DAT');
- __app1024(pack, length_emsi_dat);
- __app1024(pack, emsi_dat);
- crc := hex(crc16(pack));
-
- __clr1024(pack);
- __app1024(pack, '**EMSI_DAT');
- __app1024(pack, length_emsi_dat);
- __app1024(pack, emsi_dat);
- __app1024(pack, crc + #13);
- send1024(pack);
-
- comwait;
- repeat
- inc(tries); res := '';
- while (
- comreceive(ch) and not(pos(emsi_req, __up(res)) > 0)
- ) do begin
- res := res + ch; delay(12);
- if debugmode then write(ch);
- capturewrite(ch);
- ch := #00;
- end;
- until (pos(emsi_req, __up(res)) > 0) or (tries = maxemsitries);
-
- if res <> '' then __logapp('Response to inquiry: ' + res);
- if (pos(emsi_req, __up(res)) > 0) then begin
- res := '';
- if debugmode then begin
- writeln('° Yonder site has acknowledged receipt of EMSI_INQ');
- __logapp('Yonder site has acknowledged receipt of EMSI_INQ');
- end;
- end else begin
- writeln('! Host system failed to acknowledge the inquiry sequence.');
- __logapp('Host system failed to acknowledge the inquiry sequence.');
- if fossil then fos_hangup_(comport) else hangup232; __eos;
- { send_modem_command(modem_hang_up); absorb232response(false, tmp); }
- end;
-
- writeln('° Sending EMSI data...');
- if debugmode then __logapp('Sending EMSI data...');
- tries := 0;
-
- __clr1024(pack); __app1024(pack, emsi_inq + #13); send1024(pack);
-
- __clr1024(pack); __app1024(pack, 'EMSI_DAT'); __app1024(pack, length_emsi_dat);
- __app1024(pack, emsi_dat); crc := hex(crc16(pack));
- __clr1024(pack); __app1024(pack, '**EMSI_DAT');
- __app1024(pack, length_emsi_dat); __app1024(pack, emsi_dat);
- __app1024(pack, crc + #13); send1024(pack);
-
- comwait;
- repeat
- inc(tries); res := ''; ch := #00;
- while comreceive(ch) and (ch <> '*') do begin
- if debugmode then write(ch); capturewrite(ch);
- end;
- ch := '*'; res := '*';
- comwait;
- while (
- comreceive(ch) and not(pos(emsi_ack, __up(res)) > 0)
- ) do begin
- res := addtolast20(res, ch); delay(12);
- if debugmode then write(ch);
- capturewrite(ch);
- ch := #00;
- end;
- until (pos(emsi_ack, __up(res)) > 0) or (tries >= maxemsitries);
- if (res <> '') then __logapp('Response to EMSI data (Acq?): ' + res);
-
- if tries >= maxemsitries then begin
- writeln('Host system failed to acknowledge the EMSI_DAT packet.');
- __logapp('Host system failed to acknowledge the EMSI_DAT packet.');
- if fossil then fos_hangup_(comport) else hangup232; __eos;
- end else begin
- writeln('° Boss has acknowledged receipt of EMSI_DAT');
- __logapp('Boss has acknowledged receipt of EMSI_DAT');
- end;
-
- temp := '*'; { read in '**EMSI_DAT' }
- repeat comreceive(ch); capturewrite(ch) until (ch = '*');
- repeat
- if comreceive(ch) then temp := temp + ch;
- capturewrite(ch);
- until(pos('**EMSI_DAT', temp) > 0);
- pp := 8; { no '**' }
- pack[1] := 'E'; pack[2] := 'M'; pack[3] := 'S'; pack[4] := 'I';
- pack[5] := '_'; pack[6] := 'D'; pack[7] := 'A'; pack[8] := 'T';
- len := ''; { read in the length }
-
- for loop := 1 to 4 do begin
- delay(12); if comreceive(ch) then len := len + ch;
- inc(pp); pack[pp] := ch; capturewrite(ch);
- end;
-
- len_rec_emsi_dat := hex2dec(len);
-
- if debugmode then begin
- writeln('Length of DAT: (', len, ') ', len_rec_emsi_dat, '.');
- __logapp('Length of DAT: (' + len + ') ' + __num(len_rec_emsi_dat) + '.');
- end;
- packet := '';
- for loop := 1 to len_rec_emsi_dat do begin { read in the packet }
- delay(12); comreceive(ch); inc(pp); pack[pp] := ch; capturewrite(ch);
- end;
- crc := ''; { read in the crc }
- for loop := 1 to 4 do begin
- delay(12); comreceive(ch); crc := crc + ch; capturewrite(ch);
- end;
-
- if hex(crc16(pack)) <> crc then begin
- writeln('! The recieved EMSI_DAT is corrupt!!!!');
- __logapp('The recieved EMSI_DAT is corrupt!!!!');
- end;
-
- __clr1024(pack); __app1024(pack, emsi_ack + #13); send1024(pack);
- end; { EMSI mode }
-
-
- !short QuickBBS struct DOC
-
-
- Type
- FlagType = Array[1..4] of Byte;
-
- UserRecord = Record
- Name: String[35];
- City: String[25];
- Pwd: String[15];
- DataPhone,
- HomePhone: String[12];
- LastTime: String[5];
- LastDate: String[8];
- Attrib: Byte;
- Flags: FlagType;
- Credit,
- Pending,
- TimesPosted,
- HighMsgRead,
- SecLvl,
- Times,
- Ups,
- Downs,
- UpK,
- DownK,
- TodayK,
- Elapsed,
- Len: Integer;
- CombinedPtr: Word; (* Record number in COMBINED.BBS *)
- Age: Byte; (* Not yet implemented *)
- ExtraSpace: Array[1..5] of Byte;
- End;
-
- (* Attrib:
-
- Bit 0: Deleted
- Bit 1: Screen Clear Codes
- Bit 2: More Prompt
- Bit 3: ANSI
- Bit 4: No-Kill
- Bit 5: Ignore Download Hours
- Bit 6: ANSI Full Screen Editor
- Bit 7: [ Reserved ]
-
- *)
-
- { Nodelist Records *************************************************** }
-
- NodeIdxRecord = Record
- Zone,
- Net,
- Node: Integer;
- NodeType: Byte;
- End;
-
- NodelistRecord = Record
- NodeType: Byte;
- Zone,
- Net,
- Node: Integer;
- Name: String[20];
- City: String[40];
- Phone: String[40];
- Password: String[8];
- Flags: Integer;
- BaudRate: Integer;
- Cost: Integer;
- End;
-
- { Message Records ******************************************************}
-
- CombSelectType = Array[1..200] of Boolean; (* for COMBINED.BBS *)
-
- InfoRecord = Record
- LowMsg: Integer; { Lowest Message in File }
- HighMsg: Integer; { Highest Message in File }
-
- TotalActive: Integer; { Total Active Messages }
-
- ActiveMsgs: Array[1..200] of Integer;
- End;
-
- IdxRecord = Record
- MsgNum: Integer;
- Board: Byte;
- End;
-
- HdrRecord = Record
- MsgNum,
- ReplyTo,
- SeeAlsoNum,
- TRead: Integer;
- StartRec: Word;
- NumRecs,
- DestNet,
- DestNode,
- OrigNet,
- OrigNode: Integer;
- DestZone,
- OrigZone: Byte;
- Cost: Integer;
- MsgAttr,
- NetAttr,
- Board: Byte;
- PostTime: String[5];
- PostDate: String[8];
- WhoTo,
- WhoFrom: String[35];
- Subj: String[72];
- End;
-
-
- (* Msg Attributes:
-
- Bit 0: Deleted
- Bit 1: Unmoved Outgoing Net Message
- Bit 2: Is a Net Mail Message
- Bit 3: Private
- Bit 4: Received
- Bit 5: Unmoved Outgoing Echo Message
- Bit 6: Local Bit
- Bit 7: [ Reserved ]
-
- Net Attributes:
-
- Bit 0: Kill Message after it's been sent
- Bit 1: Sent OK
- Bit 2: File(s) Attached
- Bit 3: Crash Priority
- Bit 4: Request Receipt
- Bit 5: Audit Request
- Bit 6: Is a Return Receipt
- Bit 7: [ Reserved ]
-
- *)
-
- { Other Stuff *********************************************************** }
-
- SysInfoRecord = Record
- CallCount: LongInt;
- LastCaller: String[35];
- ExtraSpace: Array[1..128] of Byte;
- End;
-
- TimeLogRecord = Record
- StartDate: String[8];
- BusyPerHour: Array[0..23] of Integer;
- BusyPerDay: Array[0..6] of Integer;
- End;
-
- MenuRecord = Record
- Typ: Byte;
- Sec: Integer;
- Flags: FlagType;
- Str: String[75];
- Key: Char;
- Data: String[80];
- Fg,
- Bg: Byte;
- End;
-
- { Configuration Information ********************************************** }
-
- EventRecord = Record
- Status: Byte; { 0=Deleted 1=Enabled 2=Disabled }
- RunTime: String[5];
- ErrorLevel: Byte;
- Days: Byte;
- Forced: Boolean;
- LastTimeRun: String[8];
- End;
-
- BoardRecord = Record
- Name: String[16];
- Typ: Byte; { 0=Standard 1=Net 3=Echo }
- Kinds: Byte; { 0=Both 1=Pvt 2=Pub 3=Read-Only }
- Combined: Boolean;
- Aliases: Boolean;
-
- ReadSecLvl: Integer;
- ReadFlags: FlagType;
-
- WriteSecLvl: Integer;
- WriteFlags: FlagType;
-
- SysopSecLvl: Integer;
- SysopFlags: FlagType;
- End;
-
- ConfigRecord = Record
- (* Modem Parameters *)
- CommPort: Integer;
- InitBaud,
- InitTimes,
- AnswerWait: Integer;
- ModemInitStr,
- ModemBusyStr: String[70];
- ModemInitResp,
- ModemBusyResp,
- Resp300,
- Resp1200,
- Resp2400: String[40];
-
- (* System Paths *)
- MenuPath,
- TextPath,
- NetPath: String[66];
-
- (* Restriction Parameters *)
- MinBaud,
- GraphicsBaud,
- XferBaud: Integer;
- LowBaudStart,
- LowBaudEnd,
- DownloadStart,
- DownloadEnd,
- PagingStart,
- PagingEnd: String[5];
-
- (* Matrix Information *)
- MatrixZone,
- MatrixNet,
- MatrixNode: Integer;
- AkaNet,
- AkaNode: Array[1..5] of Integer;
- NetMailBoard: Integer;
-
- (* Default Information for New Users *)
- DefaultSec: Integer;
- DefaultCredit: Integer;
- DefaultFlags: FlagType;
-
- (* Sysop Security Levels *)
- EditorCmdStr: String[70];
- OriginLine: String[60];
- SysopName: String[35];
- AutoLogonChar,
- FastLogon,
- ScreenBlanking,
- UseLastRead,
- MonoMode,
- DirectWrite,
- SnowCheck,
- NetEchoExit,
- OneWordNames,
- CheckMail,
- AskHomePhone,
- AskDataPhone,
- GraphicsAvail: Boolean;
- InactiveTimeOut: Integer;
- LogonTime: Integer;
- DefFgColor: Integer;
- DefBgColor: Integer;
- PasswordTries: Integer;
- MaxPageTimes: Integer;
- PageBellLen: Integer;
-
- Use_Xmodem: Boolean;
- Use_Xmodem1k: Boolean;
- Use_Ymodem: Boolean;
- Use_YmodemG: Boolean;
- Use_Sealink: Boolean; { Changed for 2.04 }
- Use_Zmodem: Boolean; { " " }
- Inp_Fields: Boolean; { " " }
- QuoteStr: String[3];
- UploadCredit: Integer;
- LoadingMessage: String[70];
- SelectionPrompt: String[70];
-
- VersionID: Word;
-
- { Added for 2.04: }
-
- Resp4800,
- Resp9600: String[40];
-
- AkaZone: Array[1..5] of Integer;
-
- { Added for 2.60: }
-
- MatrixPoint: Integer;
- AkaPoint: Array[1..5] of Integer;
-
- UseAka: Array[1..200] of Byte;
- AskAge: Boolean; (* Not yet Implemented *)
- SystemName: String[40];
- RegKey: Longint;
-
- ExtraSpace: Array[1..5] of Byte;
-
- EventRec: Array[1..30] of EventRecord;
- BoardRec: Array[1..200] of BoardRecord;
- End;
-
- GosubDataType = Array[1..20] of String[8];
-
- ExitRecord = Record
- BaudRate: Integer;
- SysInfo: SysInfoRecord;
- TimeLogInfo: TimeLogRecord;
- UserInfo: UserRecord;
- EventInfo: EventRecord;
- NetMailEntered: Boolean;
- EchoMailEntered: Boolean;
- LoginTime: String[5];
- LoginDate: String[8];
- TmLimit: Integer;
- LoginSec: LongInt;
- Credit: LongInt;
- UserRecNum: Integer;
- ReadThru: Integer;
- PageTimes: Integer;
- DownLimit: Integer;
- WantChat: Boolean;
- GosubLevel: Byte;
- GosubData: GosubDataType;
- Menu: String[8];
- End;
-
-
- !short RemoteAccess struct DOC
-
-
- type
- asktype = (yes, no, ask, only);
- videotype = (auto, short, long);
- msgtype = (localmail, netmail, echomail);
- msgkindstype = (both, private, public, ronly);
- orphantype = (ignore, create, kill);
- flagtype = array[1..4] of byte;
- time = string[5];
- date = string[8];
- longdate = string[9];
-
- netaddress = record
- zone,
- net,
- node,
- point : word;
- end;
-
- languagerecord = record
- name : string[20];
- attribute : byte;
- defname,
- menupath,
- textpath,
- quespath : string[60];
- freespace : array[1..200] of byte;
- end;
-
- msginforecord = record
- lowmsg,
- highmsg,
- totalmsgs : word;
- totalonboard : array[1..200] of word;
- end;
-
- msgidxrecord = record
- msgnum : integer;
- board : byte;
- end;
-
- msgtoidxrecord = string[35];
-
- msghdrrecord = record
- msgnum : integer;
- prevreply,
- nextreply,
- timesread : word;
- startblock : word;
- numblocks,
- destnet,
- destnode,
- orignet,
- orignode : word;
- destzone,
- origzone : byte;
- cost : word;
- msgattr,
- netattr,
- board : byte;
- posttime : time;
- postdate : date;
- whoto,
- whofrom : msgtoidxrecord;
- subject : string[72];
- end;
-
- msgtxtrecord = string[255];
-
- useronrecord = record
- name,
- handle : msgtoidxrecord;
- line : byte;
- baud : word;
- city : string[25];
- donotdisturb : boolean;
- status : byte;
- attribute : byte;
- end;
-
- { status byte - 0 : browsing (in a menu)
- 1 : uploading/downloading
- 2 : reading/posting messages
- 3 : in a door/external utility
- 4 : chatting with sysop
- 5 : answering questionnaire
- 6 : system ready (0=busy)
-
- attribute - bit 0 : hidden }
-
- lastcallrecord = record
- line : byte;
- name,
- handle : msgtoidxrecord;
- city : string[25];
- baud : word;
- times : longint;
- logon : string[5];
- logoff : string[5];
- attribute : byte;
- end;
-
- { attribute - bit 0 : hidden }
-
- lastreadrecord = array[1..200] of word;
-
- combinedrecord = array[1..25] of byte;
-
- usersidxrecord = record
- namecrc32,
- handlecrc32 : longint;
- end;
-
- usersxirecord = record
- handle : string[35];
- comment : string[80];
- firstdate : date;
- combinedinfo : combinedrecord;
- birthdate,
- subdate : date;
- screenwidth,
- msgarea,
- filearea,
- language,
- dateformat : byte;
- forwardto : string[35];
- extraspace : array[1..43] of byte;
- end;
-
- usersrecord = record
- name : msgtoidxrecord;
- location : string[25];
- password : string[15];
- dataphone,
- voicephone : string[12];
- lasttime : time;
- lastdate : date;
- attribute : byte;
-
- { bit 0 : deleted
- 1 : clear screen
- 2 : more prompt
- 3 : ansi
- 4 : no-kill
- 5 : xfer priority
- 6 : full screen msg editor
- 7 : quiet mode }
-
- flags : flagtype;
- credit,
- pending : word;
- msgsposted,
- lastread,
- security,
- nocalls,
- uploads,
- downloads,
- uploadsk,
- downloadsk : word;
- todayk,
- elapsed : integer;
- screenlength : word;
- lastpwdchange,
- attribute2,
-
- { bit 0 : hot-keys
- 1 : avt/0
- 2 : full screen message viewer
- 3 : hidden from userlist }
-
-
- group : byte;
- xirecord : word;
- extraspace : array[1..3] of byte;
- end;
-
- sysinforecord = record
- totalcalls : longint;
- lastcaller : msgtoidxrecord;
- extraspace : array[1..128] of byte;
- end;
-
- timelogrecord = record
- startdate : date;
- busyperhour : array[0..23] of word;
- busyperday : array[0..6] of word;
- end;
-
- mnurecord = record
- typ : byte;
- security : word;
- flags : flagtype;
- display : string[75];
- hotkey : char;
- miscdata : string[80];
- foreground,
- background : byte;
- end;
-
- eventrecord = record
- status : byte; { 0=deleted 1=enabled 2=disabled }
- starttime : time;
- errorlevel : byte;
- days : byte;
- forced : boolean;
- lasttimerun : date;
- end;
-
- eventrecordarray = array[1..20] of eventrecord;
-
- messagerecord = record
- name : string[40];
- typ : msgtype;
- msgkinds : msgkindstype;
- attribute : byte;
-
- { bit 0 : enable echoinfo
- 1 : combined access
- 2 : file attaches
- 3 : allow aliases
- 4 : use softcrs as characters
- 5 : force handle
- 6 : allow deletes }
-
- dayskill, { kill older than 'x' days }
- recvkill : byte; { kill recv msgs, recv for more than 'x' days }
- countkill : word;
-
- readsecurity : word;
- readflags : flagtype;
-
- writesecurity : word;
- writeflags : flagtype;
-
- sysopsecurity : word;
- sysopflags : flagtype;
-
- originline : string[60];
- akaaddress : byte;
- end;
-
- filesrecord = record
- name : string[30];
- attrib : byte;
-
- { bit 0 : include in new files scan
- 1 : include in upload dupe scan
- 2 : permit long descriptions }
-
- filepath : string[40];
- freespace : array[1..35] of byte;
- uploadsecurity : word;
- uploadflags : flagtype;
- security : word;
- flags : flagtype;
- listsecurity : word;
- listflags : flagtype;
- end;
-
- configrecord = record
- versionid : word;
- commport : byte;
- baud : longint;
- inittries : byte;
- initstr,
- busystr : string[70];
- initresp,
- busyresp,
- connect300,
- connect1200,
- connect2400,
- connect4800,
- connect9600,
- connect19k,
- connect38k : string[40];
- answerphone : boolean;
- ring,
- answerstr : string[20];
- flushbuffer : boolean;
- modemdelay : integer;
-
- minimumbaud,
- graphicsbaud,
- transferbaud : integer;
- slowbaudtimestart,
- slowbaudtimeend,
- downloadtimestart,
- downloadtimeend : time;
-
- pagestart : array[0..6] of time;
- pageend : array[0..6] of time;
-
- {} freespace1 : array[1..70] of byte;
- pwdexpiry : word;
-
- menupath,
- textpath,
- attachpath,
- nodelistpath,
- msgbasepath,
- syspath,
- externaledcmd : string[60];
-
- address : array[0..9] of netaddress;
- systemname : string[30];
-
- newsecurity : word;
- newcredit : word;
- newflags : flagtype;
-
- originline : string[60];
- quotestring : string[15];
- sysop : string[35];
- logfilename : string[60];
- fastlogon,
- allowsysrem,
- monomode,
- strictpwdchecking,
- directwrite,
- snowcheck : boolean;
- creditfactor : integer;
-
- usertimeout,
- logontime,
- passwordtries,
- maxpage,
- pagelength : word;
- checkformultilogon,
- excludesysopfromlist,
- onewordnames : boolean;
- checkmail : asktype;
- askvoicephone,
- askdataphone,
- dofullmailcheck,
- allowfileshells,
- fixuploaddates,
- freezechat : boolean;
- ansi, { ansi: yes, no, or ask new users }
- clearscreen, { clear: " }
- moreprompt : asktype; { more: " }
- uploadmsgs : boolean;
- killsent : asktype; { kill/sent " }
-
- crashasksec : word; { min sec# to ask 'Crash Mail ?' }
- crashaskflags : flagtype;
- crashsec : word; { min sec# to always send crash mail. }
- crashflags : flagtype;
- fattachsec : word; { " ask 'File Attach ?' }
- fattachflags : flagtype;
-
- normfore,
- normback,
- statfore,
- statback,
- hiback,
- hifore,
- windfore,
- windback,
- exitlocal,
- exit300,
- exit1200,
- exit2400,
- exit4800,
- exit9600,
- exit19k,
- exit38k : byte;
-
- multiline : boolean;
- minpwdlen : byte;
- minupspace : word;
- hotkeys : asktype;
- borderfore,
- borderback,
- barfore,
- barback,
- logstyle,
- multitasker,
- pwdboard : byte;
- buffersize : word;
- fkeys : array[1..10] of string[60];
-
- whypage : boolean;
- leavemsg : byte;
- showmissingfiles : boolean;
- {} freespace2 : array[1..11] of byte;
- allownetmailreplies : boolean;
- logonprompt : string[40];
- checknewfiles : asktype;
- replyheader : string[60];
- blanksecs : byte;
- protocolattrib : array[1..6] of byte;
- errorfreestring : string[15];
- defaultcombined : combinedrecord;
- renumthreshold : word;
- leftbracket,
- rightbracket : char;
- askforhandle : boolean;
- askforbirthdate : boolean;
-
- groupmailsec : word;
-
- confirmmsgdeletes : boolean;
- freespace3 : array[1..163] of byte;
- newusergroup : byte;
- avatar : asktype;
- badpwdarea : byte;
- location : string[40];
- doafteraction : byte; {0 = wait for cr, > 0 = wait for x seconds}
- fileline : string[40];
- crfore,
- crback : byte;
- langhdr : string[40];
- sendbreak : boolean;
- listpath : string[60];
- fullmsgview : asktype;
- emsi_enable : asktype;
- emsi_newuser : boolean;
-
- echochar : string[1];
- connect7200,
- connect12000,
- connect14400 : string[40];
- exit7200,
- exit12000,
- exit14400 : byte;
- chatcommand : string[60];
- exted : asktype;
- newuserlanguage : byte;
- languageprompt : string[40];
- videomode : videotype;
- autodetectansi : boolean;
- offhook : boolean;
- newuserdateformat : byte;
- keyboardpwd : string[15];
- caplocation : boolean;
- newusersub : byte;
- printername : string[4];
- hilitepromptfore,
- hilitepromptback : byte;
- initstr2 : string[70];
- altjswap : boolean;
- sempath : string[60];
- autochatcapture : boolean;
-
- futureexpansion : array[1..97] of byte;
- end;
-
- exitinforecord = record
- baud : word;
- sysinfo : sysinforecord;
- timeloginfo : timelogrecord;
- userinfo : usersrecord;
- eventinfo : eventrecord;
- netmailentered,
- echomailentered : boolean;
- logintime : time;
- logindate : date;
- timelimit : word;
- loginsec,
- credit : longint;
- userrecord : integer;
- readthru,
- numberpages,
- downloadlimit : word;
- timeofcreation : time;
- logonpassword : string[15];
- wantchat : boolean;
-
- deductedtime : integer;
- menustack : array[1..50] of string[8];
- menustackpointer : byte;
- userxiinfo : usersxirecord;
- errorfreeconnect,
- sysopnext : boolean;
-
- emsi_session : boolean; { these fields hold }
- emsi_crtdef, { data related to an }
- emsi_protocols, { emsi session }
- emsi_capabilities,
- emsi_requests,
- emsi_software : string[40];
- hold_attr1,
- hold_attr2,
- hold_len : byte;
-
- extraspace : array[1..100] of byte;
- end;
-
- protocolrecord = record
- name : string[15];
- activekey : char;
- opustypectlfile,
- batchavailable : boolean;
- attribute : byte; { 0=disabled, 1=enabled }
- logfilename,
- ctlfilename,
- dncmdstring,
- dnctlstring,
- upcmdstring,
- upctlstring : string[80];
- uplogkeyword,
- dnlogkeyword : string[20];
- xferdescwordnum,
- xfernamewordnum : byte;
- end;
-
-
-