summaryrefslogtreecommitdiff
path: root/locale/programs/ld-telephone.c
diff options
context:
space:
mode:
Diffstat (limited to 'locale/programs/ld-telephone.c')
-rw-r--r--locale/programs/ld-telephone.c34
1 files changed, 16 insertions, 18 deletions
diff --git a/locale/programs/ld-telephone.c b/locale/programs/ld-telephone.c
index 6c38449d2c..f29f88a6e4 100644
--- a/locale/programs/ld-telephone.c
+++ b/locale/programs/ld-telephone.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -19,7 +19,6 @@
# include <config.h>
#endif
-#include <error.h>
#include <langinfo.h>
#include <string.h>
#include <stdint.h>
@@ -90,9 +89,8 @@ telephone_finish (struct localedef_t *locale, const struct charmap_t *charmap)
empty one. */
if (telephone == NULL)
{
- if (! be_quiet)
- WITH_CUR_LOCALE (error (0, 0, _("\
-No definition for %s category found"), "LC_TELEPHONE"));
+ record_warning (_("\
+No definition for %s category found"), "LC_TELEPHONE");
telephone_startup (NULL, locale, 0);
telephone = locale->categories[LC_TELEPHONE].telephone;
nothing = 1;
@@ -102,10 +100,10 @@ No definition for %s category found"), "LC_TELEPHONE"));
if (telephone->tel_int_fmt == NULL)
{
if (! nothing)
- WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' not defined"),
- "LC_TELEPHONE", "tel_int_fmt"));
+ record_error (0, 0, _("%s: field `%s' not defined"),
+ "LC_TELEPHONE", "tel_int_fmt");
/* Use as the default value the value of the i18n locale. */
- telephone->tel_int_fmt = "+%c %a %l";
+ telephone->tel_int_fmt = "+%c %a%t%l";
}
else
{
@@ -114,17 +112,17 @@ No definition for %s category found"), "LC_TELEPHONE"));
const char *cp = telephone->tel_int_fmt;
if (*cp == '\0')
- WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' must not be empty"),
- "LC_TELEPHONE", "tel_int_fmt"));
+ record_error (0, 0, _("%s: field `%s' must not be empty"),
+ "LC_TELEPHONE", "tel_int_fmt");
else
while (*cp != '\0')
{
if (*cp == '%')
{
- if (strchr ("aAlc", *++cp) == NULL)
+ if (strchr ("aAcCelt", *++cp) == NULL)
{
- WITH_CUR_LOCALE (error (0, 0, _("\
-%s: invalid escape sequence in field `%s'"), "LC_TELEPHONE", "tel_int_fmt"));
+ record_error (0, 0, _("\
+%s: invalid escape sequence in field `%s'"), "LC_TELEPHONE", "tel_int_fmt");
break;
}
}
@@ -144,10 +142,10 @@ No definition for %s category found"), "LC_TELEPHONE"));
{
if (*cp == '%')
{
- if (strchr ("aAlc", *++cp) == NULL)
+ if (strchr ("aAcCelt", *++cp) == NULL)
{
- WITH_CUR_LOCALE (error (0, 0, _("\
-%s: invalid escape sequence in field `%s'"), "LC_TELEPHONE", "tel_dom_fmt"));
+ record_error (0, 0, _("\
+%s: invalid escape sequence in field `%s'"), "LC_TELEPHONE", "tel_dom_fmt");
break;
}
}
@@ -159,8 +157,8 @@ No definition for %s category found"), "LC_TELEPHONE"));
if (telephone->cat == NULL) \
{ \
if (verbose && ! nothing) \
- WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' not defined"), \
- "LC_TELEPHONE", #cat)); \
+ record_warning (_("%s: field `%s' not defined"), "LC_TELEPHONE", \
+ #cat); \
telephone->cat = ""; \
}