Path: csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail From: Dennis Clarke Newsgroups: gnu.bash.bug Subject: Re: built-in printf %f parameter format depend on LC_NUMERIC Date: Fri, 12 Jul 2019 20:55:28 -0400 Lines: 82 Approved: bug-bash@gnu.org Message-ID: References: <5d24be33.1c69fb81.59c43.fe4dSMTPIN_ADDED_BROKEN@mx.google.com> <6468b45e-5b4a-8edf-4ab8-0838843beaaf@noiraude.net> <7c757690-24bd-7b1a-cf8e-af63cbe05216@noiraude.net> <91ed1981-df04-aa06-b108-23c7f89de3b4@case.edu> <4dde13d8-dc42-52b5-bc15-e5390f6d7ec5@archlinux.org> <51bed6f0-eeb8-c93b-33e7-6ccaf4d73b3f@blastwave.org> <8f35d89c-da3c-661a-c1d5-b9c70ace6196@case.edu> <31b022ca-cefb-b7fb-73d3-0a9d60e2abed@blastwave.org> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: usenet.stanford.edu 1562979335 23824 209.51.188.17 (13 Jul 2019 00:55:35 GMT) X-Complaints-To: action@cs.stanford.edu To: bug-bash@gnu.org Envelope-to: bug-bash@gnu.org X-TCPREMOTEIP: 99.253.177.25 X-Authenticated-UID: dclarke@blastwave.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.0 In-Reply-To: <8f35d89c-da3c-661a-c1d5-b9c70ace6196@case.edu> Content-Language: en-US X-MIME-Autoconverted: from 8bit to quoted-printable by atl4mhob21.registeredsite.com id x6D0tTi1050548 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.17.115.115 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <31b022ca-cefb-b7fb-73d3-0a9d60e2abed@blastwave.org> X-Mailman-Original-References: <5d24be33.1c69fb81.59c43.fe4dSMTPIN_ADDED_BROKEN@mx.google.com> <6468b45e-5b4a-8edf-4ab8-0838843beaaf@noiraude.net> <7c757690-24bd-7b1a-cf8e-af63cbe05216@noiraude.net> <91ed1981-df04-aa06-b108-23c7f89de3b4@case.edu> <4dde13d8-dc42-52b5-bc15-e5390f6d7ec5@archlinux.org> <51bed6f0-eeb8-c93b-33e7-6ccaf4d73b3f@blastwave.org> <8f35d89c-da3c-661a-c1d5-b9c70ace6196@case.edu> Xref: csiph.com gnu.bash.bug:15158 On 7/12/19 4:45 PM, Chet Ramey wrote: > On 7/12/19 4:26 PM, Martijn Dekker wrote: >> Op 12-07-19 om 21:46 schreef Dennis Clarke: >>> Well the man page for XPG6 bc in Solaris 10 claims : >>> >>> ENVIRONMENT VARIABLES >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 See environ(5) for descriptions of th= e following environment >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 variables=C2=A0 that=C2=A0 affect=C2=A0= the=C2=A0 execution of bc: LANG, LC_ALL, >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 LC_CTYPE, LC_MESSAGES, and NLSPATH. >>> >>> Really? >> >> Note the absence of LC_NUMERIC in that paragraph. >=20 > Yeah, but LC_ALL overrides LC_NUMERIC anyway. >=20 >=20 I'm checking into the GPL version but I won't be surprised. The historical bits tell us that GPL bc is "bc" and not "dc" under the=20 covers. Program: GNU bc Author: Philip A. Nelson E-mail: phil@cs.wwu.edu OS: UNIX (BSD, System V, MINIX, POSIX) Copying: GNU GPL version 2 Copyright holder: Free Software Foundation, Inc. Version: bc version 1.01 Required: vsprintf and vfprintf routines. Machines: It has been compiled and run on the following environments: BSD4.3 (VAX 11) MINIX 1.5 (IBM PC, both K&R and ANSI compilers) MINIX 1.5 (pc532) SUN-OS 4.1 (SUN 3 and SUN 4) SVR3V5 (Motorola 68K) SVR3.2 (3B2) SVR4.0.2 (a 386 box) ULTRIX 4.1 (DEC 5000) UTS (Amdahl) bc is an arbitrary precision numeric processing language. Syntax is similar to C, but differs in many substantial areas. It supports interactive execution of statements. bc is a utility included in the POSIX P1003.2/D11 draft standard. This version was written to be a POSIX compliant bc processor with several extensions to the draft standard. Option flags are available to cause warning or rejection of the extensions to the POSIX standard. For those who want only POSIX bc with no extensions, a grammar is provided for exactly the language described in the POSIX document. The grammar (sbc.y) comes from the POSIX document. The Makefile contains rules to make sbc. (for Standard BC) Since the POSIX document does not specify how bc must be implemented, this version does not use the historical method of having bc be a compiler for the dc calculator. This version has a single executable that both compiles the language and runs the a resulting "byte code". The "byte code" is NOT the dc language. Also, included in the initial distribution is the library file vfprintf.c for MINIX systems. My minix 1.5 did not have this file. Also, you should verify that vsprintf.c works correctly on your system. The extensions add some features I think are missing.... etc etc .. I'll find it but it will be the same problem. --=20 Dennis Clarke RISC-V/SPARC/PPC/ARM/CISC UNIX and Linux spoken GreyBeard and suspenders optional