From owner-svn-src-head@freebsd.org Thu Jan 14 01:59:22 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3BCF4A827A4; Thu, 14 Jan 2016 01:59:22 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0ADFC155F; Thu, 14 Jan 2016 01:59:21 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0E1xLlF093210; Thu, 14 Jan 2016 01:59:21 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0E1xKSu093208; Thu, 14 Jan 2016 01:59:20 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201601140159.u0E1xKSu093208@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Thu, 14 Jan 2016 01:59:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r293868 - head/lib/libdpv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2016 01:59:22 -0000 Author: dteske Date: Thu Jan 14 01:59:20 2016 New Revision: 293868 URL: https://svnweb.freebsd.org/changeset/base/293868 Log: Default to en_US.ISO8859-1 if no locale MFC after: 3 days X-MFC-to: stable/10 Modified: head/lib/libdpv/dpv.c head/lib/libdpv/dpv.h Modified: head/lib/libdpv/dpv.c ============================================================================== --- head/lib/libdpv/dpv.c Thu Jan 14 01:51:18 2016 (r293867) +++ head/lib/libdpv/dpv.c Thu Jan 14 01:59:20 2016 (r293868) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -482,6 +483,11 @@ dpv(struct dpv_config *config, struct dp /* Reads: label_size pbar_size pprompt aprompt dpv_nfiles */ /* Inits: dheight and dwidth */ + /* Default localeconv(3) settings for dialog(3) status */ + setlocale(LC_NUMERIC, + getenv("LC_ALL") == NULL && getenv("LC_NUMERIC") == NULL ? + LC_NUMERIC_DEFAULT : ""); + if (!debug) { /* Internally create the initial `--gauge' prompt text */ dprompt_recreate(file_list, (struct dpv_file_node *)NULL, 0); Modified: head/lib/libdpv/dpv.h ============================================================================== --- head/lib/libdpv/dpv.h Thu Jan 14 01:51:18 2016 (r293867) +++ head/lib/libdpv/dpv.h Thu Jan 14 01:59:20 2016 (r293868) @@ -38,6 +38,9 @@ #define FALSE 0 #endif +/* localeconv(3) */ +#define LC_NUMERIC_DEFAULT "en_US.ISO8859-1" + /* Data to process */ extern long long dpv_overall_read;