Mail Archives: cygwin/1997/01/17/16:34:02
On Thu, 16 Jan 1997 12:23:23 -0500, Jason Tishler <jt AT boxhill DOT com> wrote:
>The file size reported by fstat(2) includes the "\r" characters in the
>EOLs. On the other hand, the number of bytes returned by read(2) does
>not include the "\r" characters because read(2) strips them out from the
>input. Hence, these quantities will never be equal. (In fact, they
>always differ by the number of lines in the history file.)
>
>Using the code from history_truncate_file() (in history.c) as a model, I
>changed read_history_range() to save the number of bytes returned by
>read(2) in chars_read. Then, I used chars_read instead of finfo.st_size
>during the parsing of the history file.
This works, but I would prefer fixing bash to read & write its history
file in binary mode.
--
James Dumser 972-462-5335 dumser AT ti DOT com
-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -