[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: Fix truncation of trailing spaces in %param
From: |
Akim Demaille |
Subject: |
FYI: Fix truncation of trailing spaces in %param |
Date: |
Wed, 06 Oct 2004 17:53:04 +0200 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
Index: ChangeLog
from Akim Demaille <address@hidden>
* src/parse-gram.y (add_param): Fix the truncation of trailing
spaces.
Index: src/parse-gram.y
===================================================================
RCS file: /cvsroot/bison/bison/src/parse-gram.y,v
retrieving revision 1.51
diff -u -u -r1.51 parse-gram.y
--- src/parse-gram.y 27 Sep 2004 22:03:42 -0000 1.51
+++ src/parse-gram.y 6 Oct 2004 15:51:28 -0000
@@ -480,7 +480,8 @@
char const *name_start = NULL;
char *p;
- for (p = decl; *p; p++)
+ /* Stop on last actual character. */
+ for (p = decl; p[1]; p++)
if ((p == decl
|| ! memchr (alphanum, p[-1], sizeof alphanum))
&& memchr (alphanum, p[0], sizeof alphanum - 10))
@@ -490,7 +491,7 @@
the braces. */
while (*--p == ' ' || *p == '\t')
continue;
- *p = '\0';
+ p[1] = '\0';
while (*++decl == ' ' || *decl == '\t')
continue;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: Fix truncation of trailing spaces in %param,
Akim Demaille <=