--- Gnu-Mach/ddb/db_output.c 2020/09/02 04:36:57 1.1 +++ Gnu-Mach/ddb/db_output.c 2020/09/02 04:45:46 1.1.1.3 @@ -1,25 +1,25 @@ -/* +/* * Mach Operating System * Copyright (c) 1991,1990 Carnegie Mellon University * All Rights Reserved. - * + * * Permission to use, copy, modify and distribute this software and its * documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. - * + * * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * + * * Carnegie Mellon requests users of this software to return to - * + * * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 - * + * * any improvements or extensions that they make and grant Carnegie Mellon * the rights to redistribute these changes. */ @@ -28,16 +28,18 @@ * Date: 7/90 */ -#include "mach_kdb.h" #if MACH_KDB /* * Printf and character output for debugger. */ +#include +#include #include -#include #include +#include +#include #include #include @@ -57,7 +59,7 @@ #ifndef DB_MAX_LINE #define DB_MAX_LINE 24 /* maximum line */ #define DB_MAX_WIDTH 80 /* maximum width */ -#endif DB_MAX_LINE +#endif /* DB_MAX_LINE */ #define DB_MIN_MAX_WIDTH 20 /* minimum max width */ #define DB_MIN_MAX_LINE 3 /* minimum max line */ @@ -78,7 +80,7 @@ extern void db_check_interrupt(); * Force pending whitespace. */ void -db_force_whitespace() +db_force_whitespace(void) { register int last_print, next_tab; @@ -188,7 +190,7 @@ db_id_putc(char c, vm_offset_t dummy) * Return output position */ int -db_print_position() +db_print_position(void) { return (db_output_position); } @@ -196,30 +198,23 @@ db_print_position() /* * End line if too long. */ -void db_end_line() +void db_end_line(void) { if (db_output_position >= db_max_width-1) db_printf("\n"); } -/* - * Printing - */ -extern void _doprnt(); - /*VARARGS1*/ void -db_printf( fmt, va_alist) - char * fmt; - va_dcl +db_printf(const char *fmt, ...) { va_list listp; #ifdef db_printf_enter db_printf_enter(); /* optional multiP serialization */ #endif - va_start(listp); - _doprnt(fmt, &listp, db_id_putc, db_radix, 0); + va_start(listp, fmt); + _doprnt(fmt, listp, db_id_putc, db_radix, 0); va_end(listp); } @@ -227,14 +222,12 @@ db_printf( fmt, va_alist) /*VARARGS1*/ void -kdbprintf(fmt, va_alist) - char * fmt; - va_dcl +kdbprintf(const char *fmt, ...) { va_list listp; - va_start(listp); - _doprnt(fmt, &listp, db_id_putc, db_radix, 0); + va_start(listp, fmt); + _doprnt(fmt, listp, db_id_putc, db_radix, 0); va_end(listp); } -#endif MACH_KDB +#endif /* MACH_KDB */