]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - locale/programs/ld-messages.c
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / locale / programs / ld-messages.c
index 591ffaf5bec4bddef560c14b33dbe5b5defa0e67..6e15571a0c17ff7eaca9806e48553a10c2cec221 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2014 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2018 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.org>, 1995.
 
@@ -93,9 +93,8 @@ messages_finish (struct localedef_t *locale, const struct charmap_t *charmap)
         empty one.  */
       if (messages == NULL)
        {
-         if (! be_quiet)
-           WITH_CUR_LOCALE (error (0, 0, _("\
-No definition for %s category found"), "LC_MESSAGES"));
+         record_warning (_("\
+No definition for %s category found"), "LC_MESSAGES");
          messages_startup (NULL, locale, 0);
          messages = locale->categories[LC_MESSAGES].messages;
          nothing = 1;
@@ -110,17 +109,16 @@ No definition for %s category found"), "LC_MESSAGES"));
 
   if (messages->yesexpr == NULL)
     {
-      if (! be_quiet && ! nothing)
-       WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' undefined"),
-                               "LC_MESSAGES", "yesexpr"));
+      if (! nothing)
+       record_error (0, 0, _("%s: field `%s' undefined"),
+                     "LC_MESSAGES", "yesexpr");
       messages->yesexpr = "^[yY]";
     }
   else if (messages->yesexpr[0] == '\0')
     {
-      if (!be_quiet)
-       WITH_CUR_LOCALE (error (0, 0, _("\
+      record_error (0, 0, _("\
 %s: value for field `%s' must not be an empty string"),
-                               "LC_MESSAGES", "yesexpr"));
+                   "LC_MESSAGES", "yesexpr");
     }
   else
     {
@@ -134,9 +132,9 @@ No definition for %s category found"), "LC_MESSAGES"));
          char errbuf[BUFSIZ];
 
          (void) regerror (result, &re, errbuf, BUFSIZ);
-         WITH_CUR_LOCALE (error (0, 0, _("\
+         record_error (0, 0, _("\
 %s: no correct regular expression for field `%s': %s"),
-                                 "LC_MESSAGES", "yesexpr", errbuf));
+                       "LC_MESSAGES", "yesexpr", errbuf);
        }
       else if (result != 0)
        regfree (&re);
@@ -144,17 +142,16 @@ No definition for %s category found"), "LC_MESSAGES"));
 
   if (messages->noexpr == NULL)
     {
-      if (! be_quiet && ! nothing)
-       WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' undefined"),
-                               "LC_MESSAGES", "noexpr"));
+      if (! nothing)
+       record_error (0, 0, _("%s: field `%s' undefined"),
+                     "LC_MESSAGES", "noexpr");
       messages->noexpr = "^[nN]";
     }
   else if (messages->noexpr[0] == '\0')
     {
-      if (!be_quiet)
-       WITH_CUR_LOCALE (error (0, 0, _("\
+      record_error (0, 0, _("\
 %s: value for field `%s' must not be an empty string"),
-                               "LC_MESSAGES", "noexpr"));
+                   "LC_MESSAGES", "noexpr");
     }
   else
     {
@@ -168,9 +165,9 @@ No definition for %s category found"), "LC_MESSAGES"));
          char errbuf[BUFSIZ];
 
          (void) regerror (result, &re, errbuf, BUFSIZ);
-         WITH_CUR_LOCALE (error (0, 0, _("\
+         record_error (0, 0, _("\
 %s: no correct regular expression for field `%s': %s"),
-                                 "LC_MESSAGES", "noexpr", errbuf));
+                       "LC_MESSAGES", "noexpr", errbuf);
        }
       else if (result != 0)
        regfree (&re);