InstallationComfortsFromCImpl.mesa
Copyright Ó 1990, 1991 by Xerox Corporation. All rights reserved
Chauser, July 15, 1991 3:31 pm PDT
Peter B. Kessler, May 24, 1990 2:24 pm PDT
Willie-s, August 12, 1991 5:06 pm PDT
InstallationComfortsFromCImpl:
CEDAR PROGRAM
IMPORTS InstallationComforts, UXStrings
~ BEGIN
OPEN InstallationSupportPrivate;
CString: TYPE ~ CStrings.CString;
ROPE: TYPE ~ Rope.ROPE;
ExternalNames
ExternalNames:
PROC =
TRUSTED
MACHINE
CODE {
"^ExternalNames\n";
"InterfaceFromConfig XR←InterfaceFromConfig\n";
"ChildProgramFromConfig XR𡤌hildProgramFromConfig\n";
"ChildConfigFromConfig XR𡤌hildConfigFromConfig\n";
"ProcFromInterface XR←ProcFromInterface\n";
"ProcFromNamedInterface XR←ProcFromNamedInterface\n";
"ProcName XR←ProcName\n";
};
Exported to C through ExternalNames
InterfaceFromConfig:
PROC [interfaceName: CString, context: Config]
RETURNS [Interface] ~ {
foundInterface: Interface ¬ NIL;
rInterfaceName: ROPE ~ UXStrings.ToRope[interfaceName];
RETURN[InstallationComforts.InterfaceFromConfig[rInterfaceName, context]];
};
ChildProgramFromConfig:
PROC [programName: CString, context: Config]
RETURNS [Program] ~ {
foundProgram: Program ¬ NIL;
rProgram: ROPE ~ UXStrings.ToRope[programName];
RETURN[InstallationComforts.ChildProgramFromConfig[rProgram, context]];
};
ChildConfigFromConfig:
PROC [configName: CString, context: Config]
RETURNS [Config] ~ {
foundConfig: Config ¬ NIL;
rConfigName: ROPE ~ UXStrings.ToRope[configName];
RETURN[InstallationComforts.ChildConfigFromConfig[rConfigName, context]];
};
ProcFromInterface:
PROC [interface: Interface, procName: CString]
RETURNS [
PROCEDURE
ANY
RETURNS
ANY] ~ {
IF interface#
NIL
THEN {
rProcName: ROPE ~ UXStrings.ToRope[procName];
RETURN[InstallationComforts.ProcFromInterface[interface, rProcName]];
};
RETURN[NIL];
};
ProcFromNamedInterface:
PROC [interfaceName: CString, procName: CString, context: Config]
RETURNS [
PROCEDURE
ANY
RETURNS
ANY] ~ {
rInterfaceName: ROPE ~ UXStrings.ToRope[interfaceName];
rProcName: ROPE ~ UXStrings.ToRope[procName];
RETURN[InstallationComforts.ProcFromNamedInterface[rInterfaceName, rProcName, context]];
};
ProcName:
PROC [p:
PROCEDURE
ANY
RETURNS
ANY]
RETURNS [CString] ~
TRUSTED {
rName: ROPE ~ InstallationComforts.ProcName[p];
RETURN[UXStrings.Create[rName]];
};
ExternalNames[]; -- get the external names known