From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 74265 invoked by alias); 24 Oct 2016 23:54:59 -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 74248 invoked by uid 89); 24 Oct 2016 23:54:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=subsystem, schulman, Schulman, H*i:sk:fbur0c1 X-HELO: Ishtar.sc.tlinx.org Received: from ishtar.tlinx.org (HELO Ishtar.sc.tlinx.org) (173.164.175.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 24 Oct 2016 23:54:57 +0000 Received: from [192.168.3.12] (Athenae [192.168.3.12]) by Ishtar.sc.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id u9ONsqFv044775 for ; Mon, 24 Oct 2016 16:54:54 -0700 Message-ID: <580E9CA6.6030606@tlinx.org> Date: Tue, 25 Oct 2016 21:14:00 -0000 From: "L. A. Walsh" User-Agent: Thunderbird MIME-Version: 1.0 To: cygwin@cygwin.com Subject: Re: bc version has issue with \r when run from cmd References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-10/txt/msg00267.txt.bz2 Andrew Schulman wrote: >> Does whoever made the windows port e.g. for the gow one or for the >> cygwin one, make their windows ports open source, and if so, then >> does anybody have a link to those? > > The Cygwin bc package uses the bc 1.06.95 source that I linked to, plus some > patches. You can download them all by checking the "Src" box for bc in setup, > then looking in /usr/src/bc-1.06.95-2.src/. > > I doubt that anyone here knows about the Gow bc package. --- I was going to ask: what is 'gow'? It seems like it is a program compiled to run in the windows subsystem? If that's the case, they likely created a version of 'bc' to run under the windows subsystem. As may be obvious now, you need to use a command shell that is compatible with whatever subsystem you compile 'bc' under. What line ending 'bc' uses is dependent on what subsystem it was compiled for. The one in cygwin is designed for use in cygwin and apparently the one included with 'gow' (whatever that is), is compiled for use from windows. "bc", and most utilities ported from *nix or open-source systems, don't care and don't look at line endings -- they expect "\n" to be the "end-of-line" indicator. On *unix* and *mac* systems it is 1 character long, but on windows, it's 2 characters (+). The utilities would get alot more confused if they had to accommodate both, so in general they only look at "\n" and rely on however they were built to indicate what that translates to in the surrounding environment. -l -- 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