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: rename debug_indent to debug_print...
details: https://anonhg.NetBSD.org/src/rev/179582e3551b
branches: trunk
changeset: 1029107:179582e3551b
user: rillig <rillig%NetBSD.org@localhost>
date: Tue Dec 21 21:04:08 2021 +0000
description:
lint: rename debug_indent to debug_print_indent
The previous name could be mistaken to mean "increase the indentation of
the debug output". Instead, the function prints the current indentation.
In externs1.h, the macro definition was a duplicate, the macros were
sorted differently than the functions a few lines above.
No binary change.
diffstat:
usr.bin/xlint/lint1/debug.c | 10 +++++-----
usr.bin/xlint/lint1/externs1.h | 9 ++++-----
usr.bin/xlint/lint1/init.c | 8 ++++----
3 files changed, 13 insertions(+), 14 deletions(-)
diffs (114 lines):
diff -r f33f35f79d52 -r 179582e3551b usr.bin/xlint/lint1/debug.c
--- a/usr.bin/xlint/lint1/debug.c Tue Dec 21 19:07:09 2021 +0000
+++ b/usr.bin/xlint/lint1/debug.c Tue Dec 21 21:04:08 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: debug.c,v 1.6 2021/12/20 00:10:07 rillig Exp $ */
+/* $NetBSD: debug.c,v 1.7 2021/12/21 21:04:08 rillig Exp $ */
/*-
* Copyright (c) 2021 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: debug.c,v 1.6 2021/12/20 00:10:07 rillig Exp $");
+__RCSID("$NetBSD: debug.c,v 1.7 2021/12/21 21:04:08 rillig Exp $");
#endif
#include <stdlib.h>
@@ -59,7 +59,7 @@
}
void
-debug_indent(void)
+debug_print_indent(void)
{
debug_printf("%*s", 2 * debug_indentation, "");
@@ -91,7 +91,7 @@
{
va_list va;
- debug_indent();
+ debug_print_indent();
va_start(va, fmt);
vfprintf(stdout, fmt, va);
va_end(va);
@@ -116,7 +116,7 @@
}
op = tn->tn_op;
- debug_indent();
+ debug_print_indent();
debug_printf("'%s' with type '%s'%s%s%s",
op == CVT && !tn->tn_cast ? "convert" : modtab[op].m_name,
type_name(tn->tn_type), tn->tn_lvalue ? ", lvalue" : "",
diff -r f33f35f79d52 -r 179582e3551b usr.bin/xlint/lint1/externs1.h
--- a/usr.bin/xlint/lint1/externs1.h Tue Dec 21 19:07:09 2021 +0000
+++ b/usr.bin/xlint/lint1/externs1.h Tue Dec 21 21:04:08 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: externs1.h,v 1.143 2021/12/20 19:34:01 rillig Exp $ */
+/* $NetBSD: externs1.h,v 1.144 2021/12/21 21:04:08 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -118,7 +118,7 @@
#ifdef DEBUG
void debug_node(const tnode_t *);
void debug_printf(const char *fmt, ...) __printflike(1, 2);
-void debug_indent(void);
+void debug_print_indent(void);
void debug_indent_inc(void);
void debug_indent_dec(void);
void debug_enter(const char *);
@@ -130,12 +130,11 @@
#define debug_noop() do { } while (false)
#define debug_node(tn) debug_noop()
#define debug_printf(...) debug_noop()
-#define debug_indent() debug_noop()
-#define debug_step(...) debug_noop()
-#define debug_indent() debug_noop()
+#define debug_print_indent() debug_noop()
#define debug_indent_inc() debug_noop()
#define debug_indent_dec() debug_noop()
#define debug_enter() debug_noop()
+#define debug_step(...) debug_noop()
#define debug_leave() debug_noop()
#endif
diff -r f33f35f79d52 -r 179582e3551b usr.bin/xlint/lint1/init.c
--- a/usr.bin/xlint/lint1/init.c Tue Dec 21 19:07:09 2021 +0000
+++ b/usr.bin/xlint/lint1/init.c Tue Dec 21 21:04:08 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: init.c,v 1.225 2021/12/21 16:50:11 rillig Exp $ */
+/* $NetBSD: init.c,v 1.226 2021/12/21 21:04:08 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: init.c,v 1.225 2021/12/21 16:50:11 rillig Exp $");
+__RCSID("$NetBSD: init.c,v 1.226 2021/12/21 21:04:08 rillig Exp $");
#endif
#include <stdlib.h>
@@ -436,7 +436,7 @@
if (dn->dn_len == 0)
return;
- debug_indent();
+ debug_print_indent();
debug_printf("designation: ");
for (i = 0; i < dn->dn_len; i++) {
const designator *dr = dn->dn_items + i;
@@ -680,7 +680,7 @@
i = 0;
for (bl = in->in_brace_level; bl != NULL; bl = bl->bl_enclosing) {
- debug_indent();
+ debug_print_indent();
debug_printf("brace level %zu: ", i);
brace_level_debug(bl);
i++;
Home |
Main Index |
Thread Index |
Old Index