ConvertUnsafe.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Russ Atkinson, January 29, 1985 6:53:15 pm PST
Paul Rovner, September 19, 1983 9:16 pm
Last Edited by: Levin, September 22, 1983 10:39 am
Doug Wyatt, February 22, 1985 11:29:43 am PST
Unsafe conversions to/from LONG STRING.
DIRECTORY
Rope USING [ROPE, Text];
ConvertUnsafe: CEDAR DEFINITIONS
= BEGIN
ROPE: TYPE = Rope.ROPE;
Text: TYPE = Rope.Text;
LS: TYPE = LONG STRING;
SubString: TYPE = RECORD[base: LS, offset, length: CARDINAL];
AppendRefText:
UNSAFE
PROC[to:
LS, from:
REF
READONLY
TEXT];
raises BoundsFault if destination is too small
AppendRope:
UNSAFE
PROC[to:
LS, from:
ROPE];
raises BoundsFault if destination is too small
AppendSubString:
UNSAFE
PROC[to:
LS, from: SubString];
raises BoundsFault if destination is too small
AppendSubStringToRefText:
PROC[to:
REF TEXT, from: SubString];
raises BoundsFault if destination is too small
ToRefText:
PROC[from:
LS]
RETURNS[
REF
TEXT];
raises BoundsFault if the string is longer than LAST[NAT]
ToRope:
PROC[from:
LS]
RETURNS[Text];
raises BoundsFault if the string is longer than LAST[NAT]
SubStringToRope:
PROC[from: SubString]
RETURNS[Text];
EqualSubStrings: PROC[s1, s2: SubString, case: BOOL ← TRUE] RETURNS[BOOL];
END.