From: "Dave Korn" <dave.korn@artimi.com>
To: <cygwin@cygwin.com>
Subject: RE: bash-3.1-7^[$B!!^[(BBUG
Date: Thu, 14 Sep 2006 17:15:00 -0000 [thread overview]
Message-ID: <004c01c6d821$68f5fdf0$a501a8c0@CAM.ARTIMI.COM> (raw)
In-Reply-To: <45098A3B.4060105@scytek.de>
On 14 September 2006 17:59, Volker Quetschke wrote:
> Hi!
> (snip)
>> +#ifdef __CYGWIN__
>> + /* lseek'ing on text files is problematic; lseek reports the true
>> + file offset, but read collapses \r\n and returns a character
>> + count. We cannot reliably seek backwards if nr is smaller than
>> + the seek offset encountered during the read, and must instead
>> + treat the stream as unbuffered. */
>> + if ((bp->b_flag & (B_TEXT | B_UNBUFF)) == B_TEXT)
> ------------------------^^^^^^^^^^^^^^^^^ ^^^^^^
> part of the patch looks suspicious to me. You probably just want to test
> if the LHS expression is true.
You reckon? That looks to me like a test for B_TEXT is set *and* B_UNBUFF
is cleared. Since the action we're going to take if this test succeeds is to
set the stream unbuffered, there's no need to do it for a stream that already
/is/ unbuffered. That's how it looks to me at first glance, anyway.
I agree it's a /slightly/ unclear construct that should /perhaps/ have an
explicit comment to clarify the way in which it's been worded.
> Volker
>
>> + {
>> + off_t offset = lseek (bp->b_fd, 0, SEEK_CUR);
... Could have made good use of another one of your "(snip)"s here...!
[ ... snip ... ]
cheers,
DaveK
--
Can't think of a witty .sigline today....
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
next prev parent reply other threads:[~2006-09-14 17:15 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-13 4:38 bash-3.1-7^[$B!!^[(BBUG Eric Blake
2006-09-13 5:25 ` bash-3.1-7^[$B!!^[(BBUG Christopher Faylor
2006-09-13 14:33 ` bash-3.1-7^[$B!!^[(BBUG Eric Blake
2006-09-13 20:07 ` bash-3.1-7^[$B!!^[(BBUG Shankar Unni
2006-09-13 20:37 ` bash-3.1-7^[$B!!^[(BBUG mwoehlke
2006-09-13 21:48 ` bash-3.1-7^[$B!!^[(BBUG Eric Blake
2006-09-13 22:08 ` bash-3.1-7^[$B!!^[(BBUG mwoehlke
2006-09-13 23:46 ` bash-3.1-7^[$B!!^[(BBUG Volker Quetschke
2006-09-13 23:58 ` bash-3.1-7^[$B!!^[(BBUG David Rothenberger
2006-09-14 0:30 ` bash-3.1-7^[$B!!^[(BBUG Larry Hall (Cygwin)
2006-09-18 2:48 ` bash-3.1-7^[$B!!^[(BBUG Carlo Florendo
2006-09-18 2:54 ` bash-3.1-7^[$B!!^[(BBUG Carlo Florendo
2006-09-14 0:19 ` bash-3.1-7^[$B!!^[(BBUG Christopher Faylor
2006-09-14 1:09 ` bash-3.1-7^[$B!!^[(BBUG Volker Quetschke
2006-09-14 2:07 ` bash-3.1-7^[$B!!^[(BBUG Christopher Faylor
2006-09-14 11:13 ` bash-3.1-7^[$B!!^[(BBUG Eric Blake
2006-09-14 16:58 ` bash-3.1-7^[$B!!^[(BBUG Volker Quetschke
2006-09-14 17:15 ` Dave Korn [this message]
2006-09-14 17:22 ` bash-3.1-7^[$B!!^[(BBUG Volker Quetschke
2006-09-14 17:26 ` bash-3.1-7^[$B!!^[(BBUG Eric Blake
2006-09-21 3:50 ` bash-3.1-7^[$B!!^[(BBUG Christopher Layne
2006-09-14 15:21 ` bash-3.1-7 bug mwoehlke
2006-09-21 3:48 ` bash-3.1-7^[$B!!^[(BBUG Christopher Layne
2006-09-21 3:37 ` bash-3.1-7^[$B!!^[(BBUG Christopher Layne
-- strict thread matches above, loose matches on Subject: below --
2006-09-13 4:13 bash-3.1-7^[$B!!^[(BBUG Eric Blake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='004c01c6d821$68f5fdf0$a501a8c0@CAM.ARTIMI.COM' \
--to=dave.korn@artimi.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).