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: convert options from ibool to bool



details:   https://anonhg.NetBSD.org/src/rev/af64cd8facdd
branches:  trunk
changeset: 987388:af64cd8facdd
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Sep 25 17:20:02 2021 +0000

description:
indent: convert options from ibool to bool

No functional change intended.

diffstat:

 usr.bin/indent/args.c         |  10 +++---
 usr.bin/indent/indent_globs.h |  56 +++++++++++++++++++++---------------------
 2 files changed, 33 insertions(+), 33 deletions(-)

diffs (156 lines):

diff -r 4c289b08a867 -r af64cd8facdd usr.bin/indent/args.c
--- a/usr.bin/indent/args.c     Sat Sep 25 17:11:23 2021 +0000
+++ b/usr.bin/indent/args.c     Sat Sep 25 17:20:02 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: args.c,v 1.25 2021/09/25 17:11:23 rillig Exp $ */
+/*     $NetBSD: args.c,v 1.26 2021/09/25 17:20:02 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.25 2021/09/25 17:11:23 rillig Exp $");
+__RCSID("$NetBSD: args.c,v 1.26 2021/09/25 17:20:02 rillig Exp $");
 #elif defined(__FreeBSD__)
 __FBSDID("$FreeBSD: head/usr.bin/indent/args.c 336318 2018-07-15 21:04:21Z pstef $");
 #endif
@@ -94,7 +94,7 @@
 #define assert_type(expr, type) (expr)
 #endif
 #define bool_option(name, value, var) \
-       {name, PRO_BOOL, value, assert_type(&(var), ibool *)}
+       {name, PRO_BOOL, value, assert_type(&(var), bool *)}
 #define int_option(name, value, var) \
        {name, PRO_INT, value, assert_type(&(var), int *)}
 #define special_option(name, value) \
@@ -312,9 +312,9 @@
 
     case PRO_BOOL:
        if (p->p_special == OFF)
-           *(ibool *)p->p_obj = false;
+           *(bool *)p->p_obj = false;
        else
-           *(ibool *)p->p_obj = true;
+           *(bool *)p->p_obj = true;
        break;
 
     case PRO_INT:
diff -r 4c289b08a867 -r af64cd8facdd usr.bin/indent/indent_globs.h
--- a/usr.bin/indent/indent_globs.h     Sat Sep 25 17:11:23 2021 +0000
+++ b/usr.bin/indent/indent_globs.h     Sat Sep 25 17:20:02 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: indent_globs.h,v 1.29 2021/09/25 17:11:23 rillig Exp $ */
+/*     $NetBSD: indent_globs.h,v 1.30 2021/09/25 17:20:02 rillig Exp $ */
 
 /*-
  * SPDX-License-Identifier: BSD-4-Clause
@@ -78,27 +78,27 @@
 
 
 extern struct options {
-    ibool      blanklines_around_conditional_compilation;
-    ibool      blanklines_after_declarations_at_proctop; /* this is vaguely
+    bool       blanklines_around_conditional_compilation;
+    bool       blanklines_after_declarations_at_proctop; /* this is vaguely
                                 * similar to blanklines_after_declarations
                                 * 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 */
-    ibool      blanklines_after_declarations;
-    ibool      blanklines_after_procs;
-    ibool      blanklines_before_blockcomments;
-    ibool      leave_comma;    /* if true, never break declarations after
+    bool       blanklines_after_declarations;
+    bool       blanklines_after_procs;
+    bool       blanklines_before_blockcomments;
+    bool       leave_comma;    /* if true, never break declarations after
                                 * commas */
-    ibool      btype_2;        /* whether brace should be on same line
+    bool       btype_2;        /* whether brace should be on same line
                                 * as if, while, etc */
-    ibool      Bill_Shannon;   /* whether a blank should always be
+    bool       Bill_Shannon;   /* whether a blank should always be
                                 * inserted after sizeof */
-    ibool      comment_delimiter_on_blankline;
+    bool       comment_delimiter_on_blankline;
     int         decl_comment_column; /* the column in which comments after
                                 * declarations should be put */
