- case decl: /* scanned a declaration word */
- ps.search_brace = btype_2;
- /* indicate that following brace should be on same line */
- if (ps.p_stack[ps.tos] != decl) { /* only put one declaration onto
- * stack */
- break_comma = true; /* while in declaration, newline
- * should be forced after comma */
- ps.p_stack[++ps.tos] = decl;
- ps.il[ps.tos] = ps.i_l_follow;
-
- if (ps.ljust_decl) { /* only do if we want left
- * justified declarations */
- ps.ind_level = 0;
- for (i = ps.tos - 1; i > 0; --i)
- if (ps.p_stack[i] == decl)
- ++ps.ind_level; /* indentation is number
- * of declaration levels
- * deep we are */
- ps.i_l_follow = ps.ind_level;
- }
- }
- break;
-
- case ifstmt: /* scanned if (...) */
- if (ps.p_stack[ps.tos] == elsehead && ps.else_if) /* "else if ..." */
- ps.i_l_follow = ps.il[ps.tos];
- case dolit: /* 'do' */
- case forstmt: /* for (...) */
- ps.p_stack[++ps.tos] = tk;
- ps.il[ps.tos] = ps.ind_level = ps.i_l_follow;
- ++ps.i_l_follow; /* subsequent statements should be
- * indented 1 */
- ps.search_brace = btype_2;
- break;
-
- case lbrace: /* scanned { */
- break_comma = false;/* don't break comma in an initial list */
- if (ps.p_stack[ps.tos] == stmt || ps.p_stack[ps.tos] == decl
- || ps.p_stack[ps.tos] == stmtl)
- ++ps.i_l_follow; /* it is a random, isolated stmt group or
- * a declaration */
- else {
- if (s_code == e_code) {
- /* only do this if there is nothing on the line */
- --ps.ind_level;
- /* it is a group as part of a while, for, etc. */
- if (ps.p_stack[ps.tos] == swstmt && ps.case_indent)
- --ps.ind_level;
- /*
- * for a switch, brace should be two levels out from
- * the code
- */
- }
- }
-
- ps.p_stack[++ps.tos] = lbrace;
- ps.il[ps.tos] = ps.ind_level;
- ps.p_stack[++ps.tos] = stmt;
- /* allow null stmt between braces */
+ case decl: /* scanned a declaration word */
+ ps.search_brace = btype_2;
+ /* indicate that following brace should be on same line */
+ if (ps.p_stack[ps.tos] != decl) { /* only put one declaration
+ * onto stack */
+ break_comma = true; /* while in declaration, newline should be
+ * forced after comma */
+ ps.p_stack[++ps.tos] = decl;