Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/xlint/lint1 lint: fix spacing and line breaks in deb...
details: https://anonhg.NetBSD.org/src/rev/75b6f2f04755
branches: trunk
changeset: 366435:75b6f2f04755
user: rillig <rillig%NetBSD.org@localhost>
date: Thu May 26 16:45:25 2022 +0000
description:
lint: fix spacing and line breaks in debug logging
The spacing between function arguments in a declaration info was too
big, it was the indentation level instead of a single space.
The function debug_sym is used for two purposes: own-line and in-line,
which coincidentally are distinguished by whether the suffix string is
"\n".
diffstat:
usr.bin/xlint/lint1/debug.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r 17a685387883 -r 75b6f2f04755 usr.bin/xlint/lint1/debug.c
--- a/usr.bin/xlint/lint1/debug.c Thu May 26 15:23:33 2022 +0000
+++ b/usr.bin/xlint/lint1/debug.c Thu May 26 16:45:25 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: debug.c,v 1.20 2022/05/26 12:04:56 rillig Exp $ */
+/* $NetBSD: debug.c,v 1.21 2022/05/26 16:45:25 rillig Exp $ */
/*-
* Copyright (c) 2021 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID)
-__RCSID("$NetBSD: debug.c,v 1.20 2022/05/26 12:04:56 rillig Exp $");
+__RCSID("$NetBSD: debug.c,v 1.21 2022/05/26 16:45:25 rillig Exp $");
#endif
#include <stdlib.h>
@@ -264,7 +264,8 @@
debug_sym(const char *prefix, const sym_t *sym, const char *suffix)
{
- debug_print_indent();
+ if (suffix[0] == '\n')
+ debug_print_indent();
debug_printf("%s%s", prefix, sym->s_name);
if (sym->s_type != NULL)
debug_printf(" type='%s'", type_name(sym->s_type));
Home |
Main Index |
Thread Index |
Old Index