ef36fa599e51ee4e062a81e907e7b164d310dc00
1 {$MODE DELPHI}
2 {$R-}
3 { $DEFINE CBLOG}
6 interface
8 uses
9 SysUtils;
11 type
17 procedure e_WriteLog (TextLine: String; RecordCategory: TRecordCategory; WriteTime: Boolean=True);
21 // start Write/WriteLn driver. it will write everything to cbuf.
25 var
29 implementation
31 uses
32 conbuf;
35 var
42 begin
43 Result := Format('%d.%d.%d.%d', [ip and $FF, (ip shr 8) and $FF, (ip shr 16) and $FF, (ip shr 24)]);
47 procedure e_WriteLog (TextLine: String; RecordCategory: TRecordCategory; WriteTime: Boolean=True);
48 var
52 begin
54 begin
65 try
68 else
70 try
72 begin
83 else
88 finally
97 begin
100 begin
101 try
110 // ////////////////////////////////////////////////////////////////////////// //
111 (* Write/WriteLn driver *)
112 //
113 // control codes:
114 // CR, LF, BS
115 // TAB: tab space = 4
116 //
117 // userData[1]: current x (for tabs)
118 // userData[2]: #13 was eaten, we should skip next #10
119 //
120 type
123 const
129 var
134 begin
138 begin
139 // look for some special char
143 begin
148 {$IFDEF CBLOG}
150 {$ENDIF}
153 begin
159 continue;
161 // process special chars
165 // tab
167 begin
168 {$IFDEF CBLOG}
170 {$ENDIF}
171 repeat
175 continue;
177 // cr, lf
179 begin
180 {$IFDEF CBLOG}
182 {$ENDIF}
184 begin
189 continue;
198 begin
207 var
210 begin
220 begin
225 begin
231 begin
233 begin
236 begin
239 begin
254 begin
255 //e_InitWritelnDriver();