1
0
mirror of synced 2026-01-18 01:22:09 +00:00

1 line
7.6 KiB
Plaintext

(FILECREATED "24-Oct-2020 21:02:31" ("compiled on "
{DSK}<home>larry>ilisp>ENVOS>MISC>TEST>Tools>FDEVTEST.;1) " 9-Apr-2000 18:01:32" bcompl'd in
"Medley 3.5 PARC Full Sysout 4-Nov-2003 ..." dated " 4-Nov-2003 23:32:48")
(FILECREATED " 6-Sep-85 10:23:52" {DSK}<LISPFILES>FDEVTEST.;2 9718 changes to: (VARS FDEVTESTCOMS))
(*Lots more has to be done here but I have the basic data structures here needed to create the test
code)
(PRETTYCOMPRINT FDEVTESTCOMS)
(RPAQQ FDEVTESTCOMS ((RECORDS FDEV) (MACROS .APPLY. FDEVOP) (P (MOVD (QUOTE APPLY*) (QUOTE
SPREADAPPLY*)))))
(DATATYPE FDEV ((DEVICENAME POINTER) (RESETABLE FLAG) (RANDOMACCESSP FLAG) (NODIRECTORIES FLAG) (
PAGEMAPPED FLAG) (* True if i/o handled by pmap routines) (FDBINABLE FLAG) (* Copied as a microcode
flag for INPUT streams formed on this device) (FDBOUTABLE FLAG) (FDEXTENDABLE FLAG) (BUFFERED FLAG) (*
True implies that the device supports the BIN & BOUT uCode conventions, and implements the
GETNEXTBUFFER method) (* Device operations:) (REMOTEP FLAG) (* true if device not local to machine) (
SUBDIRECTORIES FLAG) (* true if device has real subdirectories) (NIL 6 FLAG) (CLOSEFILE POINTER) (* (
stream) => closes stream, returns it) (DELETEFILE POINTER) (* (name) => deletes file so named,
returning name, or NIL on failure. RECOG=OLDEST) (DIRECTORYNAMEP POINTER) (* (host/dir) => true if
directory exists on host) (EVENTFN POINTER) (* (device event) , called before/after logout, sysout,
makesys) (GENERATEFILES POINTER) (* (device pattern) => generator object for files matching pattern.
Car of object is generator function, cdr is arbitrary state. Generator fn returns next file, or NIL
when finished) (GETFILEINFO POINTER) (* (stream/name attribute device) => value of attribute for open
stream or name of closed file) (GETFILENAME POINTER) (* (name recog device) => full file name) (
HOSTNAMEP POINTER) (* (hostname {device}) => T if hostname is valid. If device is given, return a FDEV
for this {new} host, or T to use existing device) (OPENFILE POINTER) (* (name access recog otherinfo
device) => new stream open on this device, or NIL if name not found) (READPAGES POINTER) (* (stream
firstpage# buflist) => # of bytes read, starting at firstpage#, reading into buflist, a list of
buffers or a single buffer (the usual case)) (REOPENFILE POINTER) (* (name access recog otherinfo
device stream) like openfile, but called after logout to revalidate file, so optionally uses info in
old stream to keep this opening like the previous) (SETFILEINFO POINTER) (* (stream/name attribute
newvalue device) sets attribute of open stream or closed file of given name) (TRUNCATEFILE POINTER) (*
(stream page offset) make stream's eof be at page,offset, discarding anything after it) (WRITEPAGES
POINTER) (* (stream firstpage# buflist) writes from buflist to stream starting at firstpage# of stream
) (BIN POINTER) (* (stream) => next byte of input) (BOUT POINTER) (* (stream byte) output byte to
stream) (PEEKBIN POINTER) (* (stream) => next byte without advancing position in stream) (READP
POINTER) (* (stream flag) => T if there is input available from stream) (BACKFILEPTR POINTER) (* (
stream) backs up "fileptr" by one. Stream is only required to be able to do this once, i.e.
one-character buffer suffices) (DEVICEINFO POINTER) (* arbitrary device-specific info stored here) (
FORCEOUTPUT POINTER) (* (stream waitForFinish) flushes out to device anything that is buffered
awaiting transmission) (LASTC POINTER) (* Should be possible only if RANDOMACCESSP) (SETFILEPTR
POINTER) (GETFILEPTR POINTER) (GETEOFPTR POINTER) (EOFP POINTER) (BLOCKIN POINTER) (* (stream buffer
byteoffset nbytes)) (BLOCKOUT POINTER) (* (stream buffer byteoffset nbytes)) (RENAMEFILE POINTER) (*
oldfile newfile device) (RELEASEBUFFER POINTER) (* (stream) => Does whatever appropriate when CBUFPTR
is released) (GETNEXTBUFFER POINTER) (* (stream whatfor noerrorflg) => Disposes of current buffer and
optionally reads next. whatfor is READ or WRITE. Can cause EOF error unless noerrorflg) (SETEOFPTR
POINTER) (* (stream length) => truncates or lengthens stream to indicated length) (FREEPAGECOUNT
POINTER) (* (host/dir dev) => # of free pages on host/dir) (MAKEDIRECTORY POINTER) (* (host/dir dev))
(WINDOWOPS POINTER) (* window system operations - type WSOPS) (WINDOWDATA POINTER) (* data for window
systems) (CHECKFILENAME POINTER) (* (name dev) => name if it is well-formed file name for dev) (
HOSTALIVEP POINTER) (* (host dev) => true if host is alive, i.e., responsive; only defined if REMOTEP
is true) (OPENP POINTER) (* (name access dev) => stream if name is open for access, or all open
streams if name = NIL) (OPENFILELST POINTER) (* Default place to keep list of streams open on this
device) (NIL POINTER) (* Spare)) DIRECTORYNAMEP _ (FUNCTION NILL) HOSTNAMEP _ (FUNCTION NILL) READP _
(FUNCTION \GENERIC.READP) SETFILEPTR _ (FUNCTION \IS.NOT.RANDACCESSP) GETFILEPTR _ (FUNCTION
\ILLEGAL.DEVICEOP) GETEOFPTR _ (FUNCTION \IS.NOT.RANDACCESSP) EOFP _ (FUNCTION \ILLEGAL.DEVICEOP)
BLOCKIN _ (FUNCTION \GENERIC.BINS) BLOCKOUT _ (FUNCTION \GENERIC.BOUTS) RENAMEFILE _ (FUNCTION
\GENERIC.RENAMEFILE) FORCEOUTPUT _ (FUNCTION NILL))
(/DECLAREDATATYPE (QUOTE FDEV) (QUOTE (POINTER FLAG FLAG FLAG FLAG FLAG FLAG FLAG FLAG FLAG FLAG FLAG
FLAG FLAG FLAG FLAG FLAG POINTER POINTER POINTER POINTER POINTER POINTER POINTER POINTER POINTER
POINTER POINTER POINTER POINTER POINTER POINTER POINTER POINTER POINTER POINTER POINTER POINTER
POINTER POINTER POINTER POINTER POINTER POINTER POINTER POINTER POINTER POINTER POINTER POINTER
POINTER POINTER POINTER POINTER POINTER POINTER POINTER POINTER)) (QUOTE ((FDEV 0 POINTER) (FDEV 0 (
FLAGBITS . 0)) (FDEV 0 (FLAGBITS . 16)) (FDEV 0 (FLAGBITS . 32)) (FDEV 0 (FLAGBITS . 48)) (FDEV 0 (
FLAGBITS . 64)) (FDEV 0 (FLAGBITS . 80)) (FDEV 0 (FLAGBITS . 96)) (FDEV 0 (FLAGBITS . 112)) (FDEV 2 (
FLAGBITS . 0)) (FDEV 2 (FLAGBITS . 16)) (FDEV 2 (FLAGBITS . 32)) (FDEV 2 (FLAGBITS . 48)) (FDEV 2 (
FLAGBITS . 64)) (FDEV 2 (FLAGBITS . 80)) (FDEV 2 (FLAGBITS . 96)) (FDEV 2 (FLAGBITS . 112)) (FDEV 2
POINTER) (FDEV 4 POINTER) (FDEV 6 POINTER) (FDEV 8 POINTER) (FDEV 10 POINTER) (FDEV 12 POINTER) (FDEV
14 POINTER) (FDEV 16 POINTER) (FDEV 18 POINTER) (FDEV 20 POINTER) (FDEV 22 POINTER) (FDEV 24 POINTER)
(FDEV 26 POINTER) (FDEV 28 POINTER) (FDEV 30 POINTER) (FDEV 32 POINTER) (FDEV 34 POINTER) (FDEV 36
POINTER) (FDEV 38 POINTER) (FDEV 40 POINTER) (FDEV 42 POINTER) (FDEV 44 POINTER) (FDEV 46 POINTER) (
FDEV 48 POINTER) (FDEV 50 POINTER) (FDEV 52 POINTER) (FDEV 54 POINTER) (FDEV 56 POINTER) (FDEV 58
POINTER) (FDEV 60 POINTER) (FDEV 62 POINTER) (FDEV 64 POINTER) (FDEV 66 POINTER) (FDEV 68 POINTER) (
FDEV 70 POINTER) (FDEV 72 POINTER) (FDEV 74 POINTER) (FDEV 76 POINTER) (FDEV 78 POINTER) (FDEV 80
POINTER) (FDEV 82 POINTER))) (QUOTE 84))
(PUTPROPS .APPLY. MACRO ((U V) (* body for APPLY, used by RETAPPLY too) (PROG ((DEF U)) LP (COND ((
LITATOM DEF) (COND ((NOT (fetch (LITATOM CCODEP) of DEF)) (* EXPR) (SETQ DEF (fetch (LITATOM
DEFPOINTER) of DEF))) ((EQ (fetch (LITATOM ARGTYPE) of DEF) 3) (GO NLSTAR)) (T (GO NORMAL))))) (COND (
(LISTP DEF) (SELECTQ (CAR DEF) (NLAMBDA (AND (NLISTP (CADR DEF)) (CADR DEF) (GO NLSTAR))) (FUNARG (
SETQ DEF (CADR DEF)) (GO LP)) NIL)) ((NULL DEF) (RETURN (FAULTAPPLY U V)))) NORMAL (RETURN (
SPREADAPPLY U V)) NLSTAR (* NLAMBDA*) (RETURN (SPREADAPPLY* U V)))))
(PUTPROPS FDEVOP MACRO (ARGS (CONS (QUOTE SPREADAPPLY*) (CONS (COND ((EQ (CAR (LISTP (CAR ARGS))) (
QUOTE QUOTE)) (LIST (QUOTE fetch) (CADAR ARGS) (QUOTE of) (CADR ARGS))) (T (HELP
"FDEVOP - OPNAME not quoted:" ARGS))) (CDDR ARGS)))))
(MOVD (QUOTE APPLY*) (QUOTE SPREADAPPLY*))
(PUTPROPS FDEVTEST COPYRIGHT ("Xerox Corporation" 1985))
NIL