diff options
| author | rillig <rillig@NetBSD.org> | 2023-06-26 20:10:23 +0000 |
|---|---|---|
| committer | rillig <rillig@NetBSD.org> | 2023-06-26 20:10:23 +0000 |
| commit | ba6601884f017d8b3236a70f5c60db24e917fafb (patch) | |
| tree | 38232079bfcbc1d7a654323842f352ef52ffe161 /usr.bin | |
| parent | 4742c517f8e3fcb9a3265d2d2f8abdd325e0bdee (diff) | |
indent: improve heuristics for '*' as a pointer type
Diffstat (limited to 'usr.bin')
| -rw-r--r-- | usr.bin/indent/lexi.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/indent/lexi.c b/usr.bin/indent/lexi.c index 6f79b7bd5a4..824252e523f 100644 --- a/usr.bin/indent/lexi.c +++ b/usr.bin/indent/lexi.c @@ -1,4 +1,4 @@ -/* $NetBSD: lexi.c,v 1.237 2023/06/26 10:23:59 rillig Exp $ */ +/* $NetBSD: lexi.c,v 1.238 2023/06/26 20:10:23 rillig Exp $ */ /*- * SPDX-License-Identifier: BSD-4-Clause @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: lexi.c,v 1.237 2023/06/26 10:23:59 rillig Exp $"); +__RCSID("$NetBSD: lexi.c,v 1.238 2023/06/26 20:10:23 rillig Exp $"); #include <stdlib.h> #include <string.h> @@ -401,7 +401,8 @@ lexi_alnum(void) inp_p++; ps.next_unary = ps.prev_lsym == lsym_tag - || ps.prev_lsym == lsym_typedef; + || ps.prev_lsym == lsym_typedef + || (ps.prev_lsym == lsym_modifier && *inp_p == '*'); if (ps.prev_lsym == lsym_tag && ps.paren.len == 0) return lsym_type; |
