about summary refs log tree commit diff
path: root/Src/lex.c
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-04-15 18:11:42 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-04-15 18:11:42 +0000
commit20d67907c95265356b51dbdce8ecc0c1ede9e66b (patch)
tree69b0777db02f96555b3a0587cd630025062a7f09 /Src/lex.c
parent2a5a899a55fd2bce10efd01c75a4bec5285aa46c (diff)
downloadzsh-20d67907c95265356b51dbdce8ecc0c1ede9e66b.tar.gz
zsh-20d67907c95265356b51dbdce8ecc0c1ede9e66b.tar.xz
zsh-20d67907c95265356b51dbdce8ecc0c1ede9e66b.zip
zsh-3.1.5-pws-5 zsh-3.1.5-pws-5
Diffstat (limited to 'Src/lex.c')
-rw-r--r--Src/lex.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/Src/lex.c b/Src/lex.c
index 6f4f2dd20..b08dfed5b 100644
--- a/Src/lex.c
+++ b/Src/lex.c
@@ -457,11 +457,11 @@ add(int c)
 
 #define SETPARBEGIN {if (zleparse && !(inbufflags & INP_ALIAS) && cs >= ll+1-inbufct) parbegin = inbufct;}
 #define SETPAREND {\
-	    if (zleparse && !(inbufflags & INP_ALIAS) && parbegin != -1 && parend == -1)\
+	    if (zleparse && !(inbufflags & INP_ALIAS) && parbegin != -1 && parend == -1) {\
 		if (cs >= ll + 1 - inbufct)\
 		    parbegin = -1;\
 		else\
-		    parend = inbufct;}
+		    parend = inbufct;} }
 
 static int
 cmd_or_math(int cs_type)
@@ -823,20 +823,22 @@ gettokstr(int c, int sub)
 	case LX2_OUTPAR:
 	    if ((sub || in_brace_param) && isset(SHGLOB))
 		break;
-	    if (!in_brace_param && !pct--)
+	    if (!in_brace_param && !pct--) {
 		if (sub) {
 		    pct = 0;
 		    break;
 		} else
 		    goto brk;
+	    }
 	    c = Outpar;
 	    break;
 	case LX2_BAR:
-	    if (!pct && !in_brace_param)
+	    if (!pct && !in_brace_param) {
 		if (sub)
 		    break;
 		else
 		    goto brk;
+	    }
 	    if (unset(SHGLOB) || (!sub && !in_brace_param))
 		c = Bar;
 	    break;
@@ -912,8 +914,9 @@ gettokstr(int c, int sub)
 		    *bptr = '\0';
 		    return STRING;
 		}
-		if (in_brace_param)
+		if (in_brace_param) {
 		    cmdpush(CS_BRACE);
+		}
 		bct++;
 	    }
 	    break;
@@ -922,8 +925,9 @@ gettokstr(int c, int sub)
 		break;
 	    if (!bct)
 		break;
-	    if (in_brace_param)
+	    if (in_brace_param) {
 		cmdpop();
+	    }
 	    if (bct-- == in_brace_param)
 		in_brace_param = 0;
 	    c = Outbrace;
@@ -933,11 +937,12 @@ gettokstr(int c, int sub)
 		c = Comma;
 	    break;
 	case LX2_OUTANG:
-	    if (!intpos)
+	    if (!intpos) {
 		if (in_brace_param || sub)
 		    break;
 		else
 		    goto brk;
+	    }
 	    e = hgetc();
 	    if (e != '(') {
 		hungetc(e);
@@ -1101,11 +1106,12 @@ gettokstr(int c, int sub)
 			break;
 		    }
 		    add(c);
-		    if (c == '\'')
+		    if (c == '\'') {
 			if ((inquote = !inquote))
 			    STOPHIST
 			else
 			    ALLOWHIST
+		    }
 		}
 	    if (inquote)
 		ALLOWHIST
@@ -1260,8 +1266,9 @@ dquote_parse(char endchar, int sub)
     }
     if (intick == 2)
 	ALLOWHIST
-    if (intick)
+    if (intick) {
 	cmdpop();
+    }
     while (bct--)
 	cmdpop();
     if (lexstop)