Subject: Re: replacement for bc(1), dc(1), diff(1), and diff(3)
To: None <email@example.com>
From: Ben Harris <firstname.lastname@example.org>
Date: 03/28/2005 11:27:27
In article <email@example.com> you write:
>On Sunday 27 March 2005 07:24, Phil Nelson wrote:
>> On Sunday 27 March 2005 04:11, you wrote:
>> > That's 68 digits, a backslash and 3 digits.
>> > Line lenght is 69
>> You are right. GNU bc is wrong.
>Well, after thinking about this for a while, I went back to the ChangeLog and
>found a change in March of 1995 where I changed the line length to 68
>numbers, the backslash and then the linefeed for a total of 70 characters. I
>was convinced by someone else that POSIX line lengths include the linefeed.
This is correct. In the current POSIX, section 3.205 of XBD defines a
# A sequence of zero or more non- <newline>s plus a terminating <newline>.
Thus, a line includes its terminating newline, so the newline has to be
counted when generating the 70-character lines required by bc.