From: Todd C. Miller Date: Thu, 10 Mar 2005 14:51:48 +0000 (+0000) Subject: make this build in K&R land X-Git-Tag: SUDO_1_7_0~682 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f35ff3e327d3d322a135841b7fc006b50f5313c1;p=sudo make this build in K&R land --- diff --git a/parse.c b/parse.c index 33176bb6b..203f4e3f5 100644 --- a/parse.c +++ b/parse.c @@ -473,7 +473,15 @@ get_ttycols() * at the end of an arg. */ static void +#ifdef __STDC__ print_wrap(int indent, int lc, int nargs, ...) +#else +print_wrap(indent, lc, nargs, va_alist) + int indent; + int lc; + int nargs; + va_dcl +#endif { static int left, cols = -1; int i, n, len; @@ -483,7 +491,11 @@ print_wrap(int indent, int lc, int nargs, ...) if (cols == -1) left = cols = get_ttycols(); +#ifdef __STDC__ va_start(ap, nargs); +#else + va_start(ap); +#endif for (len = 0, i = 1; i <= nargs; i++) { s = va_arg(ap, char *); if ((n = strlen(s)) > 0) @@ -499,7 +511,11 @@ print_wrap(int indent, int lc, int nargs, ...) putchar(' '); left = cols - indent; } +#ifdef __STDC__ va_start(ap, nargs); +#else + va_start(ap); +#endif for (i = 1; i <= nargs; i++) { s = va_arg(ap, char *); if ((len = strlen(s)) > 0) {