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: do not discard former error comments ...



details:   https://anonhg.NetBSD.org/src/rev/8e02b29669b1
branches:  trunk
changeset: 1024786:8e02b29669b1
user:      rillig <rillig%NetBSD.org@localhost>
date:      Thu Nov 04 19:23:57 2021 +0000

description:
indent: do not discard former error comments anymore

Since io.c 1.20 from 2019-10-19, indent has not placed error comments in
the code anymore. Since these comments are supposed to be cleaned up
immediately, there is no point in having code for handling them.

diffstat:

 usr.bin/indent/io.c |  12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diffs (33 lines):

diff -r ee620a9b5dd0 -r 8e02b29669b1 usr.bin/indent/io.c
--- a/usr.bin/indent/io.c       Thu Nov 04 18:38:37 2021 +0000
+++ b/usr.bin/indent/io.c       Thu Nov 04 19:23:57 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: io.c,v 1.113 2021/11/04 17:10:37 rillig Exp $  */
+/*     $NetBSD: io.c,v 1.114 2021/11/04 19:23:57 rillig Exp $  */
 
 /*-
  * SPDX-License-Identifier: BSD-4-Clause
@@ -43,7 +43,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__NetBSD__)
-__RCSID("$NetBSD: io.c,v 1.113 2021/11/04 17:10:37 rillig Exp $");
+__RCSID("$NetBSD: io.c,v 1.114 2021/11/04 19:23:57 rillig Exp $");
 #elif defined(__FreeBSD__)
 __FBSDID("$FreeBSD: head/usr.bin/indent/io.c 334927 2018-06-10 16:44:18Z pstef $");
 #endif
@@ -450,12 +450,8 @@
     inp.s = inp.buf;
     inp.e = p;
 
-    if (p - inp.s >= 3 && p[-3] == '*' && p[-2] == '/') {
-       if (strncmp(inp.s, "/**INDENT**", 11) == 0)
-           inbuf_read_line();  /* flush indent error message */
-       else
-           parse_indent_comment();
-    }
+    if (p - inp.s >= 3 && p[-3] == '*' && p[-2] == '/')
+       parse_indent_comment();
 
     if (inhibit_formatting)
        output_range(inp.s, inp.e);



Home | Main Index | Thread Index | Old Index