diff --git a/src/shared/conbuf.pas b/src/shared/conbuf.pas
index 42f85a52b5ef161f9aa51edabbbd19da3f6d0055..bc7a8f7d7054803327859f9522af7e5ac138b4be 100644 (file)
--- a/src/shared/conbuf.pas
+++ b/src/shared/conbuf.pas
-(* Copyright (C) DooM 2D:Forever Developers
+(* Copyright (C) Doom 2D: Forever Developers
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * the Free Software Foundation, version 3 of the License ONLY.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
function cbufWalkStart (): LongWord;
function cbufWalkEnd (pos: LongWord): LongWord;
-procedure cbufPrev (var pos: LongWord);
-procedure cbufNext (var pos: LongWord);
+procedure cbufPrev (var pos: LongWord); inline;
+procedure cbufNext (var pos: LongWord); inline;
-function cbufAt (const pos: LongWord): Char;
+function cbufAt (const pos: LongWord): Char; inline;
// get last line
procedure cbufLastLine (var sp: LongWord; var ep: LongWord);
var
conbufDumpToStdOut: Boolean = false;
+ conbufConPrefix: Boolean = true;
implementation
begin
for np := 0 to count-1 do
begin
- if needCon then begin write(stdout, 'CON: '); needCon := false; end;
+ if needCon then
+ begin
+ if conbufConPrefix then write(stdout, 'CON: ');
+ needCon := false;
+ end;
write(stdout, buf[np]);
needCon := (buf[np] = #10);
end;
// warning! don't modify conbuf while the range is active!
function cbufWalkStart (): LongWord; begin result := cbuftail; end;
function cbufWalkEnd (pos: LongWord): LongWord; begin result := cbufhead; end;
-procedure cbufPrev (var pos: LongWord); begin pos := (pos+ConBufSize-1) mod ConBufSize; end;
-procedure cbufNext (var pos: LongWord); begin pos := (pos+1) mod ConBufSize; end;
+procedure cbufPrev (var pos: LongWord); inline; begin pos := (pos+ConBufSize-1) mod ConBufSize; end;
+procedure cbufNext (var pos: LongWord); inline; begin pos := (pos+1) mod ConBufSize; end;
-function cbufAt (const pos: LongWord): Char; begin result := cbuf[pos mod ConBufSize]; end;
+function cbufAt (const pos: LongWord): Char; inline; begin result := cbuf[pos mod ConBufSize]; end;
// ////////////////////////////////////////////////////////////////////////// //