From 9c8e5b9217ae1cb7160c9cacea4b341158c8579d Mon Sep 17 00:00:00 2001 From: ceriel Date: Fri, 30 Sep 1988 09:36:26 +0000 Subject: [PATCH] corrected a bit --- modules/src/print/fprint.c | 2 +- modules/src/print/print.3 | 20 ++++++++++++++------ modules/src/print/print.c | 2 +- modules/src/print/sprint.c | 2 +- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/modules/src/print/fprint.c b/modules/src/print/fprint.c index 51d472fdb..027cec170 100644 --- a/modules/src/print/fprint.c +++ b/modules/src/print/fprint.c @@ -8,7 +8,7 @@ #include #include "param.h" -/*VARARGS1*/ +/*VARARGS*/ fprint(va_alist) va_dcl { diff --git a/modules/src/print/print.3 b/modules/src/print/print.3 index fe6e57a0e..d79430a7a 100644 --- a/modules/src/print/print.3 +++ b/modules/src/print/print.3 @@ -100,12 +100,20 @@ to be defined as follows: .br .RS .nf -/*VARARGS1*/ -print(fmt, argv) - char *fmt; - int argv; +#include +#include + +/*VARARGS*/ +print(va_alist) + va_dcl { - doprnt(STDOUT, fmt, &argv); + char *fmt; + va_list args; + + va_start(args); + fmt = va_arg(args, char *); + doprnt(STDOUT, fmt, args); + va_end(args); } .fi .RE @@ -123,4 +131,4 @@ The maximum length of the string to be printed is 1024 characters. .SH SEE ALSO printf(3) .SH AUTHOR -Erik Baalbergen +Erik Baalbergen diff --git a/modules/src/print/print.c b/modules/src/print/print.c index 44c969e2a..b92c7427b 100644 --- a/modules/src/print/print.c +++ b/modules/src/print/print.c @@ -8,7 +8,7 @@ #include #include "param.h" -/*VARARGS1*/ +/*VARARGS*/ print(va_alist) va_dcl { diff --git a/modules/src/print/sprint.c b/modules/src/print/sprint.c index 4bee99b57..51f708eb3 100644 --- a/modules/src/print/sprint.c +++ b/modules/src/print/sprint.c @@ -8,7 +8,7 @@ #include #include "param.h" -/*VARARGS1*/ +/*VARARGS*/ char * sprint(va_alist) va_dcl