Module Name:    src
Committed By:   rillig
Date:           Mon Jun  5 12:05:01 UTC 2023

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

Log Message:
indent: format own source code


To generate a diff of this commit:
cvs rdiff -u -r1.334 -r1.335 src/usr.bin/indent/indent.c
cvs rdiff -u -r1.173 -r1.174 src/usr.bin/indent/indent.h

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/indent.c
diff -u src/usr.bin/indent/indent.c:1.334 src/usr.bin/indent/indent.c:1.335
--- src/usr.bin/indent/indent.c:1.334	Mon Jun  5 12:01:33 2023
+++ src/usr.bin/indent/indent.c	Mon Jun  5 12:05:01 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: indent.c,v 1.334 2023/06/05 12:01:33 rillig Exp $	*/
+/*	$NetBSD: indent.c,v 1.335 2023/06/05 12:05:01 rillig Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-4-Clause
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: indent.c,v 1.334 2023/06/05 12:01:33 rillig Exp $");
+__RCSID("$NetBSD: indent.c,v 1.335 2023/06/05 12:05:01 rillig Exp $");
 
 #include <sys/param.h>
 #include <err.h>
@@ -413,7 +413,7 @@ process_newline(void)
 	if (ps.prev_lsym == lsym_comma
 	    && ps.nparen == 0 && !ps.block_init
 	    && !opt.break_after_comma && ps.break_after_comma
-	    && lab.len == 0 /* for preprocessing lines */
+	    && lab.len == 0	/* for preprocessing lines */
 	    && com.len == 0)
 		goto stay_in_line;
 	if (ps.s_sym[ps.tos] == psym_switch_expr && opt.brace_same_line) {
@@ -1167,7 +1167,7 @@ process_lsym(lexer_symbol lsym)
 	case lsym_funcname:
 	case lsym_return:
 		process_ident(lsym);
-	copy_token:
+copy_token:
 		if (ps.want_blank)
 			buf_add_char(&code, ' ');
 		buf_add_buf(&code, &token);

Index: src/usr.bin/indent/indent.h
diff -u src/usr.bin/indent/indent.h:1.173 src/usr.bin/indent/indent.h:1.174
--- src/usr.bin/indent/indent.h:1.173	Mon Jun  5 10:12:21 2023
+++ src/usr.bin/indent/indent.h	Mon Jun  5 12:05:01 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: indent.h,v 1.173 2023/06/05 10:12:21 rillig Exp $	*/
+/*	$NetBSD: indent.h,v 1.174 2023/06/05 12:05:01 rillig Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
@@ -89,7 +89,7 @@ typedef enum lexer_symbol {
 	lsym_colon_other,	/* bit-fields, generic-association (C11),
 				 * enum-type-specifier (C23),
 				 * attribute-prefixed-token (C23),
-				 * pp-prefixed-parameter (C23 6.10)*/
+				 * pp-prefixed-parameter (C23 6.10) */
 	lsym_comma,
 	lsym_semicolon,
 	lsym_typedef,
@@ -320,8 +320,8 @@ extern struct parser_state {
 				 * processing of braces is then slightly
 				 * different */
 	bool in_func_def_params;
-	bool seen_case;		/* whether there was a 'case' or 'default',
-				 * to properly space the following ':' */
+	bool seen_case;		/* whether there was a 'case' or 'default', to
+				 * properly space the following ':' */
 	parser_symbol spaced_expr_psym;	/* the parser symbol to be shifted
 					 * after the parenthesized expression
 					 * from a 'for', 'if', 'switch' or
@@ -374,13 +374,13 @@ extern struct parser_state {
 				 * remaining lines of the statement,
 				 * initializer or declaration */
 	enum {
-	    dp_start,		/* the beginning of a declaration */
-	    dp_word,		/* seen a type name */
-	    dp_word_asterisk,	/* seen a type name and some '*' */
-	    dp_other,
-	} decl_ptr;		/* detects declarations like 'typename *x',
-				 * to prevent the '*' from being interpreted as
-				 * a binary operator */
+		dp_start,	/* the beginning of a declaration */
+		dp_word,	/* seen a type name */
+		dp_word_asterisk,	/* seen a type name and some '*' */
+		dp_other,
+	} decl_ptr;		/* detects declarations like 'typename *x', to
+				 * prevent the '*' from being interpreted as a
+				 * binary operator */
 	paren_level_props paren[20];
 
 	/* Horizontal spacing for comments */

Reply via email to