Module Name: src Committed By: rillig Date: Thu May 18 08:09:28 UTC 2023
Modified Files: src/tests/usr.bin/indent: opt_pcs.c src/usr.bin/indent: indent.h Log Message: indent: document the funcname token To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/tests/usr.bin/indent/opt_pcs.c cvs rdiff -u -r1.149 -r1.150 src/usr.bin/indent/indent.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/tests/usr.bin/indent/opt_pcs.c diff -u src/tests/usr.bin/indent/opt_pcs.c:1.15 src/tests/usr.bin/indent/opt_pcs.c:1.16 --- src/tests/usr.bin/indent/opt_pcs.c:1.15 Mon May 15 20:50:37 2023 +++ src/tests/usr.bin/indent/opt_pcs.c Thu May 18 08:09:28 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: opt_pcs.c,v 1.15 2023/05/15 20:50:37 rillig Exp $ */ +/* $NetBSD: opt_pcs.c,v 1.16 2023/05/18 08:09:28 rillig Exp $ */ /* * Tests for the options '-pcs' and '-npcs'. @@ -110,3 +110,16 @@ int sizeof_expr = sizeof 0; int offset = offsetof(struct s, member); int offset = offsetof(struct s, member); //indent end + + +//indent input +int unary = +call(); +int binary = 1 + call(); +//indent end + +//indent run-equals-input -npcs -di0 + +//indent run -pcs -di0 +int unary = +call (); +int binary = 1 + call (); +//indent end Index: src/usr.bin/indent/indent.h diff -u src/usr.bin/indent/indent.h:1.149 src/usr.bin/indent/indent.h:1.150 --- src/usr.bin/indent/indent.h:1.149 Thu May 18 06:01:39 2023 +++ src/usr.bin/indent/indent.h Thu May 18 08:09:28 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: indent.h,v 1.149 2023/05/18 06:01:39 rillig Exp $ */ +/* $NetBSD: indent.h,v 1.150 2023/05/18 08:09:28 rillig Exp $ */ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD @@ -94,7 +94,7 @@ typedef enum lexer_symbol { lsym_sizeof, lsym_offsetof, lsym_word, /* identifier, constant or string */ - lsym_funcname, + lsym_funcname, /* name of a function being defined */ lsym_do, lsym_else, lsym_for,