delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/10/24/07:10:01

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:references
:mime-version:content-type:in-reply-to; q=dns; s=default; b=Iynh
Qgt5o86spS1vZFAkQjuAqBj/vd6rdarS6+4PuM8p5CDVx9NHC9K0Ac97Foy/V5EI
4WuSgCxPQ19Sg8ClPE4qiwlyjPo4M1yRvalOhsygVNsQSe5SDyZFKsQIf/Gh6bTE
dt2Oimq6YanXm5F87eNsfSAH0bdTnyhOFffKl6o=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:references
:mime-version:content-type:in-reply-to; s=default; bh=hUq0sc4bEf
Lpx5nqPyiOA8/0DBc=; b=m4JjbySq64ODFG0Et1I+pINMiBmPWpImBZLY4LoheP
2g8gTHPx0je/dYWLSfBHtUA0aXl+S6iFaOR+SdtK3DKzOFm/xKSgSAIrqzr96dyO
rBFNm3D7LB59awDUYPrs92HKaMgOs0Mc0XMoFc7nt8X3ZIjbB0Dhpk7CeFRv0SBF
I=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
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
Date: Mon, 24 Oct 2016 22:09:28 +1100
From: Duncan Roe <duncan_roe AT optusnet DOT com DOT au>
To: cygwin AT cygwin DOT com
Subject: Re: bc version has issue with \r when run from cmd
Message-ID: <20161024110928.GB7112@dimstar.local.net>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <CAKBM6-PHPZ23SqwSLbUL=PZZGuJrNQCBkc7BoatnSG4orijJGw AT mail DOT gmail DOT com> <t73p0cdoong63vqs77sghu3c73e3if8bug AT 4ax DOT com>
MIME-Version: 1.0
In-Reply-To: <t73p0cdoong63vqs77sghu3c73e3if8bug@4ax.com>
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

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019