localedef: allow %l/%n in postal_fmt [BZ #16983]

ISO 14652/30112 includes %l & %n now, so permit them in our files.
This commit is contained in:
Mike Frysinger 2016-04-15 14:52:19 -04:00
parent 7c84d5ce26
commit a837257199
2 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2016-04-16 Mike Frysinger <vapier@gentoo.org>
[BZ #16983]
* locale/programs/ld-address.c (address_finish): Update postal_fmt
comment. Add "ln" to strchr check on postal_fmt.
2016-04-16 Mike Frysinger <vapier@gentoo.org> 2016-04-16 Mike Frysinger <vapier@gentoo.org>
* locale/programs/ld-telephone.c (telephone_finish): Add %t to the * locale/programs/ld-telephone.c (telephone_finish): Add %t to the

View File

@ -150,8 +150,8 @@ No definition for %s category found"), "LC_ADDRESS"));
} }
else else
{ {
/* We must check whether the format string contains only the /* We must check whether the format string contains only the allowed
allowed escape sequences. */ escape sequences. Last checked against ISO 30112 WD10 [2014]. */
const char *cp = address->postal_fmt; const char *cp = address->postal_fmt;
if (*cp == '\0') if (*cp == '\0')
@ -165,7 +165,7 @@ No definition for %s category found"), "LC_ADDRESS"));
if (*++cp == 'R') if (*++cp == 'R')
/* Romanize-flag. */ /* Romanize-flag. */
++cp; ++cp;
if (strchr ("afdbshNtreCzTSc%", *cp) == NULL) if (strchr ("nafdbshNtreClzTSc%", *cp) == NULL)
{ {
WITH_CUR_LOCALE (error (0, 0, _("\ WITH_CUR_LOCALE (error (0, 0, _("\
%s: invalid escape `%%%c' sequence in field `%s'"), %s: invalid escape `%%%c' sequence in field `%s'"),