diff options
| author | Michael Kerrisk <mtk.manpages@gmail.com> | 2007-06-13 22:27:25 +0000 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2007-06-13 22:27:25 +0000 |
| commit | dded5e0c3fa0fa00f255df9b57f9d5753a5adb99 (patch) | |
| tree | 888be1869f9521fa1ce8fd7242792a3bd7741d65 /man3/stdarg.3 | |
| parent | 31a7b24e7221ee97c05eef8867b2e113e23a7160 (diff) | |
| download | man-pages-dded5e0c3fa0fa00f255df9b57f9d5753a5adb99.tar.gz | |
ffix
Diffstat (limited to 'man3/stdarg.3')
| -rw-r--r-- | man3/stdarg.3 | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/man3/stdarg.3 b/man3/stdarg.3 index f3a15228e2..e2adff6764 100644 --- a/man3/stdarg.3 +++ b/man3/stdarg.3 @@ -68,7 +68,7 @@ which is used by the macros .BR va_arg (), and .BR va_end (). -.SS va_start +.SS va_start() The .BR va_start () macro initializes @@ -88,7 +88,7 @@ Because the address of this parameter may be used in the .BR va_start () macro, it should not be declared as a register variable, or as a function or an array type. -.SS va_arg +.SS va_arg() The .BR va_arg () macro expands to an expression that has the type and value of the next @@ -131,7 +131,7 @@ is passed to a function that uses then the value of .I ap is undefined after the return of that function. -.SS va_end +.SS va_end() Each invocation of .BR va_start () must be matched by a corresponding invocation of @@ -150,7 +150,7 @@ and are possible. .BR va_end () may be a macro or a function. -.SS va_copy +.SS va_copy() .\" Proposal from clive@demon.net, 1997-02-28 An obvious implementation would have a .B va_list @@ -159,15 +159,19 @@ In such a setup (by far the most common) there seems nothing against an assignment .RS .nf + va_list aq = ap; + .fi .RE Unfortunately, there are also systems that make it an array of pointers (of length 1), and there one needs .RS .nf + va_list aq; *aq = *ap; + .fi .RE Finally, on systems where parameters are passed in registers, @@ -185,10 +189,12 @@ To accommodate this situation, C99 adds a macro so that the above assignment can be replaced by .RS .nf + va_list aq; va_copy(aq, ap); ... va_end(aq); + .fi .RE Each invocation of |
