From 91933a41184cd816cb8ce4d96cf8764ebd7dde8c Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Sun, 23 Jul 2000 00:34:12 +0000 Subject: 2000-07-04 Marcus Brinkmann * debian/changelog: Add entry for new Debian upload. * linux/dev/drivers/scsi/seagate.c (WRITE_CONTROL, WRITE_DATA): Added from linux 2.2.15. (__asm__ constructs): Replace with equivalent C code from linux 2.2.15 to support gcc-2.95. * linux/src/drivers/scsi/in2000.h: Update asm code to linux 2.2.15. * linux/src/drivers/scsi/ppa.c: Replace asm code with equivalent C code from linux 2.2.15. 2000-02-06 Stefan Weil * device/subrs.c: Fixed compiler warning. * ddb/db_output.c, kern/bootstrap.c, kern/debug.c, kern/printf.c: Replaced varargs.h by stdarg.h. Fixed prototypes (const char *fmt). * ddb/db_output.h: Use prototype for db_printf. * i386/Files: removed varargs.h. * i386/i386/pit.h: Fixed compiler warning. * i386/i386at/model_dep.c: Tried to fix compiler warning. * i386/include/mach/sa/sys/varargs.h: Removed. * i386/linux/Makefile.in: Removed delay.S, added delay.c. * linux/dev/include/asm-i386/segment.h: Support gcc-2.95. * linux/dev/include/asm-i386/string.h, linux/src/include/asm-i386/string.h: Update from linux-2.2.14. * linux/dev/lib/vsprintf.c: Fixed compiler warning. * linux/src/include/asm-i386/delay.h: Update from linux-2.2.14. * linux/src/arch/i386/lib/delay.c: Copy from linux-2.2.14. * linux/src/include/asm-i386/string.h: Update from linux-2.2.14. --- kern/printf.c | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) (limited to 'kern/printf.c') diff --git a/kern/printf.c b/kern/printf.c index 693c660..85e6278 100644 --- a/kern/printf.c +++ b/kern/printf.c @@ -115,7 +115,7 @@ #include #include #include -#include +#include #define isdigit(d) ((d) >= '0' && (d) <= '9') #define Ctod(c) ((c) - '0') @@ -161,7 +161,7 @@ void printf_init() } void _doprnt( - register char *fmt, + register const char *fmt, va_list *argp, /* character output routine */ void (*putc)( char, vm_offset_t), @@ -509,20 +509,16 @@ void _doprnt( */ extern void cnputc( char, /*not really*/vm_offset_t); -void vprintf(fmt, listp) - char * fmt; - va_list listp; +void vprintf(const char *fmt, va_list listp) { _doprnt(fmt, &listp, cnputc, 16, 0); } /*VARARGS1*/ -void printf(fmt, va_alist) - char * fmt; - va_dcl +void printf(const char *fmt, ...) { va_list listp; - va_start(listp); + va_start(listp, fmt); vprintf(fmt, listp); va_end(listp); } @@ -533,9 +529,7 @@ int indent = 0; * Printing (to console) with indentation. */ /*VARARGS1*/ -void iprintf(fmt, va_alist) - char * fmt; - va_dcl +void iprintf(const char *fmt, ...) { va_list listp; register int i; @@ -550,7 +544,7 @@ void iprintf(fmt, va_alist) i--; } } - va_start(listp); + va_start(listp, fmt); _doprnt(fmt, &listp, cnputc, 16, 0); va_end(listp); } @@ -572,15 +566,12 @@ sputc( } int -sprintf( buf, fmt, va_alist) - char *buf; - char *fmt; - va_dcl +sprintf(char *buf, const char *fmt, ...) { va_list listp; char *start = buf; - va_start(listp); + va_start(listp, fmt); _doprnt(fmt, &listp, sputc, 16, (vm_offset_t)&buf); va_end(listp); -- cgit v1.2.3