CharCodeConvert.mesa
Copyright Ó 1991 by Xerox Corporation. All rights reserved.
Michael Plass, October 10, 1991 10:46 am PDT
DIRECTORY Char
USING [
XCHAR];
CharCodeConvert: CEDAR DEFINITIONS
~
BEGIN
OPEN Char;
This module attempts to maintain the correspondence between Xerox character codes and the character names used by PostscriptTM to identify characters. This is complicated by the fact that different names may be used for the same XCHAR (presumably by different fonts), and that random names will not generally have a preassigned XCHAR.
Access
NameFromXChar: PROC [XCHAR] RETURNS [ATOM]; -- returns the "preferred" name
NamesFromXChar: PROC [XCHAR] RETURNS [LIST OF ATOM]; -- returns all names
XCharFromName:
PROC [
ATOM]
RETURNS [
XCHAR];
-- Assigns a "Private Use" code, if necessary (but that better not happen too often)
PrivateUseFull: ERROR;
Enumerate:
PROC [
PROC [
XCHAR,
LIST
OF
ATOM]];
Maintainence
Use of this should be fairly restricted - changing the mapping dynamically (particularly with Redefine) could cause problems.
Define: PROC [XCHAR, ATOM];
Redefine: PROC [XCHAR, LIST OF ATOM];
Conflict: ERROR [xChar: XCHAR, name: ATOM]; -- raised when an attempt is made to assign more than one XCHAR to the same name, or name is NIL, or xChar is nullXChar
END.