<varargs.h> for Turbo C ?
Steve Harrold
swh at hpcupt1.HP.COM
Sat Oct 14 02:02:39 AEST 1989
Re: <varargs.h> vs <stdarg.h>
Even though the <stdarg.h> file has definitions for "va_start", "va_arg",
and so on, these definitions are not the same as found in the <varargs.h>
file.
#include <varargs.h> #include <stdarg.h>
void va_start(argptr) ; void va_start(argptr,prevparam) ;
type va_arg(argptr,type) ; type va_arg(argptr,type) ;
void va_end(argptr) ; void va_end(argptr) ;
va_alist va_list argptr;
va_dcl
type function(va_alist) type function(param)
va_dcl /* no semicolon */ type param ;
{...code...} {...code...}
Even though the files are short, the #defines are rather convoluted,
rather reminiscent of APL style coding.
Rather than spend the time to study how stacks are created and manipulated
by the Turbo C compiler and then to produce a reliable "port" of Turbo C's
<stdarg.h> file to <varargs.h> (including the labor of creating test
cases), I've always resorted to dropping Turbo C for Microsoft C whenever
I handle source code that uses <varargs.h>.
I'm still hopeful that some kind soul will step forward with a solution.
--
---------------------
Steve Harrold swh at hpda.hp.com
...hplabs!hpda!swh
HPG200/11
(408) 447-5580
---------------------
More information about the Comp.lang.c
mailing list