From 02860e478169f80f2ce15d58703929ac6ad7e4b0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 12 Feb 2004 17:06:35 +0000 Subject: Update. 2004-02-12 Ulrich Drepper * locale/programs/locale.c (show_locale_vars): Don't print a value for LANG if it is not set. --- ChangeLog | 5 +++++ locale/programs/locale.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ceb93bd..535a8b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-02-12 Ulrich Drepper + + * locale/programs/locale.c (show_locale_vars): Don't print a value + for LANG if it is not set. + 2004-02-11 Jakub Jelinek * posix/regexec.c (check_node_accept_bytes): Return 0 if char_len is 0. diff --git a/locale/programs/locale.c b/locale/programs/locale.c index 971fd36..92be8e2 100644 --- a/locale/programs/locale.c +++ b/locale/programs/locale.c @@ -769,7 +769,7 @@ show_locale_vars (void) { size_t cat_no; const char *lcall = getenv ("LC_ALL"); - const char *lang = getenv ("LANG") ? : "POSIX"; + const char *lang = getenv ("LANG") ? : ""; auto void get_source (const char *name); @@ -778,7 +778,8 @@ show_locale_vars (void) char *val = getenv (name); if ((lcall ?: "")[0] != '\0' || val == NULL) - printf ("%s=\"%s\"\n", name, (lcall ?: "")[0] ? lcall : lang); + printf ("%s=\"%s\"\n", name, + (lcall ?: "")[0] ? lcall : (lang ?: "")[0] ? lang : "POSIX"); else printf ("%s=%s\n", name, val); } -- cgit v1.1