equal
deleted
inserted
replaced
87 |
87 |
88 procedure WriteToConsole(s: shortstring); |
88 procedure WriteToConsole(s: shortstring); |
89 var Len: LongInt; |
89 var Len: LongInt; |
90 done: boolean; |
90 done: boolean; |
91 begin |
91 begin |
|
92 {$IFNDEF NOCONSOLE} |
92 {$IFDEF DEBUGFILE}AddFileLog('Console write: ' + s);{$ENDIF} |
93 {$IFDEF DEBUGFILE}AddFileLog('Console write: ' + s);{$ENDIF} |
93 Write(s); |
94 Write(s); |
94 done:= false; |
95 done:= false; |
95 |
96 |
96 while not done do |
97 while not done do |
104 if CurrLine = cLinesCount then CurrLine:= 0; |
105 if CurrLine = cLinesCount then CurrLine:= 0; |
105 PByte(@ConsoleLines[CurrLine].s)^:= 0 |
106 PByte(@ConsoleLines[CurrLine].s)^:= 0 |
106 end; |
107 end; |
107 done:= (Length(s) = 0); |
108 done:= (Length(s) = 0); |
108 end; |
109 end; |
|
110 {$ENDIF} |
109 end; |
111 end; |
110 |
112 |
111 procedure WriteLnToConsole(s: shortstring); |
113 procedure WriteLnToConsole(s: shortstring); |
112 begin |
114 begin |
|
115 {$IFNDEF NOCOSOLE} |
113 WriteToConsole(s); |
116 WriteToConsole(s); |
114 WriteLn; |
117 WriteLn; |
115 inc(CurrLine); |
118 inc(CurrLine); |
116 if CurrLine = cLinesCount then |
119 if CurrLine = cLinesCount then |
117 CurrLine:= 0; |
120 CurrLine:= 0; |
118 PByte(@ConsoleLines[CurrLine].s)^:= 0 |
121 PByte(@ConsoleLines[CurrLine].s)^:= 0 |
|
122 {$ENDIF} |
119 end; |
123 end; |
120 |
124 |
121 procedure ParseCommand(CmdStr: shortstring; TrustedSource: boolean); |
125 procedure ParseCommand(CmdStr: shortstring; TrustedSource: boolean); |
122 var ii: LongInt; |
126 var ii: LongInt; |
123 s: shortstring; |
127 s: shortstring; |