old style C function

W

westfork

Hi all

Please can someone help me about old style C function?
The following declaration:

int foo (va_alist)
va_dcl
{
/* ... */
}

is equal to with the usual C style prototype?
Sorry for the silly question but I can't find
any link to read anything about this argument.
Best regards
westfork
 
F

Fred L. Kleinschmidt

westfork said:
Hi all

Please can someone help me about old style C function?
The following declaration:

int foo (va_alist)
va_dcl
{
/* ... */
}

is equal to with the usual C style prototype?
Sorry for the silly question but I can't find
any link to read anything about this argument.
Best regards
westfork

Google va_alist returns about 8700 hits.
 
D

Dan Pop

In said:
Please can someone help me about old style C function?
The following declaration:

int foo (va_alist)
va_dcl
{
/* ... */
}

is equal to with the usual C style prototype?

Nope. The prototype of a variadic function must contain at least one
fixed parameter before the ellipsis. This is the definition of a
variadic function using the pre-ANSI said:
Sorry for the silly question but I can't find
any link to read anything about this argument.

"man varargs" on the system this code was written for. If it's not a
Unix system, look up the documentation of the <varargs.h> header.

Dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,781
Messages
2,569,615
Members
45,302
Latest member
endevsols

Latest Threads

Top