From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28049 invoked by alias); 24 Oct 2016 11:09:44 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 28025 invoked by uid 89); 24 Oct 2016 11:09:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.1 required=5.0 tests=BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=fish, heck, UD:95.tar.bz2, sk:bc106 X-HELO: mail108.syd.optusnet.com.au Received: from mail108.syd.optusnet.com.au (HELO mail108.syd.optusnet.com.au) (211.29.132.59) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 24 Oct 2016 11:09:40 +0000 Received: from dimstar.local.net (c110-22-56-26.eburwd6.vic.optusnet.com.au [110.22.56.26]) by mail108.syd.optusnet.com.au (Postfix) with ESMTP id 642981A3E0C for ; Mon, 24 Oct 2016 22:09:33 +1100 (AEDT) Received: (qmail 13366 invoked by uid 501); 24 Oct 2016 11:09:28 -0000 Date: Mon, 24 Oct 2016 12:17:00 -0000 From: Duncan Roe To: cygwin@cygwin.com Subject: Re: bc version has issue with \r when run from cmd Message-ID: <20161024110928.GB7112@dimstar.local.net> Mail-Followup-To: cygwin@cygwin.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=RIxOZNW+ c=1 sm=1 tr=0 a=/xIuaNGu1NPzt0yKkvdCVQ==:117 a=/xIuaNGu1NPzt0yKkvdCVQ==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=CH0kA5CcgfcA:10 a=mDV3o1hIAAAA:8 a=DC9t-ygNjRXSs_7p020A:9 a=CjuIK1q_8ugA:10 a=41rLKCki8aMA:10 a=_FVE-zBwftR9WsbkzFJk:22 X-SW-Source: 2016-10/txt/msg00261.txt.bz2 On Sun, Oct 23, 2016 at 06:19:31PM -0400, Andrew Schulman wrote: > > >From: "L. A. Walsh" > > >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