summaryrefslogtreecommitdiffstats
path: root/sys/ddb/db_output.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1996-09-14 11:54:59 +0000
committerbde <bde@FreeBSD.org>1996-09-14 11:54:59 +0000
commite9c09cbb61cf1ec2a7dde2a67bb5b7fb424f74b1 (patch)
tree18a346f0507b3682a9326439c18fbbcff2bdc2fe /sys/ddb/db_output.c
parentbe288921b45d5073bb512818920532b5d6380788 (diff)
downloadFreeBSD-src-e9c09cbb61cf1ec2a7dde2a67bb5b7fb424f74b1.zip
FreeBSD-src-e9c09cbb61cf1ec2a7dde2a67bb5b7fb424f74b1.tar.gz
Attached vm ddb commands `show map', `show vmochk', `show object',
`show vmopag', `show page' and `show pageq'. Moved all vm ddb stuff to the ends of the vm source files. Changed printf() to db_printf(), `indent' to db_indent, and iprintf() to db_iprintf() in ddb commands. Moved db_indent and db_iprintf() from vm to ddb. vm_page.c: Don't use __pure. Staticized. db_output.c: Reduced page width from 80 to 79 to inhibit double spacing for long lines (there are still some problems if words are printed across column 79).
Diffstat (limited to 'sys/ddb/db_output.c')
-rw-r--r--sys/ddb/db_output.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/sys/ddb/db_output.c b/sys/ddb/db_output.c
index fd12dd8..61ccfe8 100644
--- a/sys/ddb/db_output.c
+++ b/sys/ddb/db_output.c
@@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: db_output.c,v 1.17 1996/01/23 21:17:59 phk Exp $
+ * $Id: db_output.c,v 1.18 1996/05/08 04:28:35 gpalmer Exp $
*/
/*
@@ -61,7 +61,7 @@ static int db_last_non_space = 0; /* last non-space character */
int db_tab_stop_width = 8; /* how wide are tab stops? */
#define NEXT_TAB(i) \
((((i) + db_tab_stop_width) / db_tab_stop_width) * db_tab_stop_width)
-int db_max_width = 80; /* output line width */
+int db_max_width = 79; /* output line width */
static void db_putchar __P((int c, void *arg));
@@ -154,6 +154,24 @@ void
db_printf(const char *fmt, ...)
{
va_list listp;
+
+ va_start(listp, fmt);
+ kvprintf (fmt, db_putchar, NULL, db_radix, listp);
+ va_end(listp);
+}
+
+int db_indent;
+
+void
+db_iprintf(const char *fmt,...)
+{
+ register int i;
+ va_list listp;
+
+ for (i = db_indent; i >= 8; i -= 8)
+ db_printf("\t");
+ while (--i >= 0)
+ db_printf(" ");
va_start(listp, fmt);
kvprintf (fmt, db_putchar, NULL, db_radix, listp);
va_end(listp);
@@ -168,4 +186,3 @@ db_end_line()
if (db_output_position >= db_max_width)
db_printf("\n");
}
-
OpenPOWER on IntegriCloud