Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/config Enable debug for tools.
details: https://anonhg.NetBSD.org/src/rev/c1b35eff81ef
branches: trunk
changeset: 332869:c1b35eff81ef
user: uebayasi <uebayasi%NetBSD.org@localhost>
date: Sat Oct 11 03:17:40 2014 +0000
description:
Enable debug for tools.
diffstat:
usr.bin/config/defs.h | 6 +-----
usr.bin/config/main.c | 8 ++++----
usr.bin/config/util.c | 8 +-------
3 files changed, 6 insertions(+), 16 deletions(-)
diffs (109 lines):
diff -r 5adcaf094760 -r c1b35eff81ef usr.bin/config/defs.h
--- a/usr.bin/config/defs.h Sat Oct 11 00:52:44 2014 +0000
+++ b/usr.bin/config/defs.h Sat Oct 11 03:17:40 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: defs.h,v 1.55 2014/10/10 12:10:02 uebayasi Exp $ */
+/* $NetBSD: defs.h,v 1.56 2014/10/11 03:17:40 uebayasi Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -631,15 +631,11 @@
void prefix_push(const char *);
void prefix_pop(void);
char *sourcepath(const char *);
-#ifndef MAKE_BOOTSTRAP
extern int dflag;
#define CFGDBG(n, ...) \
do { if ((dflag) >= (n)) cfgdbg(__VA_ARGS__); } while (0)
void cfgdbg(const char *, ...) /* debug info */
__printflike(1, 2);
-#else
-#define CFGDBG(n, ...) /* */
-#endif
void cfgwarn(const char *, ...) /* immediate warns */
__printflike(1, 2);
void cfgxwarn(const char *, int, const char *, ...) /* delayed warns */
diff -r 5adcaf094760 -r c1b35eff81ef usr.bin/config/main.c
--- a/usr.bin/config/main.c Sat Oct 11 00:52:44 2014 +0000
+++ b/usr.bin/config/main.c Sat Oct 11 03:17:40 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.64 2014/10/10 16:17:27 uebayasi Exp $ */
+/* $NetBSD: main.c,v 1.65 2014/10/11 03:17:40 uebayasi Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -92,8 +92,8 @@
#ifndef MAKE_BOOTSTRAP
extern int yydebug;
+#endif
int dflag;
-#endif
static struct dlhash *obsopttab;
static struct hashtab *mkopttab;
@@ -164,12 +164,12 @@
while ((ch = getopt(argc, argv, "D:LMPU:dgpvb:s:x")) != -1) {
switch (ch) {
+ case 'd':
#ifndef MAKE_BOOTSTRAP
- case 'd':
yydebug = 1;
+#endif
dflag++;
break;
-#endif
case 'M':
usekobjs = 1;
diff -r 5adcaf094760 -r c1b35eff81ef usr.bin/config/util.c
--- a/usr.bin/config/util.c Sat Oct 11 00:52:44 2014 +0000
+++ b/usr.bin/config/util.c Sat Oct 11 03:17:40 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: util.c,v 1.17 2014/10/09 06:45:31 uebayasi Exp $ */
+/* $NetBSD: util.c,v 1.18 2014/10/11 03:17:40 uebayasi Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -57,10 +57,8 @@
static void cfgvxerror(const char *, int, const char *, va_list)
__printflike(3, 0);
-#ifndef MAKE_BOOTSTRAP
static void cfgvxdbg(const char *, int, const char *, va_list)
__printflike(3, 0);
-#endif
static void cfgvxwarn(const char *, int, const char *, va_list)
__printflike(3, 0);
static void cfgvxmsg(const char *, int, const char *, const char *, va_list)
@@ -417,7 +415,6 @@
* Diagnostic messages
*/
-#ifndef MAKE_BOOTSTRAP
void
cfgdbg(const char *fmt, ...)
{
@@ -428,7 +425,6 @@
cfgvxdbg(yyfile, currentline(), fmt, ap);
va_end(ap);
}
-#endif
void
cfgwarn(const char *fmt, ...)
@@ -451,13 +447,11 @@
va_end(ap);
}
-#ifndef MAKE_BOOTSTRAP
static void
cfgvxdbg(const char *file, int line, const char *fmt, va_list ap)
{
cfgvxmsg(file, line, "debug: ", fmt, ap);
}
-#endif
static void
cfgvxwarn(const char *file, int line, const char *fmt, va_list ap)
Home |
Main Index |
Thread Index |
Old Index