Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/indent indent: fix space after function name for opt...



details:   https://anonhg.NetBSD.org/src/rev/1332052912bb
branches:  trunk
changeset: 1026455:1332052912bb
user:      rillig <rillig%NetBSD.org@localhost>
date:      Thu Nov 25 16:51:24 2021 +0000

description:
indent: fix space after function name for option '-pcs'

diffstat:

 tests/usr.bin/indent/opt_pcs.c |  4 ++--
 usr.bin/indent/lexi.c          |  6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r 8a70368600b5 -r 1332052912bb tests/usr.bin/indent/opt_pcs.c
--- a/tests/usr.bin/indent/opt_pcs.c    Thu Nov 25 16:41:33 2021 +0000
+++ b/tests/usr.bin/indent/opt_pcs.c    Thu Nov 25 16:51:24 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: opt_pcs.c,v 1.9 2021/11/20 11:13:18 rillig Exp $ */
+/* $NetBSD: opt_pcs.c,v 1.10 2021/11/25 16:51:24 rillig Exp $ */
 /* $FreeBSD$ */
 
 /*
@@ -48,7 +48,7 @@
 #indent end
 
 #indent run -npsl -di0 -pcs
-void (*signal(void (*handler) (int))) (int);
+void (*signal (void (*handler) (int))) (int);
 int var = (function) (arg);
 #indent end
 
diff -r 8a70368600b5 -r 1332052912bb usr.bin/indent/lexi.c
--- a/usr.bin/indent/lexi.c     Thu Nov 25 16:41:33 2021 +0000
+++ b/usr.bin/indent/lexi.c     Thu Nov 25 16:51:24 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lexi.c,v 1.156 2021/11/25 16:41:33 rillig Exp $        */
+/*     $NetBSD: lexi.c,v 1.157 2021/11/25 16:51:24 rillig Exp $        */
 
 /*-
  * SPDX-License-Identifier: BSD-4-Clause
@@ -43,7 +43,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__NetBSD__)
-__RCSID("$NetBSD: lexi.c,v 1.156 2021/11/25 16:41:33 rillig Exp $");
+__RCSID("$NetBSD: lexi.c,v 1.157 2021/11/25 16:51:24 rillig Exp $");
 #elif defined(__FreeBSD__)
 __FBSDID("$FreeBSD: head/usr.bin/indent/lexi.c 337862 2018-08-15 18:19:45Z pstef $");
 #endif
@@ -517,7 +517,7 @@
     if (inp_peek() == '(' && ps.tos <= 1 && ps.ind_level == 0 &&
        !ps.in_parameter_declaration && !ps.block_init) {
 
-       if (probably_looking_at_definition()) {
+       if (ps.p_l_follow == 0 && probably_looking_at_definition()) {
            ps.is_function_definition = true;
            if (ps.in_decl)
                ps.in_parameter_declaration = true;



Home | Main Index | Thread Index | Old Index