Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/ksh The previous commit removed a { }?block, and uninten...



details:   https://anonhg.NetBSD.org/src/rev/39764c7e48a3
branches:  trunk
changeset: 761315:39764c7e48a3
user:      hauke <hauke%NetBSD.org@localhost>
date:      Sun Jan 23 17:15:15 2011 +0000

description:
The previous commit removed a { }?block, and unintendedly introduced a
C99ism (inlined variable declaration), which hurts when pdksh is used
for bootstrapping pkgsrc. Move the two declarations to the beginning
of the block.

diffstat:

 bin/ksh/lex.c |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (39 lines):

diff -r 38159d8646d7 -r 39764c7e48a3 bin/ksh/lex.c
--- a/bin/ksh/lex.c     Sun Jan 23 17:11:55 2011 +0000
+++ b/bin/ksh/lex.c     Sun Jan 23 17:15:15 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lex.c,v 1.13 2008/10/27 19:52:28 apb Exp $     */
+/*     $NetBSD: lex.c,v 1.14 2011/01/23 17:15:15 hauke Exp $   */
 
 /*
  * lexical analysis and source input
@@ -6,7 +6,7 @@
 #include <sys/cdefs.h>
 
 #ifndef lint
-__RCSID("$NetBSD: lex.c,v 1.13 2008/10/27 19:52:28 apb Exp $");
+__RCSID("$NetBSD: lex.c,v 1.14 2011/01/23 17:15:15 hauke Exp $");
 #endif
 
 
@@ -245,6 +245,9 @@
 
                  Subst:
                        switch (c) {
+                         Lex_state *s;
+                         Lex_state *base;
+
                          case '\\':
                                c = getsc();
                                switch (c) {
@@ -341,8 +344,8 @@
                                 * posix mode was not in effect.
                                 */
                                statep->ls_sbquote.indquotes = 0;
-                               Lex_state *s = statep;
-                               Lex_state *base = state_info.base;
+                               s = statep;
+                               base = state_info.base;
                                while (1) {
                                        for (; s != base; s--) {
                                                if (s->ls_state == SDQUOTE) {



Home | Main Index | Thread Index | Old Index