equal
deleted
inserted
replaced
176 s: shortstring absolute buf; |
176 s: shortstring absolute buf; |
177 begin |
177 begin |
178 |
178 |
179 // set RDNLY on file open |
179 // set RDNLY on file open |
180 filemode:= 0; |
180 filemode:= 0; |
181 |
181 {$I-} |
182 assign(f, fileName); |
182 assign(f, fileName); |
183 reset(f, 1); |
183 reset(f, 1); |
|
184 |
|
185 tryDo(IOResult = 0, 'Error opening file ' + fileName, true); |
184 |
186 |
185 i:= 0; // avoid compiler hints |
187 i:= 0; // avoid compiler hints |
186 buf[0]:= 0; |
188 buf[0]:= 0; |
187 repeat |
189 repeat |
188 BlockRead(f, buf[1], 255 - Length(ss), i); |
190 BlockRead(f, buf[1], 255 - Length(ss), i); |
197 end |
199 end |
198 end |
200 end |
199 until i = 0; |
201 until i = 0; |
200 |
202 |
201 close(f) |
203 close(f) |
|
204 {$I+} |
202 end; |
205 end; |
203 |
206 |
204 procedure SendStat(sit: TStatInfoType; s: shortstring); |
207 procedure SendStat(sit: TStatInfoType; s: shortstring); |
205 const stc: array [TStatInfoType] of char = 'rDkKHTPsSB'; |
208 const stc: array [TStatInfoType] of char = 'rDkKHTPsSB'; |
206 var buf: shortstring; |
209 var buf: shortstring; |