Module Name:    src
Committed By:   rillig
Date:           Thu Nov 25 16:51:24 UTC 2021

Modified Files:
        src/tests/usr.bin/indent: opt_pcs.c
        src/usr.bin/indent: lexi.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/tests/usr.bin/indent/opt_pcs.c
cvs rdiff -u -r1.156 -r1.157 src/usr.bin/indent/lexi.c

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.9 src/tests/usr.bin/indent/opt_pcs.c:1.10
--- src/tests/usr.bin/indent/opt_pcs.c:1.9	Sat Nov 20 11:13:18 2021
+++ src/tests/usr.bin/indent/opt_pcs.c	Thu Nov 25 16:51:24 2021
@@ -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 @@ int var = (function)(arg);
 #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
 

Index: src/usr.bin/indent/lexi.c
diff -u src/usr.bin/indent/lexi.c:1.156 src/usr.bin/indent/lexi.c:1.157
--- src/usr.bin/indent/lexi.c:1.156	Thu Nov 25 16:41:33 2021
+++ src/usr.bin/indent/lexi.c	Thu Nov 25 16:51:24 2021
@@ -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 @@ static char sccsid[] = "@(#)lexi.c	8.1 (
 
 #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 @@ found_typename:
     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;

Reply via email to