From 6aba5c5eec25a6294e01899eb55a31bf5b889900 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Wed, 3 Apr 2019 14:11:27 -0600 Subject: locale.c: Add some comments --- locale.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'locale.c') diff --git a/locale.c b/locale.c index 50f33776cb..9fad0cbb3c 100644 --- a/locale.c +++ b/locale.c @@ -739,7 +739,7 @@ S_emulate_setlocale(const int category, # endif - } + } /* End of this being setlocale(LC_foo, NULL) */ /* Here, we are switching locales. */ @@ -855,7 +855,7 @@ S_emulate_setlocale(const int category, } } } - } + } /* End of this being setlocale(LC_foo, "") */ else if (strchr(locale, ';')) { /* LC_ALL may actually incude a conglomeration of various categories. @@ -952,7 +952,8 @@ S_emulate_setlocale(const int category, assert(category == LC_ALL); return do_setlocale_c(LC_ALL, NULL); - } + } /* End of this being setlocale(LC_ALL, + "LC_CTYPE=foo;LC_NUMERIC=bar;...") */ ready_to_set: ; @@ -1006,7 +1007,9 @@ S_emulate_setlocale(const int category, # endif - /* If we are switching to the LC_ALL C locale, it already exists. Use + /* If this call is to switch to the LC_ALL C locale, it already exists, and + * in fact, we already have switched to it (in preparation for what + * normally is to come). But since we're already there, continue to use * it instead of trying to create a new locale */ if (mask == LC_ALL_MASK && isNAME_C_OR_POSIX(locale)) { -- cgit v1.2.1