Module Name:    src
Committed By:   rillig
Date:           Sat May 13 13:48:54 UTC 2023

Modified Files:
        src/usr.bin/indent: args.c indent.h io.c

Log Message:
indent: improve names of option variables

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/usr.bin/indent/args.c
cvs rdiff -u -r1.125 -r1.126 src/usr.bin/indent/indent.h
cvs rdiff -u -r1.157 -r1.158 src/usr.bin/indent/io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/indent/args.c
diff -u src/usr.bin/indent/args.c:1.74 src/usr.bin/indent/args.c:1.75
--- src/usr.bin/indent/args.c:1.74	Sat May 13 06:36:33 2023
+++ src/usr.bin/indent/args.c	Sat May 13 13:48:54 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: args.c,v 1.74 2023/05/13 06:36:33 rillig Exp $	*/
+/*	$NetBSD: args.c,v 1.75 2023/05/13 13:48:54 rillig Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-4-Clause
@@ -43,7 +43,7 @@ static char sccsid[] = "@(#)args.c	8.1 (
 
 #include <sys/cdefs.h>
 #if defined(__NetBSD__)
-__RCSID("$NetBSD: args.c,v 1.74 2023/05/13 06:36:33 rillig Exp $");
+__RCSID("$NetBSD: args.c,v 1.75 2023/05/13 13:48:54 rillig Exp $");
 #elif defined(__FreeBSD__)
 __FBSDID("$FreeBSD: head/usr.bin/indent/args.c 336318 2018-07-15 21:04:21Z pstef $");
 #endif
@@ -82,8 +82,8 @@ static const struct pro {
     void *p_var;		/* the associated variable */
 } pro[] = {
     bool_options("bacc", blanklines_around_conditional_compilation),
-    bool_options("bad", blanklines_after_decl),
-    bool_options("badp", blanklines_after_decl_at_top),
+    bool_options("bad", blank_line_after_decl),
+    bool_options("badp", blank_line_after_decl_at_top),
     bool_options("bap", blanklines_after_procs),
     bool_options("bbb", blanklines_before_block_comments),
     bool_options("bc", break_after_comma),

Index: src/usr.bin/indent/indent.h
diff -u src/usr.bin/indent/indent.h:1.125 src/usr.bin/indent/indent.h:1.126
--- src/usr.bin/indent/indent.h:1.125	Sat May 13 12:31:02 2023
+++ src/usr.bin/indent/indent.h	Sat May 13 13:48:54 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: indent.h,v 1.125 2023/05/13 12:31:02 rillig Exp $	*/
+/*	$NetBSD: indent.h,v 1.126 2023/05/13 13:48:54 rillig Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
@@ -151,14 +151,14 @@ extern struct buffer com;	/* the trailin
 
 extern struct options {
     bool blanklines_around_conditional_compilation;
-    bool blanklines_after_decl_at_top;	/* this is vaguely similar to
-					 * blanklines_after_decl except that
+    bool blank_line_after_decl_at_top;	/* this is vaguely similar to
+					 * blank_line_after_decl except that
 					 * it only applies to the first set of
 					 * declarations in a procedure (just
 					 * after the first '{') and it causes
 					 * a blank line to be generated even
 					 * if there are no declarations */
-    bool blanklines_after_decl;
+    bool blank_line_after_decl;
     bool blanklines_after_procs;
     bool blanklines_before_block_comments;
     bool break_after_comma;	/* whether to break declarations after commas */

Index: src/usr.bin/indent/io.c
diff -u src/usr.bin/indent/io.c:1.157 src/usr.bin/indent/io.c:1.158
--- src/usr.bin/indent/io.c:1.157	Sat May 13 12:31:02 2023
+++ src/usr.bin/indent/io.c	Sat May 13 13:48:54 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: io.c,v 1.157 2023/05/13 12:31:02 rillig Exp $	*/
+/*	$NetBSD: io.c,v 1.158 2023/05/13 13:48:54 rillig Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-4-Clause
@@ -43,7 +43,7 @@ static char sccsid[] = "@(#)io.c	8.1 (Be
 
 #include <sys/cdefs.h>
 #if defined(__NetBSD__)
-__RCSID("$NetBSD: io.c,v 1.157 2023/05/13 12:31:02 rillig Exp $");
+__RCSID("$NetBSD: io.c,v 1.158 2023/05/13 13:48:54 rillig Exp $");
 #elif defined(__FreeBSD__)
 __FBSDID("$FreeBSD: head/usr.bin/indent/io.c 334927 2018-06-10 16:44:18Z pstef $");
 #endif
@@ -302,8 +302,7 @@ output_complete_line(char line_terminato
 
 	output_char(line_terminator);
 
-	/* TODO: rename to blank_line_after_decl */
-	if (ps.just_saw_decl == 1 && opt.blanklines_after_decl)
+	if (ps.just_saw_decl == 1 && opt.blank_line_after_decl)
 	    ps.just_saw_decl = 0;
     }
 

Reply via email to