Bump to m4 1.4.19
[platform/upstream/m4.git] / src / format.c
index 608ac72..6f1758f 100644 (file)
@@ -1,7 +1,7 @@
 /* GNU m4 -- A simple macro processor
 
-   Copyright (C) 1989-1994, 2006-2014, 2016 Free Software Foundation,
-   Inc.
+   Copyright (C) 1989-1994, 2006-2014, 2016-2017, 2020-2021 Free
+   Software Foundation, Inc.
 
    This file is part of GNU M4.
 
@@ -16,7 +16,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */
 
 /* printf like formatting for m4.  */
@@ -44,7 +44,7 @@ arg_int (const char *str)
   value = strtol (str, &endp, 10);
   if (endp - str - len)
     M4ERROR ((warning_status, 0, _("non-numeric argument %s"), str));
-  else if (isspace (to_uchar (*str)))
+  else if (c_isspace (*str))
     M4ERROR ((warning_status, 0, _("leading whitespace ignored")));
   else if (errno == ERANGE || (int) value != value)
     M4ERROR ((warning_status, 0, _("numeric overflow detected")));
@@ -68,7 +68,7 @@ arg_long (const char *str)
   value = strtol (str, &endp, 10);
   if (endp - str - len)
     M4ERROR ((warning_status, 0, _("non-numeric argument %s"), str));
-  else if (isspace (to_uchar (*str)))
+  else if (c_isspace (*str))
     M4ERROR ((warning_status, 0, _("leading whitespace ignored")));
   else if (errno == ERANGE)
     M4ERROR ((warning_status, 0, _("numeric overflow detected")));
@@ -92,7 +92,7 @@ arg_double (const char *str)
   value = strtod (str, &endp);
   if (endp - str - len)
     M4ERROR ((warning_status, 0, _("non-numeric argument %s"), str));
-  else if (isspace (to_uchar (*str)))
+  else if (c_isspace (*str))
     M4ERROR ((warning_status, 0, _("leading whitespace ignored")));
   else if (errno == ERANGE)
     M4ERROR ((warning_status, 0, _("numeric overflow detected")));
@@ -250,7 +250,7 @@ expand_format (struct obstack *obs, int argc, token_data **argv)
           fmt++;
         }
       else
-        while (isdigit (to_uchar (*fmt)))
+        while (c_isdigit (*fmt))
           {
             width = 10 * width + *fmt - '0';
             fmt++;
@@ -272,7 +272,7 @@ expand_format (struct obstack *obs, int argc, token_data **argv)
           else
             {
               prec = 0;
-              while (isdigit (to_uchar (*fmt)))
+              while (c_isdigit (*fmt))
                 {
                   prec = 10 * prec + *fmt - '0';
                   fmt++;
@@ -305,7 +305,7 @@ expand_format (struct obstack *obs, int argc, token_data **argv)
       if (sizeof ok <= c || !ok[c])
         {
           M4ERROR ((warning_status, 0,
-                    "Warning: unrecognized specifier in `%s'", f));
+                    _("Warning: unrecognized specifier in `%s'"), f));
           if (c == '\0')
             fmt--;
           continue;