diff options
Diffstat (limited to 'man3/stdarg.3')
| -rw-r--r-- | man3/stdarg.3 | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/man3/stdarg.3 b/man3/stdarg.3 index dee35cb280..f95621e63f 100644 --- a/man3/stdarg.3 +++ b/man3/stdarg.3 @@ -176,23 +176,23 @@ An obvious implementation would have a be a pointer to the stack frame of the variadic function. In such a setup (by far the most common) there seems nothing against an assignment +.PP .in +4n -.nf - +.EX va_list aq = ap; - -.fi +.EE .in +.PP Unfortunately, there are also systems that make it an array of pointers (of length 1), and there one needs +.PP .in +4n -.nf - +.EX va_list aq; *aq = *ap; - -.fi +.EE .in +.PP Finally, on systems where arguments are passed in registers, it may be necessary for .BR va_start () @@ -206,16 +206,16 @@ can free the allocated memory again. To accommodate this situation, C99 adds a macro .BR va_copy (), so that the above assignment can be replaced by +.PP .in +4n -.nf - +.EX va_list aq; va_copy(aq, ap); \&... va_end(aq); - -.fi +.EE .in +.PP Each invocation of .BR va_copy () must be matched by a corresponding invocation of @@ -261,9 +261,9 @@ A backward-compatible version can be found in the include file .IR <varargs.h> . .PP The historic setup is: +.PP .in +4n -.nf - +.EX #include <varargs.h> void @@ -280,9 +280,9 @@ foo(va_alist) } va_end(ap); } - -.fi +.EE .in +.PP On some systems, .I va_end contains a closing \(aq}\(aq matching a \(aq{\(aq in |
