;<PUP>PLFDEF.MAC.2, 10-Apr-82 20:55:34, Edit by SCHOEN
; removed USEVAR as it was unnecessary

	universal plfdef
	subttl	Definitions for Tenex Leaf implementation
	search pupdef

;	Eric Schoen
;	SUMEX Computer Project
;	Stanford University Medical Center
;	Stanford, CA
;	August, 1981

;	Work on Leaf and Sequin implementations in Tenex
;	was funded by NIH Biotechnology Resouces Program
;	under grant RR-00785

; LeafOp definitions
LfErr==0		; LeafError
LfOpen==1		; LeafOpen
LfClos==2		; LeafClose
LfDel==3		; LeafDelete
LfLen==4		; LeafLength (not implemented)
LfTrun==5		; LeafTrunctae (obsolete)
LfRead==6		; LeafRead
LfWrit==7		; LeafWrite
LfRest==10		; LeafReset
LfNop==11		; LeafNop (obsolete)
LfParm==13		; LeafParams
LfProp==14		; GetLeafProp


; LeafOpen mode bits
lfo.rd==1b20		; Open read
lfo.wr==1b21		; Open write
lfo.ex==1b22		; Open to extend (i.e. write)
lfo.ml==1b23		; Allow wildcard (not implemented on IFS)
lfo.cr==1b24		; Create a new file
lfo.vn==0b26		; Don't allow an explicit version number
lfo.vo==1b26		; Old file only (not in IFS/Leaf)
lfo.vr==2b26		; Old file or next file (not in IFS/Leaf)
lfo.va==3b26		; Any version number is legal
lfo.dd==0b28		; Expect an explicit version number
lfo.dl==1b28		; Default to lowest version
lfo.dh==2b28		; Default to highest version
lfo.dn==3b28		; Default to next version
lfo.mw==1b31		; Allow multiple writers (not implemented)

; error codes (these are defined as needed)
erNmMl==↑d201		; Malformed file name
erIlVr==↑d204		; Illegal version
erAcDn==↑d208		; access denied
erFlBz==↑d209		; file busy
erNtDl==↑d215		; not deletable
erUsrN==↑d216		; Bad user name
erUsrP==↑d217		; Bad User password
erFilS==↑d218		; Files only directory
erConN==↑d219		; Bad connect name
erConP==↑d220		; Bad connect password
erBkLf==↑d1001		; Broken Leaf
erBdLf==↑d1010		; Unimplemented Leaf Op
erBdHn==↑d1011		; Bad file handle
erIlRd==↑d1015		; Illegal Leaf Read
erIlWr==↑d1016		; Illegal Leaf Write


; Leaf wakeup constants
idle1==1		; wait 1 minute at short delay
idle2==4		; wait four minutes at long delay
shrtd==↑d100		; 100 ms short delay
longd==↑d1000		; 1 sec long delay

	end