<> <> <> <> <> <> <> DIRECTORY TJaMStorage USING [TextObject], PrincOpsUtils USING [LongCopy], UnsafeStorage USING [GetSystemUZone]; TJaMStorageImpl: PROGRAM IMPORTS PrincOpsUtils, UnsafeStorage EXPORTS TJaMStorage = { zone: UNCOUNTED ZONE = UnsafeStorage.GetSystemUZone[]; Zone: PUBLIC PROC RETURNS[UNCOUNTED ZONE] = { RETURN[zone] }; pruning: BOOLEAN _ FALSE; -- can turn this on someday Prune: PUBLIC PROC = { IF pruning THEN NULL--UnsafeStorage.TrimUZone[zone]-- }; <> TextObject: TYPE = TJaMStorage.TextObject; PrivateTextPut: PUBLIC PROC[t: POINTER TO TextObject, c: CHARACTER] = { old: LONG STRING _ t.text; new: LONG STRING _ NIL; length: CARDINAL _ t.len; oldmax: CARDINAL _ t.max; maxmax: CARDINAL = t.lim; newmax: CARDINAL _ oldmax + MIN[oldmax/2,maxmax-oldmax]; IF NOT length