public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "L. A. Walsh" <cygwin@tlinx.org>
To: cygwin@cygwin.com
Subject: Re: bc version has issue with \r when run from cmd
Date: Tue, 25 Oct 2016 21:14:00 -0000	[thread overview]
Message-ID: <580E9CA6.6030606@tlinx.org> (raw)
In-Reply-To: <fbur0c1suma1ia2kvldfa01iavd4rnb8lb@4ax.com>

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
(<CR>+<LF>).  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

  reply	other threads:[~2016-10-24 23:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-24 11:09 dapiot holmp
2016-10-24 15:30 ` Andrew Schulman
2016-10-25 21:14   ` L. A. Walsh [this message]
2016-10-26  5:12     ` Brian Inglis
  -- strict thread matches above, loose matches on Subject: below --
2016-10-23 11:16 dapiot holmp
2016-10-24  6:13 ` Andrew Schulman
2016-10-24 12:17   ` Duncan Roe
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=580E9CA6.6030606@tlinx.org \
    --to=cygwin@tlinx.org \
    --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).