DIRECTORY AccessCH USING [Problem], AdobeCommon USING [--ChangeSystem, DataHandle, FreeHintStrings, GetDataSW, GetDescList, --Handle, InitialSetStatus--, LockedSysDescPtr--, PostMessage, ReportFields, ReportFieldsSeq, SetStatus--, StringArray--], AdobeOps USING [ARNumber, ARSystemHandle--, DefaultInfoObject--, FieldList, nilARNumber, QLHandle, QueryList, SetOfARs, ToolType, UserOrderSequence, UserSpecifiedOrder], AdobeP75V2, AdobeToolContext, ARAccess, Ascii USING [NUL], BasicTime USING [GMT], Convert USING [CardFromRope, RopeFromTime], IO USING [Close, EndOf, GetChar, PutChar, STREAM], CmFile USING [ Close, Error, FindSection, FreeString, Handle, NextItem, Open], CrRPC USING [BulkDataSink], PFS USING [Delete, PathFromRope, StreamOpen], Rope USING [Cat, Concat, Equal, Fetch, Length, Substr, ROPE], Token USING [ Alphabetic, AlphaNumeric, Brackets, Decimal, Filtered, FilterProcType, FreeTokenString, FreeStringHandle, Line, MaybeQuoted, NonWhiteSpace, Handle, StringToHandle, SyntaxError], XNSAdobeClientOps USING [GetSystemDefaultUserFile, StubError, UnknownAddress]; --Window USING [Handle, Place]; AdobeCommonImplE: CEDAR PROGRAM IMPORTS AccessCH, AdobeCommon, --AdobeCommonInternal, AdobeOps, AdobeServer, AdobeToolContext, ARAccess, Convert--, MFile, MStream--, CmFile, IO, PFS --Put, --, Rope--Stream, --String--, Token, XNSAdobeClientOps EXPORTS AdobeCommon = BEGIN ValueSequencePtr: TYPE = REF ValueSequence; ValueSequence: TYPE = RECORD [ seq: SEQUENCE length: CARDINAL OF Rope.ROPE]; InvalidFieldName: SIGNAL = CODE; SyntaxError: SIGNAL = CODE; CatchErrors: PUBLIC PROCEDURE [ h: AdobeCommon.Handle, --item: FormSW.ItemHandle, index: CARDINAL, --windowData: AdobeCommon.DataHandle, --proc: PROC[h: AdobeCommon.Handle]] = { errorMessage: Rope.ROPE; BEGIN ENABLE { AccessCH.Problem => { SELECT type FROM noClearinghouse => errorMessage ฌ "Clearinghouse is unavailable."; authProblem => errorMessage ฌ "Authentication problem."; badDatabaseName => errorMessage ฌ "badDatabaseName."; badDatabaseFile => errorMessage ฌ "Can't open database file."; accessProblem => errorMessage ฌ "access problem in reaching clearinghouse."; ENDCASE => errorMessage ฌ "AccessCH.Problem"}; AdobeToolContext.StreamError => { errorMessage ฌ "AR File contains bad data - contact support!"; GOTO ErrorExit}; AdobeToolContext.EnumError => { errorMessage ฌ "AR File contains an invalid enumerated value - contact support!"; GOTO ErrorExit}; ABORTED => {errorMessage ฌ "Aborted!"; GOTO ErrorExit}}; proc[h]; EXITS ErrorExit => { AdobeCommon.PostMessage[h, TRUE, errorMessage]; h.isBusy ฌ FALSE}; END}; ReadTil: PROCEDURE [r: Rope.ROPE, currentIndex: CARD, c: CHAR] RETURNS [newIndex: CARD] ~ { i: INT; FOR i ฌ currentIndex + 1, i + 1 UNTIL i >= r.Length[] OR r.Fetch[i] = c DO ENDLOOP; RETURN[i]; }; AdobeTimeRope: PUBLIC PROCEDURE [time: BasicTime.GMT] RETURNS [timeRope: Rope.ROPE ฌ NIL] = { cedarTime: Rope.ROPE ฌ Convert.RopeFromTime[time, years, seconds, FALSE, FALSE, FALSE]; index, tmp: CARD ฌ 0; timeRope ฌ timeRope.Cat["-", Rope.Substr[cedarTime, index, 3], "-"]; index ฌ ReadTil[cedarTime, index, ' ] + 1; tmp ฌ ReadTil[cedarTime, index, ',] ; timeRope ฌ Rope.Concat[Rope.Substr[cedarTime, index, tmp - index], timeRope]; index ฌ tmp + 4; timeRope ฌ timeRope.Cat[Rope.Substr[cedarTime, index, 2], " "]; index ฌ index + 3; tmp ฌ ReadTil[cedarTime, index, 'X]; timeRope ฌ timeRope.Concat[Rope.Substr[cedarTime, index, tmp-index]]; }; SetFSWOrderAndDefaultFromUserFile: PUBLIC PROCEDURE [ systemName: Rope.ROPE, arSH: AdobeOps.ARSystemHandle, server: Rope.ROPE] = BEGIN fL: AdobeOps.FieldList ฌ arSH.fieldList; localName: Rope.ROPE ฌ GetLocalName[systemName]; userFile: Rope.ROPE ฌ localName; cmH: CmFile.Handle ฌ NIL; noUserFile: BOOLEAN ฌ FALSE; localName ฌ NIL; userFile ฌ ConvertToUserFileName[userFile]; userFile ฌ userFile.Concat[".user"]; cmH ฌ CmFile.Open[ userFile ! CmFile.Error => IF code = fileNotFound THEN { [cmH, noUserFile] ฌ GetUserFileFromService[ systemName, userFile]; IF noUserFile THEN CONTINUE ELSE RETRY}]; FOR tool: AdobeOps.ToolType IN AdobeOps.ToolType DO IF noUserFile THEN arSH.formSWOrderArray[tool] ฌ AllDisplayed[fL.length] ELSE arSH.formSWOrderArray[tool] ฌ SearchUserFileForDisplayed[ cmH, fL, tool]; ENDLOOP; IF ~noUserFile THEN { cmH ฌ CmFile.Close[cmH]; }; END; AllDisplayed: PROCEDURE [length: CARDINAL] RETURNS [formSWOrder: AdobeOps.UserSpecifiedOrder] = BEGIN ENABLE UNWIND => NULL; --AdobeOps.z.FREE[@formSWOrder]; formSWOrder ฌ NEW[AdobeOps .UserOrderSequence[length]]; FOR i: CARDINAL IN [0..length) DO formSWOrder[i] ฌ i; ENDLOOP; END; SearchUserFileForDisplayed: PROCEDURE [cmH: CmFile.Handle, fL: AdobeOps.FieldList, tool: AdobeOps.ToolType] RETURNS [formSWOrder: AdobeOps.UserSpecifiedOrder] = BEGIN toolNames: ARRAY AdobeOps.ToolType OF Rope.ROPE ฌ [ "Edit", "Submit", "Report", "Query", "Sort", "QueryList"]; isADefault: BOOLEAN ฌ FALSE; values: ValueSequencePtr ฌ NIL; name, value, default: Rope.ROPE ฌ NIL; TempOrderType: TYPE = RECORD [ index: CARDINAL ฌ 0, order: AdobeOps.UserSpecifiedOrder ฌ NIL]; tempOrder: TempOrderType ฌ []; incr: CARDINAL = 1; TruncateSequence: PROCEDURE [order: TempOrderType] RETURNS [formSWOrder: AdobeOps.UserSpecifiedOrder] = { IF tool # report THEN { formSWOrder ฌ NEW[ AdobeOps .UserOrderSequence[order.index]]; FOR i: CARDINAL IN [0..formSWOrder.length) DO formSWOrder[i] ฌ order.order[i]; ENDLOOP} ELSE { hasOrder: AdobeCommon.ReportFields ฌ NEW[ AdobeCommon .ReportFieldsSeq[order.order.length]]; reportCount: CARDINAL ฌ 0; FOR i: CARDINAL IN [0..hasOrder.length) DO hasOrder[i] ฌ FALSE; ENDLOOP; formSWOrder ฌ NEW[ AdobeOps .UserOrderSequence[order.order.length]]; FOR i: CARDINAL IN [0..order.order.length) DO IF order.order[i] # LAST[CARDINAL] THEN { formSWOrder[reportCount] ฌ order.order[i]; hasOrder[order.order[i]] ฌ TRUE; reportCount ฌ reportCount + 1}; ENDLOOP; FOR i: CARDINAL IN [0..order.order.length) DO IF ~hasOrder[i] THEN { formSWOrder[reportCount] ฌ i; reportCount ฌ reportCount + 1}; ENDLOOP; }; }; IF CmFile.FindSection[h: cmH, title: toolNames[tool]] THEN BEGIN ENABLE UNWIND => { name ฌ CmFile.FreeString[name]; value ฌ CmFile.FreeString[value]; IF values # NIL THEN { }}; tempOrder ฌ [ index: 0, order: NEW[AdobeOps .UserOrderSequence[fL.length]]]; IF tool = report THEN FOR i: CARDINAL IN [0..tempOrder.order.length) DO tempOrder.order[i] ฌ LAST[CARDINAL]; ENDLOOP; [name, value] ฌ CmFile.NextItem[h: cmH]; WHILE name # NIL DO fLIndex: CARDINAL ฌ FindFieldInFL[ name, fL ! InvalidFieldName => { name ฌ CmFile.FreeString[name]; value ฌ CmFile.FreeString[value]; [name, value] ฌ CmFile.NextItem[h: cmH]; LOOP}]; [fL[fLIndex].defaultInfo[tool].place, fL[fLIndex].defaultInfo[ tool].width, default] ฌ ParseValueToken[ value ! SyntaxError => { GOTO syntaxError}]; <> IF default # NIL THEN IF --there is no systemMust value -- (fL[fLIndex].defaultInfo[tool].default.Length = 0) THEN fL[fLIndex].defaultInfo[tool].default ฌ default ELSE {}; --AdobeOps.z.FREE[@default]; IF tool # report THEN { tempOrder.order[tempOrder.index] ฌ fLIndex; tempOrder.index ฌ tempOrder.index + incr} ELSE { IF fL[fLIndex].defaultInfo[tool].place.ord # 0 AND CARDINAL[fL[fLIndex].defaultInfo[tool].place.ord] <= fL.length THEN { tempOrder.order[fL[fLIndex].defaultInfo[tool].place.ord - 1] ฌ fLIndex; tempOrder.index ฌ tempOrder.index + incr}}; name ฌ CmFile.FreeString[name]; value ฌ CmFile.FreeString[value]; [name, value] ฌ CmFile.NextItem[h: cmH]; ENDLOOP; name ฌ CmFile.FreeString[name]; value ฌ CmFile.FreeString[value]; RETURN[TruncateSequence[tempOrder]] END ELSE RETURN[AllDisplayed[fL.length]]; EXITS syntaxError => RETURN[AllDisplayed[fL.length]]; END; FindFieldInFL: PROCEDURE [name: Rope.ROPE, fL: AdobeOps.FieldList] RETURNS [index: CARDINAL] = BEGIN FOR i: CARDINAL IN [0..fL.length) DO IF Rope.Equal[name, fL[i].name] THEN RETURN[i]; ENDLOOP; ERROR InvalidFieldName; END; ParseValueToken: PROCEDURE [token: Rope.ROPE] RETURNS [ place: AdobeP75V2.Coordinate, width: CARDINAL, default: Rope.ROPE ฌ NIL] = BEGIN index: CARDINAL ฌ 0; labels: ARRAY [0..2) OF Rope.ROPE ฌ ["x", "y"]; sH: Token.Handle ฌ NIL; temp, string: Rope.ROPE ฌ NIL; thereIsADefault: BOOLEAN ฌ FALSE; MustBeBracketed: Token.FilterProcType = {RETURN[FALSE]}; IF (token.Length > 0) AND (token.Fetch[0] = '[) THEN BEGIN ENABLE UNWIND => { [] ฌ Token.FreeTokenString[string]; [] ฌ Token.FreeStringHandle[sH]; }; sH ฌ Token.StringToHandle[token]; string ฌ Token.MaybeQuoted[ sH, NIL, MustBeBracketed, Token.Brackets]; [place, width] ฌ GetXYFromString[ string ! Token.SyntaxError => ERROR SyntaxError]; string ฌ Token.FreeTokenString[string]; IF sH.break # Ascii.NUL THEN BEGIN temp ฌ Token.MaybeQuoted[sH, NIL, Token.Line]; default ฌ temp; temp ฌ Token.FreeTokenString[temp]; END; sH ฌ Token.FreeStringHandle[sH]; END ELSE ERROR SyntaxError; END; GetXYFromString: PROCEDURE [string: Rope.ROPE] RETURNS [place: AdobeP75V2.Coordinate, width: CARDINAL ฌ 0] = BEGIN temp: Rope.ROPE ฌ NIL; sh: Token.Handle ฌ Token.StringToHandle[string]; gotOne: BOOLEAN ฌ FALSE; Numeric: Token.FilterProcType = BEGIN RETURN[SELECT c FROM IN ['0..'9] => TRUE, ENDCASE => FALSE]; END; DO ENABLE UNWIND => { [] ฌ Token.FreeTokenString[temp]; [] ฌ Token.FreeStringHandle[sh]}; temp ฌ Token.Filtered[sh, NIL, Token.Alphabetic]; IF sh.break = Ascii.NUL THEN EXIT; SELECT TRUE FROM Rope.Equal[temp, "x"] => place.ord ฌ Token.Decimal[h: sh]; Rope.Equal[temp, "y"] => BEGIN temp ฌ Token.FreeTokenString[temp]; temp ฌ Token.MaybeQuoted[ h: sh, data: NIL, filter: Token.AlphaNumeric]; IF temp.Length > 4 THEN BEGIN tempHandle: Token.Handle ฌ Token.StringToHandle[temp]; lineNumStr: Rope.ROPE ฌ Token.Filtered[ h: tempHandle, data: NIL, filter: Numeric, skip: nonToken]; place.co ฌ 2 --FormSW.line0-- - Convert.CardFromRope[lineNumStr]; --String.StringToDecimal[lineNumStr]; lineNumStr ฌ Token.FreeTokenString[lineNumStr]; [] ฌ Token.FreeStringHandle[tempHandle]; END ELSE place.co ฌ Convert.CardFromRope[temp]; --String.StringToDecimal[temp]; END; Rope.Equal[temp, "w"] => width ฌ Token.Decimal[h: sh]; ENDCASE => ERROR SyntaxError; temp ฌ Token.FreeTokenString[temp]; ENDLOOP; [] ฌ Token.FreeStringHandle[sh]; RETURN[place, width]; END; GetUserFileFromService: PROCEDURE [systemName, userFileName, server: Rope.ROPE ฌ NIL] RETURNS [cmH: CmFile.Handle, noUserFile: BOOLEAN ฌ FALSE] = BEGIN userSH: IO.STREAM ฌ PFS.StreamOpen[PFS.PathFromRope[userFileName], write]; { ENABLE XNSAdobeClientOps.UnknownAddress, XNSAdobeClientOps.StubError => GOTO noUserFileExit; GSDUFile: CrRPC.BulkDataSink = { IF checkAbort[h] THEN { noUserFile ฌ TRUE; RETURN[FALSE]; }; IF IO.EndOf[s] THEN { noUserFile ฌ TRUE; RETURN[FALSE]; }; WHILE NOT IO.EndOf[s] DO IO.PutChar[userSH, IO.GetChar[s]]; ENDLOOP; RETURN[FALSE]; }; XNSAdobeClientOps.GetSystemDefaultUserFile[ server: server--System.nullNetworkAddress--, system: systemName, to: GSDUFile]; IO.Close[userSH]; IF noUserFile THEN PFS.Delete[PFS.PathFromRope[userFileName]]; EXITS noUserFileExit => { IF userSH # NIL THEN IO.Close[userSH]; --Stream.Delete[userSH]; PFS.Delete[PFS.PathFromRope[userFileName]]; RETURN[NIL, TRUE]}}; END; ConvertToUserFileName: PROCEDURE [userFileName: Rope.ROPE] RETURNS [Rope.ROPE ฌ NIL] = { i, offset: CARDINAL ฌ 0; newUFN: Rope.ROPE ฌ NIL; FOR i IN [0.. userFileName.Length) DO IF userFileName.Fetch[i] # ' THEN newUFN ฌ ARAccess.AppendChar[newUFN, userFileName.Fetch[i]]; ENDLOOP; RETURN[newUFN] }; GetNextAR: PUBLIC PROCEDURE [ set: AdobeOps.SetOfARs, current: AdobeCommon.SetStatus] RETURNS [ nextAR: AdobeOps.ARNumber, newStatus: AdobeCommon.SetStatus] = { newStatus ฌ current; IF set = NIL OR set.len = 0 THEN RETURN[AdobeOps.nilARNumber, newStatus]; IF newStatus = AdobeCommon.InitialSetStatus THEN RETURN[set[0].startValue, [0, 0]]; IF set[current.setIndex].runLength <= current.runOffset + 1 THEN { newStatus.runOffset ฌ 0; newStatus.setIndex ฌ newStatus.setIndex + 1; IF newStatus.setIndex >= set.len THEN RETURN[AdobeOps.nilARNumber, newStatus]} ELSE newStatus.runOffset ฌ newStatus.runOffset + 1; nextAR ฌ set[newStatus.setIndex].startValue + newStatus.runOffset; }; GetPreviousAR: PUBLIC PROCEDURE [ set: AdobeOps.SetOfARs, current: AdobeCommon.SetStatus] RETURNS [ nextAR: AdobeOps.ARNumber, newStatus: AdobeCommon.SetStatus] = BEGIN newStatus ฌ current; IF current = AdobeCommon.InitialSetStatus THEN RETURN[ set[set.len - 1].startValue + set[set.len - 1].runLength - 1, [ runOffset: CARDINAL[set[set.len - 1].runLength - 1], setIndex: set.len - 1]]; IF current.runOffset < 1 THEN { IF newStatus.setIndex = 0 THEN RETURN[0, newStatus]; newStatus.setIndex ฌ newStatus.setIndex - 1; newStatus.runOffset ฌ CARDINAL[ set[newStatus.setIndex].runLength - 1]} ELSE newStatus.runOffset ฌ newStatus.runOffset - 1; nextAR ฌ set[newStatus.setIndex].startValue + newStatus.runOffset; END; FindThisQL: PUBLIC PROC[qlName: Rope.ROPE ฌ NIL, arSH: AdobeCommon.Handle] RETURNS [ql: AdobeOps.QueryList ฌ NIL] ~ { IF Rope.Equal["SysQL", qlName, FALSE] OR qlName = NIL OR qlName.Length = 0 THEN ql ฌ arSH.systemHandle.sysQL ELSE FOR q: AdobeOps.QLHandle ฌ arSH.systemHandle.otherQLs, q.next UNTIL q = NIL DO IF Rope.Equal[qlName, q.qL.name, FALSE] THEN ql ฌ q.qL; ENDLOOP; RETURN[ql]; }; GetLocalName: PROCEDURE [fullName: Rope.ROPE] RETURNS [localName: Rope.ROPE] = { i: INT ฌ 0; localName ฌ NIL; --String.MakeString[AdobeOps.z, fullName.length]; WHILE i < fullName.Length[] AND fullName.Fetch[i] # ': --AND i < NSName.maxFullNameLength-- DO localName ฌ ARAccess.AppendChar[localName, fullName.Fetch[i]]; i ฌ i + 1; ENDLOOP; }; END.. F AdobeCommonImplE.mesa Copyright ำ 1983, 1985, 1986, 1987, 1988 , 1992by Xerox Corporation. All rights reserved. MXF 29-Jul-83 14:17:45 RSF 17-Apr-86 20:23:54 JCS 10-Oct-85 16:47:23 RLC 25-Feb-88 18:18:25 Philip James, January 13, 1992 11:56 am PST Christian Jacobi, April 7, 1992 5:36 pm PDT AdobeCommonInternal USING [ClickToConfirm, InstanceDataHandle], AdobeServer USING [Error, GetSystemDefaultUserFile], FormSW USING [ItemHandle, line0, MenuProcType, ProcType], MFile USING [Acquire, Delete, Handle], MStream USING [WriteOnly], NSName USING [maxFullNameLength], Put USING [CR, Text], Stream USING [Delete, Handle], String USING [ AppendExtensionIfNeeded, CopyToNewString, Equal, Equivalent, Length, MakeString, StringToDecimal], System USING [nullNetworkAddress], sequence used for Table Lookup ARAccess.Error => { SELECT why FROM accessDenied => errorMessage _ "Access Denied! "; accessUndetermined => errorMessage _ "Can't determine if user has access"; arNotFound => errorMessage _ "AR not found! "; authError => errorMessage _ "Authentication Error"; communicationError => errorMessage _ "File service unavailable or down"; crashDuringCheckOut => errorMessage _ "Checkout session lost. You must check the AR out again."; currentlyCheckedOut => { iData: AdobeCommonInternal.InstanceDataHandle _ windowData.instanceData; WITH iData SELECT FROM submit => errorMessage _ "Another session has this directory locked."; ENDCASE => errorMessage _ "Sorry, this AR is already checked out by another. "}; directoryFull => errorMessage _ "Directory is full! Contact support."; fileServerFull => errorMessage _ "File Server is full! Contact support."; invalidARNumber => errorMessage _ "Invalid AR Number! "; invalidLogin => errorMessage _ "Invalid Login."; ENDCASE => REJECT; GOTO ErrorExit}; AdobeServer.Error => { SELECT why FROM communicationError => errorMessage _ "Problems communicating with Adobe service."; unknownSystem => errorMessage _ "Unknown Adobe system."; cantDetermineLocOfARs => errorMessage _ "Can't determine location of AR files."; illegalLogin => errorMessage _ "Invalid login."; systemAlreadyExists => errorMessage _ "systemAlreadyExists."; -- should never happen fileNotFound => errorMessage _ "File not found."; serverUnreachable => errorMessage _ "Unable to reach Adobe server."; serverDown => errorMessage _ "Adobe server is down."; noAdobeServiceAtServer => errorMessage _ "Adobe service not running on server."; courierTimedOut => errorMessage _ "Courier timed out."; parameterInconsistency => errorMessage _ "Parameter Inconsistency - this tool and the Adobe service aren't compatible!"; obsoleteVersion => GOTO GetNewSystemDescription; systemNotRegistered => errorMessage _ "systemNotRegistered."; -- should never happen sysDescChanging => errorMessage _ "The Adobe database is changing. Try again later."; others => errorMessage _ "Unknown Adobe service problem."; tooManyConnections => errorMessage _ "Too many connections to Adobe service. Try again later."; ENDCASE => errorMessage _ "Unexpected Adobe service problem."; GOTO ErrorExit}; proc[sw, item, index]; GetNewSystemDescription => { sentinal: AdobeCommon.LockedSysDescPtr _ AdobeCommon.GetDescList[]; AdobeCommon.PostMessage[ windowData.msgSW, TRUE, "This system description has become obsolete! "]; AdobeCommon.PostMessage[ windowData.msgSW, TRUE, "Retrieve new system description? Click to confirm."]; IF AdobeCommonInternal.ClickToConfirm[windowData, TRUE] THEN { windowData.isBusy _ TRUE; AdobeCommon.PostMessage[ windowData.msgSW, FALSE, "Retrieving new system description..."]; AdobeCommon.ChangeSystem[ windowData, windowData.system, TRUE]}}; FreeLocalName[localName]; [] _ String.AppendExtensionIfNeeded[ @userFile, ".user", AdobeOps.z]; open local user file free old value AdobeOps.z.FREE[@arSH.formSWOrderArray[tool]]; use IF only until can go to service for noUserFile AdobeOps.z.FREE[@userFile]; do not need to set place, width positions in DefaultInfo because the default values are fine. AdobeOps.z.FREE[@hasOrder] AdobeOps.z.FREE[@order.order]; AdobeOps.z.FREE[@tempOrder.order]; AdobeOps.z.FREE[@values[0]]; AdobeOps.z.FREE[@values[1]]; AdobeOps.z.FREE[@values] Put.Text[NIL, "Invalid field name: \""]; Put.Text[NIL, name]; Put.Text[NIL, "\" found in .user file."]; Put.CR[NIL]; get default information Put.Text[NIL, "Syntax Error in .user entry for "]; Put.Text[NIL, name]; Put.Text[NIL, ". Defaulted to all displayed."]; << Not Apparently used GetDefault: PROCEDURE [cmH: PFS.OpenFile] RETURNS [default: Rope.ROPE] = BEGIN tempString: Rope.ROPE _ Token.Filtered[cmH, NIL, Token.Alphabetic]; default _ String.CopyToNewString[tempString, AdobeOps.z]; tempString _ Token.FreeTokenString[tempString]; END; >> parse the attribute's value strip off brakets default _ String.CopyToNewString[temp, AdobeOps.z]; ': was consumed and now is in sh.break MStream.WriteOnly[ name: userFileName, release: [], type: text]; noUserFile _ (-- = 0); Stream.Delete[userSH]; MFile.Delete[MFile.Acquire[userFileName, delete, []]]; MFile.Delete[MFile.Acquire[userFileName, delete, []]]; QLNameHints: PUBLIC FormSW.MenuProcType = BEGIN data: AdobeCommon.DataHandle _ AdobeCommon.GetDataSW[sw]; arSH: AdobeOps.ARSystemHandle; hintsLength, hintsIndex: CARDINAL _ 0; hintSeq: REF AdobeCommon.StringArray; list: AdobeOps.QLHandle; CountOtherQLs: PROCEDURE RETURNS [count: CARDINAL _ 0] = BEGIN list: AdobeOps.QLHandle _ arSH.otherQLs; WHILE list # NIL DO count _ count + 1; list _ list.next; ENDLOOP; END; IF data.context = NIL THEN {hints _ NIL; RETURN}; arSH _ data.context.arSH; freeHintsProc _ AdobeCommon.FreeHintStrings; replace _ TRUE; hintsLength _ CountOtherQLs[]; IF arSH.sysQL # NIL OR data.tool = query OR (data.tool = queryList AND index = 8 << AdobeCommon.resultPos>> ) THEN hintsLength _ hintsLength + 1; IF hintsLength = 0 THEN { hintSeq _ AdobeOps.z.NEW[AdobeCommon .StringArray[1]]; hintSeq[0] _ String.CopyToNewString["", AdobeOps.z]; hints _ DESCRIPTOR[hintSeq]; RETURN}; hintSeq _ AdobeOps.z.NEW[AdobeCommon .StringArray[hintsLength]]; IF arSH.sysQL # NIL OR data.tool = query OR (data.tool = queryList AND index = 8 << AdobeCommon.resultPos>> ) THEN { hintSeq[0] _ String.CopyToNewString["SysQL", AdobeOps.z]; hintsIndex _ hintsIndex + 1}; list _ arSH.otherQLs; WHILE list # NIL DO hintSeq[hintsIndex] _ String.CopyToNewString[ list.qL.name, AdobeOps.z]; hintsIndex _ hintsIndex + 1; list _ list.next; ENDLOOP; hints _ DESCRIPTOR[hintSeq]; END; returning AR=nilARNumber means set exhausted returning AR=0 means set exhausted FindThisQL: PUBLIC PROCEDURE [qlName: Rope.ROPE, arSH: AdobeOps.ARSystemHandle] RETURNS [qlHandle: AdobeOps.QueryList] = { qlH: AdobeOps.QLHandle; IF Rope.Equal[qlName, "SysQL", NIL] OR qlName = NIL OR qlName.length = 0 THEN RETURN[arSH.sysQL]; qlH _ arSH.otherQLs; WHILE qlH # NIL DO IF String.Equal[qlName, qlH.qL.name] THEN RETURN[qlH.qL]; qlH _ qlH.next; ENDLOOP; RETURN[NIL]; END; localName[i] _ fullName[i]; localName.length _ i FreeLocalName: PROCEDURE [name: Rope.ROPE] = { AdobeOps.z.FREE[@name]}; RLC 8-Aug-86 18:03:09 MyCmFile _ CmFile RLC 23-Feb-88 17:20:30 add toomanyconnections RLC 25-Feb-88 18:18:25 tooManyConnections now a REAL error ส๘•NewlineDelimiter –(cedarcode) style™™Jšœ ฯeœP™\Jšœ™Jšœ™Jšœ™Jšœ™Jšœ+™+J™+—Icode˜šฯk ˜ Kšœ žœ ˜Kš œ žœฯcGœŸœ7Ÿœ˜าJšœžœ&™?Kšœ žœŸœj˜ฉJšœ žœŸœ™4K˜ K˜K˜ Kšœžœžœ˜Kšœ žœžœ˜Kšœžœ˜,Jšœžœ-™9Kšžœžœ"žœ˜2Jšœžœ™&Jšœžœ ™šœžœ˜K˜?—Kšœžœ˜Jšœžœ™!Kšžœžœ%˜.Jšœžœžœ™Kšœžœ-žœ˜=Jšœžœ™šœžœ™J™˜˜K˜,——Kšžœ'˜.——™šžœž™J™1™J™4—J™.J™3™J™2—™™J™;——™™/J™—šžœžœž™™ ™J™-——šžœ™ ™J™6————™J™5—™J™7—J™8J™0Jšžœžœ™—Jšžœ ™—˜!˜K˜/—Kšžœ ˜—˜˜K˜B—Kšžœ ˜—™šžœž™™J™<—™J™'—™J™7—J™0Jšœ>Ÿ™TJ™1™J™/—J™5™J™6—J™7™™J™O——Jšœžœ™0Jšœ>Ÿ™T™J™B—J™:J™_Jšžœ7™>—Jšžœ ™—Kšžœ žœ ˜8—˜J™—šž˜™™(J™—™Jšœžœ™J™1—™Jšœžœ™J™7—šžœ0žœžœ™>Jšœžœ™™Jšœžœ™J™(—™Jšœžœ™'———˜Kšœžœ˜/Kšœ žœ˜——Kšžœ˜——˜š œž œ žœžœžœžœ žœ˜[Kšœžœ˜Kš žœžœžœžœžœ˜SKšžœ˜ K˜K˜—š  œžœž œžœžœžœžœ˜]Kš œžœ.žœžœžœ˜WKšœ žœ˜K˜K˜DK˜*K˜%K˜MK˜K˜?K˜K˜$K˜EK˜K˜—K˜š !œžœž œ˜5Kšœžœ.žœ˜JKšž˜K˜(Kšœžœ˜0Kšœžœ ˜ Kšœžœ˜Kšœ žœžœ˜šœ žœ˜J™—K˜+˜$™$J™ ——Jšœ™˜Kšœ ˜ šœ˜šžœžœ˜˜+K˜—Kš žœ žœžœžœžœ˜)———šžœžœž˜3Jšœ™Jšœ žœ™.šžœ ž˜K˜5—šž˜˜9K˜——Kšžœ˜—Jšœ2™2šžœ žœ˜K˜Kšœ˜—Jšœ žœ ™Kšžœ˜——™š  œž œ žœ˜*Kšžœ-˜4Kšž˜KšžœžœžœŸ ˜7Kšœžœ&˜7šžœžœžœ ž˜!K˜Jšœ8™8Jšœ$™$Kšžœ˜—Kšžœ˜——™š œž œFžœ-ž˜ฆKšœ žœžœžœ?˜nKšœ žœžœ˜Kšœžœ˜Kšœžœžœ˜&šœžœžœ˜Kšœžœ+žœ˜?—K˜Kšœžœ˜J™š œž œ˜2Kšžœ/˜6šžœžœ˜šœžœ˜K˜*—šžœžœžœž˜-Kšœ!žœ˜)——šžœ˜šœ%žœ˜)K˜2—Kšœ žœ˜šžœžœžœž˜*Kšœžœžœ˜—šœžœ˜K˜1—šžœžœžœž˜-šžœžœžœžœ˜)K˜*Kšœžœ˜ K˜—Kšžœ˜—šžœžœžœž˜-šžœžœ˜K˜K˜—Kšžœ˜—Jšœ žœ ™Kšœ˜—Jšœ žœ™Kšœ˜—J™K˜šžœ4ž˜:Kšž˜šž˜šžœ˜ Jšœ žœ™"K˜K˜!šžœ žœžœ˜Jšœ žœ ™Jšœ žœ ™Jšœ žœ ™Kšœ˜———˜ K˜ Kšœžœ*˜4—šžœž˜šžœžœžœž˜1Kšœžœžœžœ˜-——K˜(šžœžœž˜šœ žœ˜"K˜ ˜Jšœ žœ™(Jšœ žœ™Jšœ žœ™)Jšœžœžœ™ K˜K˜!K˜(Kšžœ˜——Jšœ™˜>K˜(K˜˜Jšœ žœ&™2Jšœ žœ™Jšœ žœ#™/Kšžœ˜——˜1šœ&žœ˜*Kšœ7žœ˜?——šžœ žœž˜šžœŸ!˜%Kšœ3ž˜7K˜/—KšžœŸ˜%—šžœžœ˜K˜+K˜)—šžœ˜šžœ,˜.šžœžœ,˜8Kšœ žœ˜—˜—Jšœ,™,K˜K˜šžœžœžœ ž˜ Kšžœ"˜(—šžœ*ž˜0Kšžœ˜"—šžœ:žœ˜BK˜K˜,šžœž˜%Kšžœ"˜(——Kšžœ/˜3K˜BKšœ˜——™š  œžœž œ˜!K˜7šžœ˜ K˜>—Jšœ"™"Kšž˜K˜šžœ(ž˜.šžœ˜˜=K˜Kšœ žœ!˜4K˜———šžœžœ˜Kšžœžœžœ˜4K˜,šœžœ˜K˜'——Kšžœ/˜3K˜BKšžœ˜——™š  œžœžœžœžœžœžœ˜uš žœžœžœ žœžœž˜OK˜—šž˜šžœ;žœžœž˜NKšžœžœžœ ˜7Kšžœ˜——Kšžœ˜ K˜K˜—š  œžœž œžœ ™OJšžœ#™*J™šžœžœžœ ž™3Jšžœžœžœ ™-—J™šžœžœž™Jšžœ#žœžœ ™9J™Jšžœ™—Jšžœžœ™ Jšžœ™——™š  œž œžœ˜-Kšžœžœ˜"Kšœžœ˜ Kšœ žœŸ1˜Bšžœžœ˜8KšŸ$œž˜'˜>Jšœ™—K˜ Kšžœ˜—J™K˜——™š  œž œ žœ™.Jšœ žœ ™——˜Kšžœ˜K˜—Jšœ*™*Jšœ/™/Jšœ;™;K˜—…—5†gฤ