| <html lang="en"> |
| <head> |
| <title>Varargs - Untitled</title> |
| <meta http-equiv="Content-Type" content="text/html"> |
| <meta name="description" content="Untitled"> |
| <meta name="generator" content="makeinfo 4.13"> |
| <link title="Top" rel="start" href="index.html#Top"> |
| <link rel="up" href="Arglists.html#Arglists" title="Arglists"> |
| <link rel="prev" href="Stdarg.html#Stdarg" title="Stdarg"> |
| <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> |
| <meta http-equiv="Content-Style-Type" content="text/css"> |
| <style type="text/css"><!-- |
| pre.display { font-family:inherit } |
| pre.format { font-family:inherit } |
| pre.smalldisplay { font-family:inherit; font-size:smaller } |
| pre.smallformat { font-family:inherit; font-size:smaller } |
| pre.smallexample { font-size:smaller } |
| pre.smalllisp { font-size:smaller } |
| span.sc { font-variant:small-caps } |
| span.roman { font-family:serif; font-weight:normal; } |
| span.sansserif { font-family:sans-serif; font-weight:normal; } |
| --></style> |
| </head> |
| <body> |
| <div class="node"> |
| <a name="Varargs"></a> |
| <p> |
| Previous: <a rel="previous" accesskey="p" href="Stdarg.html#Stdarg">Stdarg</a>, |
| Up: <a rel="up" accesskey="u" href="Arglists.html#Arglists">Arglists</a> |
| <hr> |
| </div> |
| |
| <h3 class="section">13.2 Traditional macros, <samp><span class="file">varargs.h</span></samp></h3> |
| |
| <p>If your C compiler predates ANSI C, you may still be able to use |
| variable argument lists using the macros from the <samp><span class="file">varargs.h</span></samp> |
| header file. These macros resemble their ANSI counterparts, but have |
| important differences in usage. In particular, since traditional C has |
| no declaration mechanism for variable argument lists, two additional |
| macros are provided simply for the purpose of defining functions with |
| variable argument lists. |
| |
| <p>As with <samp><span class="file">stdarg.h</span></samp>, the type <code>va_list</code> is used to hold a data |
| structure representing a variable argument list. |
| |
| <ul class="menu"> |
| <li><a accesskey="1" href="va_005falist.html#va_005falist">va_alist</a> |
| <li><a accesskey="2" href="va_005fstart_002dtrad.html#va_005fstart_002dtrad">va_start-trad</a> |
| <li><a accesskey="3" href="va_005farg_002dtrad.html#va_005farg_002dtrad">va_arg-trad</a> |
| <li><a accesskey="4" href="va_005fend_002dtrad.html#va_005fend_002dtrad">va_end-trad</a> |
| </ul> |
| |
| </body></html> |
| |