From: Karl Williamson Date: Thu, 28 Dec 2023 16:16:59 +0000 (-0700) Subject: locale.c: Remove redundant handling of the AM_PM format X-Git-Tag: v5.39.7~73 X-Git-Url: https://perl5.git.perl.org/perl5.git/commitdiff_plain/2c742ddb3ec81e6d23aadbeb627c4fe55e6db958 locale.c: Remove redundant handling of the AM_PM format This format is identical whether or not LC_TIME is usable on this platform or not. Previously, it was actually handled in two functions, emulate_langinfo() when LC_TIME is usable, and Perl_langinfo8() when not. Previous commits have enabled the format handling in emulate_langinfo() to be returned instead of having separate cases, depending on LC_TIME's availability. That means the handling of this format in Perl_langinfo8() is redundant and this commit removes it. --- diff --git a/locale.c b/locale.c index f4c1072..c20cc2e 100644 --- a/locale.c +++ b/locale.c @@ -5951,16 +5951,11 @@ Perl_langinfo8(const nl_item item, utf8ness_t * utf8ness) * them, and so are returned unconditionally; they may not be what the * locale actually says, but should give good enough results for someone * using them as formats (as opposed to trying to parse them to figure - * out what the locale says). The other format is actually tested - * to verify it works on the platform */ + * out what the locale says). */ case D_FMT: return "%x"; case T_FMT: return "%X"; case D_T_FMT: return "%c"; -# ifndef USE_LOCALE_TIME - - case T_FMT_AMPM: return "%r"; -# endif #endif } /* End of switch on item */