summaryrefslogtreecommitdiff
path: root/print.c
diff options
context:
space:
mode:
authortjg <tjg>1999-08-19 09:29:59 +0000
committerToby Goodwin <toby@paccrat.org>2015-05-16 21:23:16 +0100
commite9fc7b5a7c12eeb3bffbb170d7ff8a6649f93980 (patch)
treedea152164aad913ce96dad2e3416af9664e38b1c /print.c
parentda4790fcdc1b9328f201c54827d97cb3c9393fa1 (diff)
Portability: the proposed C 9x __va_copy() macro is called that, not
va_copy(), as I thought. Furthermore, it is defined to be a macro, so we don't need to use autoconf to check for it.
Diffstat (limited to 'print.c')
-rw-r--r--print.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/print.c b/print.c
index 9ccccc4..f0f7728 100644
--- a/print.c
+++ b/print.c
@@ -289,11 +289,11 @@ extern int fmtprint(Format *format, const char *fmt,...) {
va_list ap, saveargs;
va_start(ap, fmt);
- va_copy(saveargs, format->args);
- va_copy(format->args, ap);
+ __va_copy(saveargs, format->args);
+ __va_copy(format->args, ap);
n += printfmt(format, fmt);
va_end(format->args);
- va_copy(format->args, saveargs);
+ __va_copy(format->args, saveargs);
return n + format->flushed;
}
@@ -320,7 +320,7 @@ extern int fprint(int fd, const char *fmt,...) {
format.u.n = fd;
va_start(ap, fmt);
- va_copy(format.args, ap);
+ __va_copy(format.args, ap);
printfmt(&format, fmt);
va_end(format.args);
@@ -365,7 +365,7 @@ extern char *mprint(const char *fmt,...) {
format.u.n = 1;
va_start(ap, fmt);
- va_copy(format.args, ap);
+ __va_copy(format.args, ap);
result = memprint(&format, fmt, ealloc(PRINT_ALLOCSIZE), PRINT_ALLOCSIZE);
va_end(format.args);
return result;
@@ -378,7 +378,7 @@ extern char *nprint(const char *fmt,...) {
format.u.n = 0;
va_start(ap, fmt);
- va_copy(format.args, ap);
+ __va_copy(format.args, ap);
result = memprint(&format, fmt, nalloc(PRINT_ALLOCSIZE), PRINT_ALLOCSIZE);
va_end(format.args);
return result;