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: allow comments in column 1 to be form...



details:   https://anonhg.NetBSD.org/src/rev/8b44ab2988d4
branches:  trunk
changeset: 375840:8b44ab2988d4
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue May 16 12:46:43 2023 +0000

description:
indent: allow comments in column 1 to be formatted

diffstat:

 usr.bin/indent/.indent.pro |  3 +--
 usr.bin/indent/debug.c     |  6 +++---
 usr.bin/indent/lexi.c      |  6 +++---
 usr.bin/indent/parse.c     |  8 ++++----
 4 files changed, 11 insertions(+), 12 deletions(-)

diffs (97 lines):

diff -r 927b160628b8 -r 8b44ab2988d4 usr.bin/indent/.indent.pro
--- a/usr.bin/indent/.indent.pro        Tue May 16 11:32:01 2023 +0000
+++ b/usr.bin/indent/.indent.pro        Tue May 16 12:46:43 2023 +0000
@@ -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. */
diff -r 927b160628b8 -r 8b44ab2988d4 usr.bin/indent/debug.c
--- a/usr.bin/indent/debug.c    Tue May 16 11:32:01 2023 +0000
+++ b/usr.bin/indent/debug.c    Tue May 16 12:46:43 2023 +0000
@@ -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 @@
 
 #ifdef debug
 
-/*
+/*-
  * false       show only the changes to the parser state
  * true                show unchanged parts of the parser state as well
  */
diff -r 927b160628b8 -r 8b44ab2988d4 usr.bin/indent/lexi.c
--- a/usr.bin/indent/lexi.c     Tue May 16 11:32:01 2023 +0000
+++ b/usr.bin/indent/lexi.c     Tue May 16 12:46:43 2023 +0000
@@ -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.
  *
diff -r 927b160628b8 -r 8b44ab2988d4 usr.bin/indent/parse.c
--- a/usr.bin/indent/parse.c    Tue May 16 11:32:01 2023 +0000
+++ b/usr.bin/indent/parse.c    Tue May 16 12:46:43 2023 +0000
@@ -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)



Home | Main Index | Thread Index | Old Index