-- OthelloDefsDummyImpl.mesa
-- Copyright (C) 1984, Xerox Corporation. All rights reserved.
-- Michael Plass, September 27, 1984 7:59:22 am PDT

DIRECTORY OthelloDefs, PDQueue, String;

OthelloDefsDummyImpl: PROGRAM IMPORTS PDQueue, String EXPORTS OthelloDefs =
BEGIN

bufferLength: NAT = 60;
buffer: LONG STRING ← [bufferLength];

WriteLongNumber: PUBLIC PROC [num: LONG CARDINAL] = {
t: LONG STRING ← [20];
String.AppendLongNumber[t, num];
WriteString[t];
};

WriteOctal: PUBLIC PROC [num: CARDINAL] = {
t: LONG STRING ← [20];
String.AppendOctal[t, num];
WriteString[t];
};

NewLine: PUBLIC PROC = {
PDQueue.LogMessage[buffer];
buffer.length ← 0;
};

WriteLine: PUBLIC PROC [str: LONG STRING] = {
WriteString[str];
NewLine[];
};

WriteString: PUBLIC PROC [str: LONG STRING] = {
FOR i: NAT IN [0..str.length) DO
IF buffer.length >= bufferLength THEN NewLine[];
buffer[buffer.length] ← str[i];
buffer.length ← buffer.length + 1;
ENDLOOP;
};

END.