-    ibool      cuddle_else;    /* whether 'else' should cuddle up to '}' */
+    bool       cuddle_else;    /* whether 'else' should cuddle up to '}' */
     int         continuation_indent; /* set to the indentation between the
                                 * edge of code and continuation lines */
     float       case_indent;   /* The distance (measured in tabsize) to
@@ -107,52 +107,52 @@
     int         comment_column;        /* the column in which comments to the right
                                 * of code should start */
     int         decl_indent;   /* indentation of identifier in declaration */
-    ibool      ljust_decl;     /* true if declarations should be left
+    bool       ljust_decl;     /* true if declarations should be left
                                 * justified */
     int         unindent_displace; /* comments not to the right of code
                                 * will be placed this many
                                 * indentation levels to the left of
                                 * code */
-    ibool      extra_expression_indent; /* whether continuation lines from
+    bool       extra_expression_indent; /* whether continuation lines from
                                 * the expression part of "if(e)",
                                 * "while(e)", "for(e;e;e)" should be
                                 * indented an extra tab stop so that they
                                 * don't conflict with the code that follows */
-    ibool      else_if;        /* whether else-if pairs should be handled
+    bool       else_if;        /* whether else-if pairs should be handled
                                 * specially */
-    ibool      function_brace_split; /* split function declaration and
+    bool       function_brace_split; /* split function declaration and
                                 * brace onto separate lines */
-    ibool      format_col1_comments; /* If comments which start in column 1
+    bool       format_col1_comments; /* If comments which start in column 1
                                 * are to be magically reformatted (just
                                 * like comments that begin in later columns) */
-    ibool      format_block_comments; /* whether comments beginning with
+    bool       format_block_comments; /* whether comments beginning with
                                 * '/ * \n' are to be reformatted */
-    ibool      indent_parameters;
+    bool       indent_parameters;
     int         indent_size;   /* the size of one indentation level */
     int         block_comment_max_line_length;
     int         local_decl_indent; /* like decl_indent but for locals */
-    ibool      lineup_to_parens_always; /* whether to not(?) attempt to keep
+    bool       lineup_to_parens_always; /* whether to not(?) attempt to keep
                                 * lined-up code within the margin */
-    ibool      lineup_to_parens; /* whether continued code within parens
+    bool       lineup_to_parens; /* whether continued code within parens
                                 * will be lined up to the open paren */
-    ibool      proc_calls_space; /* whether procedure calls look like:
+    bool       proc_calls_space; /* whether procedure calls look like:
                                 * foo (bar) rather than foo(bar) */
-    ibool      procnames_start_line; /* whether, the names of procedures
+    bool       procnames_start_line; /* whether, the names of procedures
                                 * being defined get placed in column 1 (i.e.
                                 * a newline is placed between the type of
                                 * the procedure and its name) */
-    ibool      space_after_cast; /* "b = (int) a" vs "b = (int)a" */
-    ibool      star_comment_cont; /* whether comment continuation lines
+    bool       space_after_cast; /* "b = (int) a" vs "b = (int)a" */
+    bool       star_comment_cont; /* whether comment continuation lines
                                 * should have stars at the beginning of
                                 * each line. */
-    ibool      swallow_optional_blanklines;
-    ibool      auto_typedefs;  /* whether to recognize identifiers
+    bool       swallow_optional_blanklines;
+    bool       auto_typedefs;  /* whether to recognize identifiers
                                 * ending in "_t" like typedefs */
     int         tabsize;       /* the size of a tab */
     int         max_line_length;
-    ibool      use_tabs;       /* set true to use tabs for spacing, false
+    bool       use_tabs;       /* set true to use tabs for spacing, false
                                 * uses all spaces */
-    ibool      verbose;        /* whether non-essential error messages
+    bool       verbose;        /* whether non-essential error messages
                                 * are printed */
 } opt;
 



Home | Main Index | Thread Index | Old Index