Module Name: src Committed By: rillig Date: Tue Oct 19 21:39:19 UTC 2021
Modified Files: src/usr.bin/indent: io.c Log Message: indent: always keep next_blank_lines >= 0 No functional change. To generate a diff of this commit: cvs rdiff -u -r1.96 -r1.97 src/usr.bin/indent/io.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/io.c diff -u src/usr.bin/indent/io.c:1.96 src/usr.bin/indent/io.c:1.97 --- src/usr.bin/indent/io.c:1.96 Tue Oct 19 21:21:07 2021 +++ src/usr.bin/indent/io.c Tue Oct 19 21:39:19 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: io.c,v 1.96 2021/10/19 21:21:07 rillig Exp $ */ +/* $NetBSD: io.c,v 1.97 2021/10/19 21:39:19 rillig Exp $ */ /*- * SPDX-License-Identifier: BSD-4-Clause @@ -43,7 +43,7 @@ static char sccsid[] = "@(#)io.c 8.1 (Be #include <sys/cdefs.h> #if defined(__NetBSD__) -__RCSID("$NetBSD: io.c,v 1.96 2021/10/19 21:21:07 rillig Exp $"); +__RCSID("$NetBSD: io.c,v 1.97 2021/10/19 21:39:19 rillig Exp $"); #elif defined(__FreeBSD__) __FBSDID("$FreeBSD: head/usr.bin/indent/io.c 334927 2018-06-10 16:44:18Z pstef $"); #endif @@ -235,9 +235,8 @@ dump_line(void) } } - while (--next_blank_lines >= 0) + for (; next_blank_lines > 0; next_blank_lines--) output_char('\n'); - next_blank_lines = 0; if (ps.ind_level == 0) ps.ind_stmt = false; /* this is a class A kludge. don't do