diff options
author | phk <phk@FreeBSD.org> | 1996-01-15 22:41:03 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1996-01-15 22:41:03 +0000 |
commit | c3e6222aa59d814018c016139a893ede0ef0d03d (patch) | |
tree | 211438af77a23891624f21f01f20a5620899f56d /sys/i386 | |
parent | cec94deabe34b585be7b0d70cbe9cc117a949334 (diff) | |
download | FreeBSD-src-c3e6222aa59d814018c016139a893ede0ef0d03d.zip FreeBSD-src-c3e6222aa59d814018c016139a893ede0ef0d03d.tar.gz |
Get rid of two and a half printf in the kernel.
Add more features to the one remaining to handle the job:
+ signed quantity.
# alternate format
- left padding
* read width as next arg.
n numeric in (argument specified) default radix.
Fix the DDB debugger to use these.
Use vprintf in debug routine in pcvt.
The warnings from gcc may become more wrong and intolerable because
of this.
Warning: I have not checked the entire source for unsupported or
changed constructs, but generally belive that there are only a few.
Suggested by: bde
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/i386/db_disasm.c | 8 | ||||
-rw-r--r-- | sys/i386/isa/pcvt/pcvt_drv.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/i386/i386/db_disasm.c b/sys/i386/i386/db_disasm.c index 690600f..cf60221 100644 --- a/sys/i386/i386/db_disasm.c +++ b/sys/i386/i386/db_disasm.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_disasm.c,v 1.11 1995/10/30 17:13:25 bde Exp $ + * $Id: db_disasm.c,v 1.12 1995/12/07 12:45:29 davidg Exp $ */ /* @@ -1310,7 +1310,7 @@ db_disasm(loc, altfmt) case Is: len = db_lengths[size]; get_value_inc(imm, loc, len, TRUE); /* signed */ - db_printf("$%#r", imm); + db_printf("$%+#n", imm); break; case Ib: @@ -1320,7 +1320,7 @@ db_disasm(loc, altfmt) case Ibs: get_value_inc(imm, loc, 1, TRUE); /* signed */ - db_printf("$%#r", imm); + db_printf("$%+#n", imm); break; case Iw: @@ -1341,7 +1341,7 @@ db_disasm(loc, altfmt) get_value_inc(displ, loc, 4, TRUE); } if (seg) - db_printf("%s:%#r",seg, displ); + db_printf("%s:%+#n",seg, displ); else db_printsym((db_addr_t)displ, DB_STGY_ANY); break; diff --git a/sys/i386/isa/pcvt/pcvt_drv.c b/sys/i386/isa/pcvt/pcvt_drv.c index bee2269..b23b9cc 100644 --- a/sys/i386/isa/pcvt/pcvt_drv.c +++ b/sys/i386/isa/pcvt/pcvt_drv.c @@ -1327,7 +1327,7 @@ dprintf(unsigned flgs, const char *fmt, ...) { __color = ffs(flgs&__debug)+1; va_start(ap,fmt); - kprintf(fmt, 1, (struct tty *)0, ap); + vprintf(fmt, ap); va_end(ap); if (flgs & DPAUSE || nrow%24 == 23) |