From: Duncan Roe <duncan_roe@optusnet.com.au>
To: cygwin@cygwin.com
Subject: Re: bc version has issue with \r when run from cmd
Date: Mon, 24 Oct 2016 12:17:00 -0000 [thread overview]
Message-ID: <20161024110928.GB7112@dimstar.local.net> (raw)
In-Reply-To: <t73p0cdoong63vqs77sghu3c73e3if8bug@4ax.com>
On Sun, Oct 23, 2016 at 06:19:31PM -0400, Andrew Schulman wrote:
> > >From: "L. A. Walsh" <cygwin at tlinx dot org>
> > >Date: Sat, 22 Oct 2016 15:52:42 -0700
> >
> > To L.A. Walsh.
> >
> > I understand all that but what i'm saying is that version 1.06 (not
> > 1.06.95, which cygwin is using, but 1.06, which Gow uses), So, version
> > 1.06 Doesn't have a problem with the fact that cmd sends a \r So,
> > if one doesn't want to call it a bug, then one can call it a lost
> > feature, useful feature of 1.06 (allowing bc to conveniently also be
> > used from cmd), and that beneficial flexible feature was lost in
> > 1.06.95
>
> Hi. I adopted the bc package about a year ago, since fish uses it and I maintain
> fish for Cygwin.
>
> I think L.A. is right that because this is an issue of integration between
> Cygwin and cmd, it's in the category of a nice-to-have feature. But I get that
> it would be useful for you, and maybe for others too.
>
> I haven't looked at the bc source code. It could take some time to find where
> the issue is. A place to start would be to compare the code archives:
>
> http://ftp.gnu.org/gnu/bc/bc-1.06.tar.gz
> http://alpha.gnu.org/gnu/bc/bc-1.06.95.tar.bz2
>
> If you were to localize the problem in the source code and even propose a patch,
> that would make it a lot more likely to get the problem fixed. Heck, you might
> even get a gold star. I maintain the gold star page too :)
>
> Andrew
>
Hi Andrew,
I don't think it's a change to bc. I built and tried bc 1.06 under Linux and it
behaves the same (1.06.95 was released about 10 years ago BTW):
21:44:51$ ./bc --version
bc 1.06
21:53:24$ echo -e "scale=10; 4*a(1)\r"|./bc -l
(standard_in) 1: illegal character: ^M
21:59:04$ echo -e "scale=10; 4*a(1)"|./bc -l
3.1415926532
21:59:29$
On debugging ./bc, I found this:
Breakpoint 2, yyparse () at /usr/gnu/share/bison.simple:254
254 /usr/gnu/share/bison.simple: No such file or directory.
(gdb) fin
Run till exit from #0 yyparse () at /usr/gnu/share/bison.simple:254
(standard_in) 1: illegal character: ^M
main (argc=1, argv=0xbfffeb34) at main.c:262
262 if (compile_only)
Value returned is $1 = 0
So it would seem that the new error is a consequence of some update to flex or
bison in the last 10 years. Does Gow have a patched flex or bison? Or maybe
their bc build is just very old?
Cheers ... Duncan.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
next prev parent reply other threads:[~2016-10-24 11:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-23 11:16 dapiot holmp
2016-10-24 6:13 ` Andrew Schulman
2016-10-24 12:17 ` Duncan Roe [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-10-24 11:09 dapiot holmp
2016-10-24 15:30 ` Andrew Schulman
2016-10-25 21:14 ` L. A. Walsh
2016-10-26 5:12 ` Brian Inglis
2016-10-20 7:02 dapiot holmp
2016-10-23 1:45 ` L. A. Walsh
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=20161024110928.GB7112@dimstar.local.net \
--to=duncan_roe@optusnet.com.au \
--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).