Module Name: src
Committed By: rillig
Date: Tue May 16 12:46:43 UTC 2023
Modified Files:
src/usr.bin/indent: .indent.pro debug.c lexi.c parse.c
Log Message:
indent: allow comments in column 1 to be formatted
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/indent/.indent.pro
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/indent/debug.c
cvs rdiff -u -r1.195 -r1.196 src/usr.bin/indent/lexi.c
cvs rdiff -u -r1.58 -r1.59 src/usr.bin/indent/parse.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/.indent.pro
diff -u src/usr.bin/indent/.indent.pro:1.5 src/usr.bin/indent/.indent.pro:1.6
--- src/usr.bin/indent/.indent.pro:1.5 Mon May 15 20:35:56 2023
+++ src/usr.bin/indent/.indent.pro Tue May 16 12:46:43 2023
@@ -1,9 +1,8 @@
-/* $NetBSD: .indent.pro,v 1.5 2023/05/15 20:35:56 rillig Exp $ */
+/* $NetBSD: .indent.pro,v 1.6 2023/05/16 12:46:43 rillig Exp $ */
-l78 /* Keep 2 columns distance from the 80-column margin. */
-di0 /* Do not indent variable names in global declarations. */
-eei /* Indent expressions in 'if' and 'while' once more. */
--nfc1 /* Do not format CVS Id comments. */
-i4 /* Indent by 4 spaces, for traditional reasons. */
-ldi0 /* Do not indent variable names in local declarations. */
-nlp /* Do not indent function arguments. */
Index: src/usr.bin/indent/debug.c
diff -u src/usr.bin/indent/debug.c:1.10 src/usr.bin/indent/debug.c:1.11
--- src/usr.bin/indent/debug.c:1.10 Tue May 16 11:32:01 2023
+++ src/usr.bin/indent/debug.c Tue May 16 12:46:43 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: debug.c,v 1.10 2023/05/16 11:32:01 rillig Exp $ */
+/* $NetBSD: debug.c,v 1.11 2023/05/16 12:46:43 rillig Exp $ */
/*-
* Copyright (c) 2023 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: debug.c,v 1.10 2023/05/16 11:32:01 rillig Exp $");
+__RCSID("$NetBSD: debug.c,v 1.11 2023/05/16 12:46:43 rillig Exp $");
#include <stdarg.h>
@@ -38,7 +38,7 @@ __RCSID("$NetBSD: debug.c,v 1.10 2023/05
#ifdef debug
-/*
+/*-
* false show only the changes to the parser state
* true show unchanged parts of the parser state as well
*/
Index: src/usr.bin/indent/lexi.c
diff -u src/usr.bin/indent/lexi.c:1.195 src/usr.bin/indent/lexi.c:1.196
--- src/usr.bin/indent/lexi.c:1.195 Tue May 16 11:32:01 2023
+++ src/usr.bin/indent/lexi.c Tue May 16 12:46:43 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: lexi.c,v 1.195 2023/05/16 11:32:01 rillig Exp $ */
+/* $NetBSD: lexi.c,v 1.196 2023/05/16 12:46:43 rillig Exp $ */
/*-
* SPDX-License-Identifier: BSD-4-Clause
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: lexi.c,v 1.195 2023/05/16 11:32:01 rillig Exp $");
+__RCSID("$NetBSD: lexi.c,v 1.196 2023/05/16 12:46:43 rillig Exp $");
#include <stdlib.h>
#include <string.h>
@@ -103,7 +103,7 @@ static struct {
unsigned int cap;
} typenames;
-/*
+/*-
* The transition table below was rewritten by hand from lx's output, given
* the following definitions. lx is Katherine Flavel's lexer generator.
*
Index: src/usr.bin/indent/parse.c
diff -u src/usr.bin/indent/parse.c:1.58 src/usr.bin/indent/parse.c:1.59
--- src/usr.bin/indent/parse.c:1.58 Mon May 15 20:12:28 2023
+++ src/usr.bin/indent/parse.c Tue May 16 12:46:43 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.58 2023/05/15 20:12:28 rillig Exp $ */
+/* $NetBSD: parse.c,v 1.59 2023/05/16 12:46:43 rillig Exp $ */
/*-
* SPDX-License-Identifier: BSD-4-Clause
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: parse.c,v 1.58 2023/05/15 20:12:28 rillig Exp $");
+__RCSID("$NetBSD: parse.c,v 1.59 2023/05/16 12:46:43 rillig Exp $");
#include <err.h>
@@ -241,8 +241,8 @@ reduce_stmt(void)
}
/*
- * Repeatedly try to reduce the top two symbols on the parse stack to a
- * single symbol, until no more reductions are possible.
+ * Repeatedly try to reduce the top two symbols on the parse stack to a single
+ * symbol, until no more reductions are possible.
*/
static void
reduce(void)