Hi everyone --

In mg's cmode.c getindent() it looks like there's a contp
variable that gets initialized and we set it back and forth
between FALSE and TRUE a few times. But we never actually do
anything with it. This diff removes it.

OK?

~Brian

Index: cmode.c
===================================================================
RCS file: /cvs/src/usr.bin/mg/cmode.c,v
retrieving revision 1.11
diff -u -p -r1.11 cmode.c
--- cmode.c     2 Jan 2015 11:43:15 -0000       1.11
+++ cmode.c     13 Jan 2015 05:14:53 -0000
@@ -225,7 +225,6 @@ getindent(const struct line *lp, int *cu
        int nparen = 0;         /* paren count */
        int obrace = 0;         /* open brace count */
        int cbrace = 0;         /* close brace count */
-       int contp = FALSE;      /* Continue? */
        int firstnwsp = FALSE;  /* First nonspace encountered? */
        int colonp = FALSE;     /* Did we see a colon? */
        int questionp = FALSE;  /* Did we see a question mark? */
@@ -260,7 +259,6 @@ getindent(const struct line *lp, int *cu
                c = lgetc(lp, co);
                /* We have a non-whitespace char */
                if (!firstnwsp && !isspace(c)) {
-                       contp = TRUE;
                        if (c == '#')
                                cppp = TRUE;
                        firstnwsp = TRUE; 
@@ -283,7 +281,6 @@ getindent(const struct line *lp, int *cu
                } else if (c == '{') {
                        obrace++;
                        firstnwsp = FALSE;
-                       contp = FALSE;
                } else if (c == '}') {
                        cbrace++;
                } else if (c == '?') {
@@ -292,9 +289,6 @@ getindent(const struct line *lp, int *cu
                        /* ignore (foo ? bar : baz) construct */
                        if (!questionp)
                                colonp = TRUE;
-               } else if (c == ';') {
-                       if (nparen > 0)
-                               contp = FALSE;
                } else if (c == '/') {
                        /* first nonwhitespace? -> indent */
                        if (firstnwsp) {

Reply via email to