DIRECTORY Basics USING [LongNumber, Word16], BasicTime USING [FromNSTime, GMT, OutOfRange], CrRPC, FilingP10V5, FilingAttributesP10V5 USING [FileID, InterpretedAttributeType], FilingP10V5ClientHack USING [MProc29, MProc4, GetError], RefText USING [InlineAppendChar, ObtainScratch], QuickFilingP10V5; QuickFilingP10V5Impl: CEDAR PROGRAM IMPORTS BasicTime, CrRPC, FilingP10V5ClientHack, RefText EXPORTS QuickFilingP10V5 ~ BEGIN OPEN FilingP10V5; IAT: TYPE ~ FilingAttributesP10V5.InterpretedAttributeType; createdOn: CARD32 ~ IAT.createdOn.ORD; dataSize: CARD32 ~ IAT.dataSize.ORD; fileID: CARD32 ~ IAT.fileID.ORD; isDirectory: CARD32 ~ IAT.isDirectory.ORD; name: CARD32 ~ IAT.name.ORD; numberOfChildren: CARD32 ~ IAT.numberOfChildren.ORD; pathname: CARD32 ~ IAT.pathname.ORD; type: CARD32 ~ IAT.type.ORD; version: CARD32 ~ IAT.version.ORD; QuickGetAttributes: PUBLIC PROC [h: CrRPC.Handle, file: Handle, types: AttributeTypeSequence, session: Session] RETURNS [vers: CARDINAL, bytes: INT, created: BasicTime.GMT, fileType: CARD, pathName: REF TEXT, fID: FilingAttributesP10V5.FileID, isDir: BOOL, numKids: CARD] = { PutArgs: CrRPC.PutArgsProc ~ { FOR i28: CARDINAL IN [0..2) DO CrRPC.PutCard16[s, file[i28]]; ENDLOOP; FilingP10V5ClientHack.MProc29[h, s, types]; FOR i30: CARDINAL IN [0..2) DO CrRPC.PutCard16[s, session.token[i30]]; ENDLOOP; FilingP10V5ClientHack.MProc4[h, s, session.verifier]; }; GetResults: CrRPC.GetResultsProc ~ { length: CARDINAL ~ CrRPC.GetCard16[s]; FOR i: CARDINAL IN [0..length) DO Get32: PROC RETURNS [num: CARD32] = INLINE { temp: Basics.LongNumber; len: CARDINAL ~ CrRPC.GetCard16[s]; IF len # 2 THEN ERROR; temp.hi ¬ CrRPC.GetCard16[s]; temp.lo ¬ CrRPC.GetCard16[s]; num ¬ temp.lc; }; attribute: Attribute; attribute.type ¬ CrRPC.GetCard32[s]; SELECT attribute.type FROM createdOn => { temp: CARD32 ~ Get32[]; created ¬ BasicTime.FromNSTime[temp ! BasicTime.OutOfRange => CONTINUE]; }; dataSize => bytes ¬ Get32[]; fileID => { len: CARDINAL ~ CrRPC.GetCard16[s]; IF len # 5 THEN ERROR; FOR i: CARDINAL IN [0 .. 5) DO fID[i] ¬ CrRPC.GetCard16[s]; ENDLOOP; }; isDirectory => { len: CARDINAL ~ CrRPC.GetCard16[s]; IF len # 1 THEN ERROR; isDir ¬ IF CrRPC.GetCard16[s] = 1 THEN TRUE ELSE FALSE; }; numberOfChildren => { len: CARDINAL ~ CrRPC.GetCard16[s]; IF len = 1 THEN numKids ¬ CrRPC.GetCard16[s]; }; pathname => { length: CARDINAL ~ CrRPC.GetCard16[s]; word, len: NAT ¬ 0; temp: Basics.Word16; P: PROC [l: NAT] RETURNS[c: CHAR] = INLINE { IF l MOD 2 = 0 THEN {temp.card ¬ CrRPC.GetCard16[s]; word ¬ word + 1; c ¬ VAL[temp.hi]} ELSE {c ¬ VAL[temp.lo]}; }; len ¬ CrRPC.GetCard16[s]; pathName ¬ RefText.ObtainScratch[len]; word ¬ word + 1; FOR i: NAT IN [0 .. len) DO char: CHAR ~ P[i]; pathName ¬ RefText.InlineAppendChar[pathName, char]; ENDLOOP; IF word # length THEN ERROR; }; type => fileType ¬ Get32[]; version => { len: CARDINAL ~ CrRPC.GetCard16[s]; IF len # 1 THEN ERROR; vers ¬ CrRPC.GetCard16[s]; }; ENDCASE => { -- the value was not one we are looking for so eat the data len: CARDINAL ~ CrRPC.GetCard16[s]; FOR j: CARDINAL IN [0..len) DO [] ¬ CrRPC.GetCard16[s]; ENDLOOP; }; ENDLOOP; }; CrRPC.Call[h~h, remotePgm~10, remotePgmVersion~5, remoteProc~8 , putArgs~PutArgs, getResults~GetResults, getError~FilingP10V5ClientHack.GetError]; }; END.  QuickFilingP10V5Impl.mesa Copyright Σ 1988, 1990, 1991 by Xerox Corporation. All rights reserved. Tim Diebert: August 11, 1988 10:44:52 am PDT Bill Jackson (bj) February 12, 1990 8:56:06 pm PST Willie-s, December 11, 1991 7:26 pm PST got the type now get the data ΚU–(cedarcode) style•NewlineDelimiter ™šœ™Icodešœ Οeœ=™HK™,K™2K™'K™—šΟk ˜ Kšœžœ˜"Kšœ žœ žœ˜.K˜Kšœ ˜ Kšœžœ$˜?Kšœžœ˜8Kšœžœ#˜0Kšœ˜K˜—K˜KšΠlnœžœž˜#Kšžœ1˜8Kšžœ˜šœžœžœ ˜Icode1˜Lšžœžœ2˜;L˜Lšœ žœžœ žœ˜&Lšœ žœžœ žœ˜$Lšœžœžœžœ˜ Lšœ žœžœ žœ˜*Lšœžœžœžœ˜Lšœžœžœžœ˜4Lšœ žœžœ žœ˜$Lšœžœžœžœ˜Lšœ žœžœ žœ˜"K˜K˜šΟnœžœžœQžœžœ žœžœ žœ žœžœ,žœ žœ˜“š œ˜šžœžœžœž˜K˜Kšžœ˜—Kšœ+˜+šžœžœžœž˜K˜'Kšžœ˜—Kšœ5˜5K˜—š  œ˜$Kšœžœ˜&šžœžœžœ ž˜!š  œžœžœžœžœ˜,K˜Kšœžœ˜#Kšžœ žœžœ˜K˜K˜K˜Kšœ˜—Kšœ˜K˜$Kšœ™šžœž˜šœ˜Kšœžœ ˜Kšœ>žœ˜HKšœ˜—K˜šœ ˜ Kšœžœ˜#Kšžœ žœžœ˜šžœžœžœ ž˜K˜Kšžœ˜—Kšœ˜—šœ˜Kšœžœ˜#Kšžœ žœžœ˜Kš œžœžœžœžœžœ˜7Kšœ˜—šœ˜Kšœžœ˜#Kšžœ žœ˜-Kšœ˜—šœ ˜ K•StartOfExpansion[len: INT, p: PROCšœžœ˜&Kšœ žœ˜K˜š  œžœžœžœžœžœ˜,šžœžœ˜Kšžœ7žœ ˜HKšžœžœ ˜—Kšœ˜—K–[len: INT, p: PROC˜K˜&K˜šžœžœžœ ž˜Kšœžœ˜K˜4Kšžœ˜—Kšžœžœžœ˜Kšœ˜—K˜šœ ˜ Kšœžœ˜#Kšžœ žœžœ˜K˜Kšœ˜—šžœΟc;˜HKšœžœ˜#šžœžœžœ ž˜K˜Kšžœ˜—Kšœ˜——Kšžœ˜—K˜K˜—Kšœ’˜’K˜Kšœ˜—K˜—K˜Kšžœ˜—…— άC