Previous mail
Next mail
Unformatted/full headers
Overview 10 days
Subject
Date
Thread
Author
From: Frank Heckenbach
Subject: EOF is not true on reset empty file
Date: 28 Jan 2005, 14:16:50
Emil Jerabek wrote:
> Incidentally, I tried it without --transparent-file-names
> (gpc 20041218, gcc 3.3.3), and got:
>
> [~/pas]% ./a.out
> Input file `namebook': namebook
> ./a.out: cannot open file `namebook
> ' for reading (No such file or directory) (error #442 at 8049e79)
>
> I.e., the name of the file includes the newline which is necessary to
> terminate the input! This is IMO another bug.
Yes, this bug slipped in when I ported the file handling from C to
Pascal.
--- rts/files.pas.orig Sun Nov 14 04:38:58 2004
+++ rts/files.pas Fri Jan 28 14:16:01 2005
@@ -1154,7 +1154,7 @@
if Tty >= 0 then Discard (CloseHandle (Tty));
if (n > 0) and (Buf2[1] = EOT) then
IOERROR_FILE (421, f, False, ''); { EOT character given for query of file name for %s }
- if (n > 0) and (Buf2[n] = '\n') then Dec (n);
+ if (n > 0) and (Buf2[n] = NewLine) then Dec (n);
Inc (n);
Buf2[n] := #0;
Tmp := InternalNew (n);
Frank
Previous mail
Next mail
Unformatted/full headers
Overview 10 days
Subject
Date
Thread
Author
| Author | Subject | Date |
|---|---|---|
| jan.ruzicka@comcast.net | EOF is not true on reset empty file | 29 Jan 2005, 07:04:31 |
| Frank Heckenbach | EOF is not true on reset empty file | 30 Jan 2005, 17:22:29 |
Note: This page contains information that does not originate from the owner of this web site, but from the authors of the mails archived. The owner of this web site is not responsible for the content of such information. Any use of that infomation requires the consent of the respective author.
Where WWW addresses (URLs) in the mails archived are marked as hyperlinks, this is only for the comfort of the reader. The content of the web pages linked to like this does not necessarily reflect the opinion of the owner of this web site or of the authors of the mails archived. The owner of this web site is not responsible for the content of such web pages. Those pages are explicitly not to be considered as part of the content of this page, but merely as references.
This page was created by Crystal 0.999 (Linux 2.4.27/i686).