DIRECTORY FS USING [OpenFile, nullOpenFile], Rope USING [ROPE]; LupineManager: DEFINITIONS = BEGIN String: TYPE = Rope.ROPE _ StringNIL; StringNIL: String = NIL; -- Explicit nonNIL constant needed for INLINEs. TranslateRemoteInterface: PROCEDURE [ interfaceBcdFilename: String --Truth if capability is null, else just for error messages--, interfaceBcdCapability: FS.OpenFile _ FS.nullOpenFile, errorHandler: ErrorHandlerProc, options: Options, desiredLineLength: LONG INTEGER _ 82 ]; Options: TYPE = REF OptionsRec; OptionsRec: TYPE = RECORD [ targetLanguage: Language _ Cedar, defaultParamPassing: ParamPassingMethod _ Value, freeServerArguments: BOOLEAN _ TRUE, inlineServerDispatcherStubs: BOOLEAN _ TRUE, inlineMarshal: BOOLEAN _ TRUE, inlinePacketAllocateCount: INT _ 1000, inlineRopeMarshal: BOOLEAN _ TRUE, maxHeapAllocations, maxMdsAllocations: LONG INTEGER _ 50, declareSignals: BOOLEAN _ TRUE, warnMDSAllocs: BOOLEAN _ TRUE, importMultiple: BOOLEAN _ TRUE, noClientModulesOut: INT _ 1]; Language: TYPE = {Cedar, Mesa}; ParamPassingMethod: TYPE = {Var, Value, Result, Handle, InterMds}; ErrorHandlerProc: TYPE = --INTERNAL-- PROCEDURE [ type: ErrorType, code: ErrorCode, codeExplanation: String, outputFileName: String_StringNIL, outputFileCharPosition: LONG INTEGER, problemCausingText: String_StringNIL ] RETURNS [abortTranslation: BOOLEAN_FALSE]; ErrorType: TYPE = {abort, error, warning}; ErrorCode: TYPE = { AnonymousIdentifier, BadBcdFileFormat, BadBcdFileVersion, ComputedSequence, ComputedVariant, EmbeddedRESULT, EmptyArray, HandleREF, ImproperPassingMethod, ImproperReadonlyRESULT, ImproperRESULTResult, InterfaceVariables, InvalidHandle, MdsAllocation, NoSuchFile, NotInterfaceModule, ProbablePointerRecursion, SequenceInsideVariant, ShortInterMdsPointers, TransferParameter, UnimplementedMarshaling, Unknown, UnsupportedTransfers }; END. -- LupineManager. LLupineManager.mesa. Copyright c 1985 by Xerox Corporation. All rights reserved. Last edited by BZM on 2-May-82 22:48:33. Last Edited by: Birrell, September 13, 1983 4:08 pm Last Edited by: Swinehart, July 3, 1984 1:49:26 pm PDT Bob Hagmann February 8, 1985 4:58:07 pm PST These string definitions are used for easy SDD compatibility. TranslateRemoteInterface is the procedural access to Lupine. It is not reentrant, and is monitored to enforce serial access. If interfaceBcdCapability is specified, then it is used in preference to interfaceBcdFilename. But interfaceBcdFilename must always be specified for error reporting. All errors are reported through the errorHandler procedure. ErrorHandlerProc is called so that clients can see and act on each translation error. The problemCausingText argument usually contains the the source text in which the error was located (e.g., bad file name, invalid procedure name, unmarshalable type). Even when problemCausingText is NIL, however, the generated stub files contain full error descriptions as comments. If type=abort, abortTranslation is always forced to be TRUE. The outputFileName and outputFilePosition arguments tell where the error occurred. For errors found before code generation starts, outputFileName=NIL. ErrorHandlerProc must behave since a monitor lock is held during the call. Κρ˜headšœ™Icodešœ Οmœ1™<—Jšœ)™)Jšœ3™3™6L™+—J˜J˜šΟk ˜ Jšžœžœ˜"Jšœžœžœ˜J˜J˜—Jšœž œž˜"J˜J˜Jšœ=™=˜Jšœžœžœ ˜%JšœžœΟc/˜IJ˜J˜—Jšœ<™