home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
progm
/
tptools.zip
/
FIRSTED.ZIP
/
MESSAGE.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1987-12-21
|
1KB
|
50 lines
{ MESSAGE.PAS
ED 4.0
Copyright (c) 1985, 87 by Borland International, Inc. }
{$I-}
{$R-}
{$S-}
{$V-}
{$D-}
unit Message;
{-Initialize and return messages used by editor}
interface
function EdGetMessage(Msgno : Integer) : string;
{-Get message from packed message buffer or return number to caller}
{==============================================================================}
implementation
{The machine code contains embedded message strings}
{To compile FirstEd: use either EDMESG.OBJ or MSMESG.OBJ}
{To compile MicroStar: MSMESG.OBJ is required}
{Use EDMESG to reduce size of FirstEd}
{$L MSMESG}
function EdMessagePtr(Msgno : Integer) : Pointer; external;
{-Return a pointer to the message string, nil if not available}
function EdGetMessage(Msgno : Integer) : string;
{-Get message from packed message buffer or return number to caller}
var
P : Pointer;
St : string;
begin {EdGetMessage}
P := EdMessagePtr(Msgno);
if P = nil then begin
{String not available, return the error number}
Str(Msgno, St);
St := ' Message '+St;
end else
Move(P^, St, Succ(Byte(P^)));
EdGetMessage := St+' ';
end; {EdGetMessage}
end.