Module Name: src Committed By: rillig Date: Sat Oct 30 11:49:38 UTC 2021
Modified Files: src/usr.bin/indent: indent.h io.c Log Message: indent: inline macro label_offset No functional change. To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/usr.bin/indent/indent.h cvs rdiff -u -r1.107 -r1.108 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/indent.h diff -u src/usr.bin/indent/indent.h:1.63 src/usr.bin/indent/indent.h:1.64 --- src/usr.bin/indent/indent.h:1.63 Fri Oct 29 21:56:36 2021 +++ src/usr.bin/indent/indent.h Sat Oct 30 11:49:38 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: indent.h,v 1.63 2021/10/29 21:56:36 rillig Exp $ */ +/* $NetBSD: indent.h,v 1.64 2021/10/30 11:49:38 rillig Exp $ */ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD @@ -131,8 +131,6 @@ typedef enum stmt_head { } stmt_head; #define sc_size 5000 /* size of save_com buffer */ -#define label_offset 2 /* number of levels a label is placed to left - * of code */ /* A range of characters, in some cases null-terminated. */ Index: src/usr.bin/indent/io.c diff -u src/usr.bin/indent/io.c:1.107 src/usr.bin/indent/io.c:1.108 --- src/usr.bin/indent/io.c:1.107 Fri Oct 29 20:27:42 2021 +++ src/usr.bin/indent/io.c Sat Oct 30 11:49:38 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: io.c,v 1.107 2021/10/29 20:27:42 rillig Exp $ */ +/* $NetBSD: io.c,v 1.108 2021/10/30 11:49:38 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.107 2021/10/29 20:27:42 rillig Exp $"); +__RCSID("$NetBSD: io.c,v 1.108 2021/10/30 11:49:38 rillig Exp $"); #elif defined(__FreeBSD__) __FBSDID("$FreeBSD: head/usr.bin/indent/io.c 334927 2018-06-10 16:44:18Z pstef $"); #endif @@ -340,7 +340,7 @@ compute_label_indent(void) return (int)(case_ind * (float)opt.indent_size); if (lab.s[0] == '#') return 0; - return opt.indent_size * (ps.ind_level - label_offset); + return opt.indent_size * (ps.ind_level - 2); } static void