Module Name: src
Committed By: hauke
Date: Sun Jan 23 17:15:16 UTC 2011
Modified Files:
src/bin/ksh: lex.c
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/bin/ksh/lex.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/bin/ksh/lex.c
diff -u src/bin/ksh/lex.c:1.13 src/bin/ksh/lex.c:1.14
--- src/bin/ksh/lex.c:1.13 Mon Oct 27 19:52:28 2008
+++ src/bin/ksh/lex.c Sun Jan 23 17:15:15 2011
@@ -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) {