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
140 begin
144 // look for some special char
148 begin
153 {$IFDEF CBLOG}
155 {$ENDIF}
158 begin
163 continue;
165 // process special chars
169 // tab
171 begin
172 {$IFDEF CBLOG}
174 {$ENDIF}
175 repeat
179 continue;
181 // cr, lf
183 begin
184 {$IFDEF CBLOG}
186 {$ENDIF}
190 continue;
199 begin
208 var
211 begin
221 begin
226 begin
232 begin
234 begin
237 begin
240 begin
255 begin