diff options
| author | Bruce Evans <bde@FreeBSD.org> | 2004-02-09 12:52:15 +0000 |
|---|---|---|
| committer | Bruce Evans <bde@FreeBSD.org> | 2004-02-09 12:52:15 +0000 |
| commit | 43a3abfd1e13d2fff6973966ad714b2606cc010a (patch) | |
| tree | 70f512c548614355061981f7989bb44dfabf6681 | |
| parent | a4d2c25de56bcfd64b536873aaa3669fd6d20530 (diff) | |
Notes
| -rw-r--r-- | usr.bin/indent/lexi.c | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/usr.bin/indent/lexi.c b/usr.bin/indent/lexi.c index c716bc8c6486..beceabdacc91 100644 --- a/usr.bin/indent/lexi.c +++ b/usr.bin/indent/lexi.c @@ -64,7 +64,7 @@ struct templ { int rwcode; }; -struct templ specials[1000] = +struct templ specials[100] = { {"switch", 1}, {"case", 2}, @@ -94,8 +94,6 @@ struct templ specials[1000] = {"else", 6}, {"do", 6}, {"sizeof", 7}, - {"const", 9}, - {"volatile", 9}, {0, 0} }; @@ -274,28 +272,17 @@ lexi(void) case 3: /* a "struct" */ if (ps.p_l_follow) - break; /* inside parens: cast */ - /* - * Next time around, we may want to know that we have had a - * 'struct' - */ + break; /* inside parens: cast */ l_struct = true; /* - * Fall through to test for a cast, function prototype or - * sizeof(). + * Next time around, we will want to know that we have had a + * 'struct' */ case 4: /* one of the declaration keywords */ if (ps.p_l_follow) { ps.cast_mask |= 1 << ps.p_l_follow; - - /* - * Forget that we saw `struct' if we're in a sizeof(). - */ - if (ps.sizeof_mask) - l_struct = false; - - break; /* inside parens: cast, prototype or sizeof() */ + break; /* inside parens: cast */ } last_code = decl; return (decl); |
