-- TiogaJaM.Mesa
-- written by Paxton.  February 1981
-- last written by Paxton.  March 23, 1981  2:25 PM

DIRECTORY
JaMOtherDefs,
TextNode;

TiogaJaM: DEFINITIONS =

BEGIN OPEN nodeI:TextNode, jamI: JaMOtherDefs;

JaMName: TYPE = jamI.Name;
noName: JaMName = [FALSE,0];

MakeTypeName: PROC [name: REF TEXT] RETURNS [nodeI.TypeName];

MakeStyleName: PROC [name: REF TEXT] RETURNS [nodeI.StyleName];

TextForTypeName: PROC [name: nodeI.TypeName, txt: REF TEXT];

TextForStyleName: PROC [name: nodeI.StyleName, txt: REF TEXT];

MakeName: PROC [name: REF TEXT] RETURNS [JaMName];

TextForName: PROC [name: JaMName, txt: REF TEXT];

TextOverflow: SIGNAL RETURNS [REF TEXT];
	-- generated if try to get text for name using too small maxLength

-- the following provide loopholes for converting names to&from jamnames

StyleToJaM: PROC [name: nodeI.StyleName] RETURNS [JaMName] = INLINE {
	RETURN [LOOPHOLE[name]] };

JaMToStyle: PROC [name: JaMName] RETURNS [nodeI.StyleName] = INLINE {
	RETURN [LOOPHOLE[name]] };

TypeToJaM: PROC [name: nodeI.TypeName] RETURNS [JaMName] = INLINE {
	RETURN [LOOPHOLE[name]] };

JaMToType: PROC [name: JaMName] RETURNS [nodeI.TypeName] = INLINE {
	RETURN [LOOPHOLE[name]] };

END.