[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
16-numeric-args.patch
From: |
Akim Demaille |
Subject: |
16-numeric-args.patch |
Date: |
Sat, 13 Oct 2001 13:33:49 +0200 |
To me, this is broken. M4 has its own rules for spaces, I fail to see
why numeric args would make a difference, nonetheless, waiting for an
approval.
Index: ChangeLog
from Akim Demaille <address@hidden>
* m4/utility.c (m4_skip_space): Remove.
(m4_numeric_arg): Be M4 consistent: there is no reason for leading
and trailing spaces to be valid in numeric arguments.
* doc/m4.texinfo (Changesyntax): Adjust a now broken unreadable
example having a trailing space.
Index: doc/m4.texinfo
--- doc/m4.texinfo Sat, 13 Oct 2001 09:41:33 +0200 akim
+++ doc/m4.texinfo Sat, 13 Oct 2001 13:06:15 +0200 akim
@@ -2263,7 +2263,7 @@ @node Changesyntax
@example
changesyntax(`(@{<', `)@}>', `,;:', `O(,)')
@result{}
address@hidden; 2 : 8>
address@hidden; 2: 8>
@result{}00001111
@end example
Index: m4/utility.c
--- m4/utility.c Sat, 13 Oct 2001 09:51:29 +0200 akim
+++ m4/utility.c Sat, 13 Oct 2001 13:01:00 +0200 akim
@@ -126,14 +126,6 @@
return FALSE;
}
-const char *
-m4_skip_space (const char *arg)
-{
- while (M4_IS_SPACE(*arg))
- arg++;
- return arg;
-}
-
/* The function m4_numeric_arg () converts ARG to an int pointed to by
VALUEP. If the conversion fails, print error message for macro MACRO.
Return TRUE iff conversion succeeds. */
@@ -143,8 +135,8 @@
char *endp;
if (*M4ARG (arg) == 0
- || (*valuep = strtol (m4_skip_space (M4ARG (arg)), &endp, 10),
- *m4_skip_space (endp) != 0))
+ || (*valuep = strtol (M4ARG (arg), &endp, 10),
+ *endp != 0))
{
M4WARN ((warning_status, 0,
_("Warning: %s: argument %d non-numeric: %s"),
- 16-numeric-args.patch,
Akim Demaille <=