diff --git a/src/shared/conbuf.pas b/src/shared/conbuf.pas
index 751f39ad06596afbfec3df125271b2c30ca19f8f..42f85a52b5ef161f9aa51edabbbd19da3f6d0055 100644 (file)
--- a/src/shared/conbuf.pas
+++ b/src/shared/conbuf.pas
-{$MODE OBJFPC}
+(* 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *)
+{$INCLUDE a_modes.inc}
+{.$MODE OBJFPC}
unit conbuf;
interface
procedure cbufClear ();
+var
+ conbufDumpToStdOut: Boolean = false;
+
implementation
// ////////////////////////////////////////////////////////////////////////// //
+var
+ needCon: Boolean = true;
+
procedure cbufPutChars (buf: PChar; count: Integer);
var
np: LongWord;
begin
if count > 0 then
begin
+ if conbufDumpToStdOut then
+ begin
+ for np := 0 to count-1 do
+ begin
+ if needCon then begin write(stdout, 'CON: '); needCon := false; end;
+ write(stdout, buf[np]);
+ needCon := (buf[np] = #10);
+ end;
+ end;
Inc(changeCount);
if changeCount = 0 then changeCount := 1;
while count > 0 do