home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 2
/
FFMCD02.bin
/
new
/
dev
/
misc
/
p2c
/
hp
/
import
/
sysglobals.imp
< prev
Wrap
Text File
|
1993-12-21
|
13KB
|
303 lines
{IncludeFrom=sysglobals <p2c/sysglobals.h>}
{*VarStrings=1} {*ExportSymbol=}
module sysglobals;
export
type fsidctype = packed array[1..20] of char;
const
fsidc = fsidctype['Rev. 3.1 18-Jul-85'];
(*20 CHARS: VERSION,DATE,TIME OF FILE SYS*)
mminint = -32768; (*MINIMUM SHORT INTEGER VALUE*)
mmaxint = 32767; (*MAXIMUM SHORT INTEGER VALUE*)
maxunit = 50; (*MAXIMUM PHYSICAL UNIT NUMBER*)
passleng = 16; (*NUMBER OF CHARS IN A PASSWORD*)
vidleng = 16; (*NUMBER OF CHARS IN A VOLUME NAME*)
tidleng = 16; (*NUMBER OF CHARS IN A FILE TITLE*)
fidleng = 120; (*NUMBER OF CHARS IN FILE NAME*)
fblksize = 512; (*STANDARD FILE BUFFER LENGTH*)
maxsc=63; (*LARGEST SELECT CODE *)
minlevel=1; (*LOWEST INTERRUPT LEVEL*)
maxlevel=6; (*LARGEST MASKABLE INTERRUPT LEVEL*)
type
byte = 0..255;
shortint = mminint..mmaxint;
ipointer = ^integer;
charptr = ^char;
textpntr = ^text;
string80 = string[80];
string255 = string[255];
suffixtype = string[5];
string255ptr = ^string255;
unitnum = 0..maxunit;
vid = string[vidleng];
tid = string[tidleng];
fid = string[fidleng];
passtype = string[passleng];
filekind = (untypedfile, {directory entry}
badfile, {bad blocks}
codefile, {executable or linkable}
textfile, {UCSD format text with editor environment}
asciifile, {L.I.F. ASCII format text strings}
datafile, {file of <data type, e.g. char, integer,etc.>}
sysfile, {system (BOOT) file}
fkind7, fkind8, fkind9,
fkind10, fkind11, fkind12,
fkind13, fkind14, lastfkind); {reserved for future expansion}
(*FILE INFORMATION*)
window = packed array [0..maxint] of char;
windowp = ^window;
fibp = ^fib;
amrequesttype = (readbytes, writebytes, flush, writeeol, readtoeol, clearunit,
setcursor, getcursor, startread, startwrite, unitstatus, seekeof);
amtype = procedure (fp: fibp; request: amrequesttype;
anyvar buffer: window; bufsize, position: integer);
eotproc = procedure(fp: fibp);
fib = packed record
fwindow: windowp; (*BUFFER VARIABLE...F^ *)
flistptr: fibp; (* LIST OF OPEN FILES *)
{declaration and type information}
frecsize: integer; (* SIZE OF ONE LOGICAL RECORD *)
feft: shortint; (* EXTERNAL FILE TYPE *)
fkind: filekind; (* FILE KIND *)
fistextvar: boolean; (* FILE IS LINE FORMATTED *)
fbuffered: boolean; (* HAS 512 BYTE BLOCK BUFFER *)
fanonymous: boolean; (* FILE HAS NO NAME *)
fisnew: boolean; (* WAS CREATED THIS ASSOCIATION *)
freadable, fwriteable: boolean; (* FILE ACCESS RIGHTS *)
{state information}
freadmode, fbufvalid: boolean; (*F^ AND LOOKAHEAD STATES *)
feoln: boolean; (* F^ IS AN END OF LINE *)
feof: boolean; (* TRIED TO READ PAST END OF FILE *)
fmodified: boolean; (* FILE HAS CHANGED SIZE *)
fbufchanged: boolean; (* BUFFER NEEDS TO BE WRITTEN *)
{file size and position}
fpos: integer; (* FILE POINTER, CURRENT FILE POSITION *)
fleof: integer; (*LOGICAL END OF FILE, CURRENT FILE SIZE *)
fpeof: integer; (*PHYSICAL END OF FILE, MAXIMUM FILE SIZE *)
{buffering and low level formatting information}
flastpos: integer; (* FILE POSITION OF BUFFER *)
freptcnt: shortint; (* SPACE COMPRESSION COUNT *)
am: amtype; (*BUFFER METHOD MODULE *)
{file association info}
fstartaddress: integer; (*EXECUTION ADDRESS IN BOOT FILE *)
fvid: vid; (* VOLUME NAME *)
ffpw: passtype; (* FILE PASSWORD *)
ftid: tid; (* FILE NAME *)
pathid: integer; (* ADDITIONAL SYSTEM DEPENDENT INFORMATION *)
fanonctr: shortint; (* TEMP FILE IDENTIFIER *)
foptstring: string255ptr; (* OPTIONAL STRING PARAM *)
{byte block transfer information}
fileid: integer; (* START BYTE OF FILE, OR OTHER IDENTIFICATION *)
fb0,fb1, (* FOR FUTURE EXPANSION *)
fnosrmtemp, (*TRUE IF NO SRM TEMP FILE CREATED *)
fwaitonlock, (*TRUE IF SRM SHOULD WAIT FOR LOCK *)
fpurgeoldlink, (*TRUE IF OLD SRM LINK IS TO BE PURGED *)
foverwritten, (*TRUE IF OPENED WITH OVERWRITE *)
fsavepathid, (*TRUE IF PATHID NOT UNIQUE TO FILEID *)
flockable, (*TRUE IF FILE OPENED AS LOCKABLE *)
flocked, (*TRUE IF FILE IS LOCKED *)
fbusy : boolean; (*TRUE IF DRIVER IS ACTIVE *)
funit : unitnum; (*PHYSICAL UNIT NUMBER *)
feot : eotproc; (*CALLED WHEN TRANSFER COMPLETES *)
fxpos : integer; (* X POSITION FOR GOTOXY *)
fypos : integer; (* Y POSITION FOR GOTOXY *)
foldfileid : integer; (* FILEID FOR OLD SRM FILE ON REWRITE *)
{for future expansion}
fextra: array[0..2] of integer;
fextra2: shortint;
{large miscellaneous fields sometimes present}
case integer of
0: ( {minimal FIB ends here} );
1: (ftitle: fid); (* FILE NAME, EXCEPT VOLUME AND SIZE *)
2: (fbuffer: packed array [0..fblksize-1] of char);
end (*FIB*) ;
damrequesttype = (getvolumename, setvolumename, getvolumedate, setvolumedate,
changename, purgename,
openfile, createfile, overwritefile, closefile, purgefile,
stretchit, makedirectory, crunch, opendirectory, closedirectory, catalog,
stripname, setunitprefix, openvolume, duplicatelink, openparentdir,
catpasswords,setpasswords,lockfile,unlockfile,openunit);
damtype = procedure (anyvar f: fib; unum:unitnum; request: damrequesttype);
unitentry = {unitable entry definition}
packed record
dam: damtype; {directory access method}
tm: amtype; {byte block transfer method}
sc: byte; {select code}
ba: byte; {bus address}
du: byte; {disc unit}
dv: byte; {disc volume}
byteoffset: integer; {physical starting byte of volume}
devid: integer; {identifier (Amigo identify sequence)}
uvid: vid; {volume id}
dvrtemp: integer; {temp for driver use only; init to 0!}
dvrtemp2: shortint; {temp for driver use only; init to 0!}
letter: char; {device specifier letter}
offline, {unit absent or down flag}
uisinteractive, {user can edit input}
umediavalid, {medium not changed since last access}
uuppercase: boolean; {volume name must be uppercased}
uisfixed: boolean; {fixed/removeable media flag}
ureportchange: boolean; {