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: rename option variable to be more exp...



details:   https://anonhg.NetBSD.org/src/rev/8b6a7765e3df
branches:  trunk
changeset: 987393:8b6a7765e3df
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Sep 25 18:49:03 2021 +0000

description:
indent: rename option variable to be more expressive

No functional change.

diffstat:

 usr.bin/indent/args.c         |  8 ++++----
 usr.bin/indent/indent.c       |  6 +++---
 usr.bin/indent/indent_globs.h |  4 ++--
 3 files changed, 9 insertions(+), 9 deletions(-)

diffs (81 lines):

diff -r 505b7248bbd1 -r 8b6a7765e3df usr.bin/indent/args.c
--- a/usr.bin/indent/args.c     Sat Sep 25 18:02:48 2021 +0000
+++ b/usr.bin/indent/args.c     Sat Sep 25 18:49:03 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: args.c,v 1.26 2021/09/25 17:20:02 rillig Exp $ */
+/*     $NetBSD: args.c,v 1.27 2021/09/25 18:49:03 rillig Exp $ */
 
 /*-
  * SPDX-License-Identifier: BSD-4-Clause
@@ -43,7 +43,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__NetBSD__)
-__RCSID("$NetBSD: args.c,v 1.26 2021/09/25 17:20:02 rillig Exp $");
+__RCSID("$NetBSD: args.c,v 1.27 2021/09/25 18:49:03 rillig Exp $");
 #elif defined(__FreeBSD__)
 __FBSDID("$FreeBSD: head/usr.bin/indent/args.c 336318 2018-07-15 21:04:21Z pstef $");
 #endif
@@ -123,7 +123,7 @@
     bool_option("bc", OFF, opt.leave_comma),
     bool_option("bl", OFF, opt.btype_2),
     bool_option("br", ON, opt.btype_2),
-    bool_option("bs", ON, opt.Bill_Shannon),
+    bool_option("bs", ON, opt.blank_after_sizeof),
     bool_option("cdb", ON, opt.comment_delimiter_on_blankline),
     int_option("cd", 0, opt.decl_comment_column),
     bool_option("ce", ON, opt.cuddle_else),
@@ -152,7 +152,7 @@
     bool_option("nbap", OFF, opt.blanklines_after_procs),
     bool_option("nbbb", OFF, opt.blanklines_before_blockcomments),
     bool_option("nbc", ON, opt.leave_comma),
-    bool_option("nbs", OFF, opt.Bill_Shannon),
+    bool_option("nbs", OFF, opt.blank_after_sizeof),
     bool_option("ncdb", OFF, opt.comment_delimiter_on_blankline),
     bool_option("nce", OFF, opt.cuddle_else),
     bool_option("ncs", OFF, opt.space_after_cast),
diff -r 505b7248bbd1 -r 8b6a7765e3df usr.bin/indent/indent.c
--- a/usr.bin/indent/indent.c   Sat Sep 25 18:02:48 2021 +0000
+++ b/usr.bin/indent/indent.c   Sat Sep 25 18:49:03 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: indent.c,v 1.75 2021/09/25 17:36:51 rillig Exp $       */
+/*     $NetBSD: indent.c,v 1.76 2021/09/25 18:49:03 rillig Exp $       */
 
 /*-
  * SPDX-License-Identifier: BSD-4-Clause
@@ -43,7 +43,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__NetBSD__)
-__RCSID("$NetBSD: indent.c,v 1.75 2021/09/25 17:36:51 rillig Exp $");
+__RCSID("$NetBSD: indent.c,v 1.76 2021/09/25 18:49:03 rillig Exp $");
 #elif defined(__FreeBSD__)
 __FBSDID("$FreeBSD: head/usr.bin/indent/indent.c 340138 2018-11-04 19:24:49Z oshogbo $");
 #endif
@@ -594,7 +594,7 @@
     } else if (ps.want_blank &&
            ((ps.last_token != ident && ps.last_token != funcname) ||
            opt.proc_calls_space ||
-           (ps.keyword == rw_sizeof ? opt.Bill_Shannon :
+           (ps.keyword == rw_sizeof ? opt.blank_after_sizeof :
            ps.keyword != rw_0 && ps.keyword != rw_offsetof)))
        *code.e++ = ' ';
     ps.want_blank = false;
diff -r 505b7248bbd1 -r 8b6a7765e3df usr.bin/indent/indent_globs.h
--- a/usr.bin/indent/indent_globs.h     Sat Sep 25 18:02:48 2021 +0000
+++ b/usr.bin/indent/indent_globs.h     Sat Sep 25 18:49:03 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: indent_globs.h,v 1.32 2021/09/25 17:36:51 rillig Exp $ */
+/*     $NetBSD: indent_globs.h,v 1.33 2021/09/25 18:49:03 rillig Exp $ */
 
 /*-
  * SPDX-License-Identifier: BSD-4-Clause
@@ -93,7 +93,7 @@
                                 * commas */
     bool       btype_2;        /* whether brace should be on same line
                                 * as if, while, etc */
-    bool       Bill_Shannon;   /* whether a blank should always be
+    bool       blank_after_sizeof; /* whether a blank should always be
                                 * inserted after sizeof */
     bool       comment_delimiter_on_blankline;
     int         decl_comment_column; /* the column in which comments after



Home | Main Index | Thread Index | Old Index