aboutsummaryrefslogtreecommitdiffstats
path: root/man3/stdarg.3
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2007-12-19 07:19:23 +0000
committerMichael Kerrisk <mtk.manpages@gmail.com>2007-12-19 07:19:23 +0000
commita6e2f12821cc5cf9fb0edfabba3088b460990402 (patch)
tree88b0751fd5d6bb39fc37b84abc29c4b61b556953 /man3/stdarg.3
parent088a639be38030f6b6bfd344fb30636a85b207a4 (diff)
downloadman-pages-a6e2f12821cc5cf9fb0edfabba3088b460990402.tar.gz
Make the standard indent for code samples, shell session
logs, etc. to be ".in +4n".
Diffstat (limited to 'man3/stdarg.3')
-rw-r--r--man3/stdarg.328
1 files changed, 13 insertions, 15 deletions
diff --git a/man3/stdarg.3 b/man3/stdarg.3
index fd9e32a5e5..08245eb8b6 100644
--- a/man3/stdarg.3
+++ b/man3/stdarg.3
@@ -157,23 +157,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
-.RS
+.in +4n
.nf
- va_list aq = ap;
+va_list aq = ap;
.fi
-.RE
+.in
Unfortunately, there are also systems that make it an
array of pointers (of length 1), and there one needs
-.RS
+.in +4n
.nf
- va_list aq;
- *aq = *ap;
+va_list aq;
+*aq = *ap;
.fi
-.RE
+.in
Finally, on systems where parameters are passed in registers,
it may be necessary for
.BR va_start ()
@@ -187,16 +187,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
-.RS
+.in +4n
.nf
- va_list aq;
- va_copy(aq, ap);
- ...
- va_end(aq);
+va_list aq;
+va_copy(aq, ap);
+...
+va_end(aq);
.fi
-.RE
+.in
Each invocation of
.BR va_copy ()
must be matched by a corresponding invocation of
@@ -274,7 +274,6 @@ The function
.I foo
takes a string of format characters and prints out the argument associated
with each format character based on the type.
-.RS
.nf
#include <stdio.h>
@@ -308,4 +307,3 @@ foo(char *fmt, ...)
va_end(ap);
}
.fi
-.RE