)) > )> >> > )) ) TS) > >) (T > >) (T >)>)>>) (T "XMDL")>> ) "AUX" RTM1 RTM2 UV UVX) #DECL ((TM) (RTM1 RTM2) FIX (UVX UV) ) > >>>) ( )> > > >)> )> > )> ; "Get seconds and microseconds of current time; will discard time zone" > > ; "Set up seconds and microseconds of interval" <1 .UVX 0> <2 .UVX 0> <3 .UVX .RTM1> <4 .UVX .RTM2> ; "How many seconds left?" .STIME1>>> ; "How many microseconds left?" .STIME2>>> 0> > >)> > > 1000000.0>>>>> ) (QUOTE? <>) (QUOTER !\^)) #DECL ((STR) STRING) >) (T ) VAL) #DECL ((S) STRING (C) CHARACTER (VAL) ) 1> > > > >> ) ()> >) ( > ) ( > >> > >>>) (<==? .C > >) ()> 1> >) (>)>) (T ) (T )>)>> .STR>)>> >)) #DECL ((CHR) CHARACTER (STR NS) STRING) >)> > .CHR> )>>> (DEFAULTS?) (TS TNM1 TNM2) ) > ; "Has nm1.nm2" >> ; "Get nm2, whatever it is" >> FIX> >)>) (T >)>) (T >)>) (T >> FIX> >)>) (>)>) (>)> >> FIX> >)>) (>)>)> <1 .STOR .TNM1> <2 .STOR .TNM2>> ) >) (T >>>)> >> .NS .STR1> .NS> >)) #DECL ((VEC) (TMP) (TUV) ) > ; "Get current size of P1, so we can grow it when needed" > ; "Structure to look on for TTY descriptors, fbins, etc." > ;"Save vector for later use" ; "Sigh. Dream on..." > >>) (>)> > >>) (>)> > >) (>)> > )> T> ) >)> > >)> !\=> > ) (>)>)> <1 .NNS>> >)> > >> ) (>)>>> ; "Makes sure connected directory is known, then returns snm part and dev part." > ; "Returns T if still connected to directory we used to be connected to." > > > <==? .DEV ,I$CONNECTED-DEV>>> ; "Sets I$CONNECTED-DIR (full directory name), I$CDIR (snm part), I$CDEV (dev part), I$CONNECTED-INODE, I$CONNECTED-DEV" > ,INODE-OFFS, INODE-SIZE>> > > ; "Gets actual connected directory, properly split up and such. Calls I$SET-CONNECTED-DIR when done. If still connected, doesn't do anything." ,I$CONNECTED-DIR > > > >)>) (T >>)>> ) ..ATM) ( ,.ATM)>> > 0) (.TS)>> ) "AUX" (NEW? <>) VAL STDNAM (DEVTYP ,DEV-DISK) VEC RES) #DECL ((NAME MODE BSZ) STRING (DEVNAM) (NEW?) ) )> > > > .NEW?> > >) (>)>) (>)>)> .RES) ( ) ( .NAME .MODE .BSZ !>)>>> ) (.VAL)>) ()>> >> > "MUD"> [,DEV-DISK % ,DEV-BDISK % ,DEV-VDISK % ,DEV-OTHER-DISK % ,DEV-OVDISK % ,DEV-CONSOLE % ,DEV-PTY % ,DEV-TTY % ,DEV-TTYN % ,DEV-NETTTY % ,DEV-DMFTTY %]> ; "Try to fool everybody into thinking ttys exist" <> T$FILE-HANDLE I$DEF-FILE-HANDLE T$DEV I$DEF-DEV T$SNM I$DEF-SNM T$NM1 I$DEF-NM1 T$NM2 I$DEF-NM2 T$NAME I$DEF-NAME T$SHORT-NAME I$DEF-SHORT-NAME T$READ-DATE X$DEF-HACK-DATE T$WRITE-DATE X$DEF-HACK-DATE T$GET-MODE X$DEF-GET-MODE T$GET-BYTE-SIZE X$DEF-GET-BYTE-SIZE> > 2> 3> 4> 5> 6> % X$UP-WRITE-BUF % X$UP-WRITE-BYTE % X$UP-READ-BYTE> > > > >T> <> T 0 <>] T$CHANNEL>>> <> T "" <>] T$CHANNEL>>> T> ; "Eventually this needs to do something about the name (if that's possible). Note that cretinous UNIX doesn't provide an error-name system call." (NAME?) ) > "AUX" (EC:FIX <1 .ERR>) (ERRS:VECTOR ,I$ERROR-STRINGS)) > "Unknown error") (T )>> (NAME?) ) > T>>)> > (SST) STRING) ) (T )> .SST)>> > 8> > 16> > 24>>) (<==? .SIZE 2> > 8>>) (<1? .SIZE> FIX>)>> ) "AUX" SST) #DECL ((FIL) (NAME?) (SST) ) .NAME?> >) ()> ,FMT-MASK>>)>> (BC) FIX (ST) (BINARY?) ) > > > ,BYTES/WORD>) (.BC)>)>> \ ) STOR "AUX" (NS >) TS (TDEV <>) (TSNM <>) DT) #DECL ((STR) STRING (DEFAULTS?) (STOR NS) (TS) (TDEV TSNM) ) > )> > > ,DEV-DISK> .DT FIX>> > FIX>> FIX>> FIX>>> <1 .STOR > <2 .STOR <>> <3 .STOR <>> <4 .STOR <>> .TS) (T > >) ()> ; "Extract non-directory component" > <==? .TS > <==? <1 .STR> !\/>> ; "Don't have any file name part" >>)> .DEFAULTS?> ; "Make nm1 and nm2" >> FALSE FIX>> >)> >> FALSE FIX>> >)> ; "Fill in device and directory from arg, directory, dev, snm." >) ()>)>)>> > (TS) ) > T$ATOM> <0? >> ; "Don't include leading / if device not requested" "") ( !\/>> !\/) (T "")> >>> T>) (>> .TS) ("")> > ATOM FALSE> <0? > > > <==? <1 .TS> !\/>>> "") (!\/)> > >>> .TS) ("")> <4 .STOR>> >> >>> "/") ("")> > <0? >> "") (<3 .STOR>)> >>> ".") ("")> > <0? >> "") (<4 .STOR>)>>> ; "Called with beginning of name string, name string rested to just past last /, 5-tuple, default dev and snm. Maybe return <>, sometimes. Call with <> <> .STOR <> <> to force breakup of directory name into components; name is <5 .STOR>." ) RSNM RDEV TEMP TEMP2 USER DT RSTR FOO) #DECL ((STR TS) (STOR) (FOO RSTR) STRING (TEMP2 TEMP TDEV TSNM) (I$DIRACT) (DT) (FORCE?) ) 1> <==? <1 .STR> !\/>> ; "Allow opening of /" >>) ( > <==? <1 .TS> !\/>> >) ( <==? <1 >> !\/>> >)> >>) (T > )> 1> <==? <1 .RSTR> >>> ; "User didn't supply directory, use default" > )> )> > <5 .STOR ,I$CONNECTED-DIR>)>)> <1 .STOR .TDEV> <2 .STOR .TSNM>) (T !\~> ; "Home directory hack?" > > > > >) (T ; "Couldn't find home directory" )>)> > ,DEV-DISK> .DT FIX>> > FIX>> FIX>> FIX>>> <1 .STOR > <2 .STOR <>>) ( >> <==? <1 .RSTR> !\/>> ; "No other funniness, just return. Break down later, if requested." <5 .STOR .RSTR> <1 .STOR T> <2 .STOR T>) (T >)>)>> ) <5 .STOR .STR> <1 .STOR .DEV> <2 .STOR .SNM>> (TS) ) )> !\/>> ; "Hair required" > ) ( ) ()>)> >)> ,DEV-OFFS ,DEV-SIZE>) (RDEV ,DEV-OFFS ,DEV-SIZE>) TS (TDEV -1) (RS >)) #DECL ((TDEV CDEV RDEV) FIX (TS) ) > > <1 .TS > ,DEV-OFFS ,DEV-SIZE>> <1 .TS !\/> T <- 2>>>) (T T <- 2>>> T <- 1>>>)> )> ) ( ; "Handle /usr/taa, where /usr and /usr/taa are on same device, but /usr is root of a filesystem" T <- 2>>>) (T T <- 2>>> T <- 1>>>)> ) (T T <- 2>>> )>> > ) TEMP (DOT ".") (DOTDOT "..") (RNAM "/") (L ()) STAT RINO RDEV INO DDEV (ERR? T)) #DECL ((STAT STR) STRING (STANDARD?) (SINODE INO DDEV RINO RDEV) FIX (L) ]> (ERR?) ) <=? .STR .DOT>> )> >)> ; "Make sure we have it" >> )>)> > >> >>)> > > > > > > <==? .RDEV .DDEV>> ; "Return immediately if looking at root" ) (T (DB STAT) STRING (DIFF?) ) > ; "Read the inode and device for the superior directory" > ,INODE-OFFS ,INODE-SIZE>> > ; "And connect to it" ; "If just changed devices, extra hair needed." >) ()> ; "Grovel through superior, looking for inferior's name" ) ; "Read a directory block" > > )> )> ; "Compare inodes, possibly devices. In 4.2, probably more than one file in directory block." )> > ; "Pick up first inode #" > ; "Length of this entry" > ; "Length of name in this entry" > <==? .TINO .INO>) (T > ,INODE-OFFS ,INODE-SIZE>> <==? .DDEV >>)> ; "Have name from superior" .NNM>> ; "Cons onto list, close directory, return." !.L)> )> >> ; "Are we through with this block?" >)>> ; "Now looking at superior" <==? .NDDEV .RDEV>> ; "Superior is root, no need to look further" )> )>>) (T )>> >>)> ) ()> > >)) #DECL ((STR) STRING (RAISE?) (ES?) ) >)> ) (A )) #DECL ((C) CHARACTER (A) FIX) <==? .ES? .SS>> ) (.RAISE? > >> >>>) (> >> ) (.C)>) (.C)>> .STR>> ) >> >> >> ) (T )>> ) (T$NM2 ) (T$DEV ) (T$SNM ) "AUX" NAME VAL) #DECL ((NM) STRING (T$NM1 T$NM2 T$DEV T$SNM) >) > > .NM) ()>) ()>> ) (T$NM2 )(T$DEV ) (T$SNM ) "AUX" FID NN) #DECL ((NAME) STRING (T$NM1 T$NM2 T$DEV T$SNM) >) > > T) (T )>) ()>>