Grabbing "n" arguments in a function

Network administrator peter at brontolo.sublink.ORG
Sun Apr 29 07:55:37 AEST 1990

In article <297 at ndla.UUCP>, platt at ndla.UUCP (Daniel E. Platt) writes:
] In article <559 at dplace.UUCP>, djl at dplace.UUCP (Dave Lampe) writes:
] > rick at tmiuv0.uucp writes:
] > 
] > >What's the most portable way for a function to receive an arbitrary list of
] > >arguments?  The function must receive "n" arguments, all of which are char.
] > >pointers:
] > 
] > >    char *weirdfunc(char *arg1, char *arg2, ... char *argn) {
] > 
] ...In your case 
] you'ld continue popping the things from the stack until you got a NULL.

Dan's method to get arguments from the function's stack is very usefull,
and is worth ok on every OS and C compiler I have tried, exept for the
DEC's RISC one.

Does anybody out there know how to do the same variable argument call
(WITHOUT "varargs", please! [it doesn't work, too!!!!!]) under MIPS
RISC workstation (or DEC's one) ?????????
Thank you

Peter Komanns ************- SINDATA srl -*****************
Via Rovereto 17            | BANG ..!rutgers!deejay!yachaya!brontolo!peter
20059 Vimercate MI ITALY   | SUBLINK peter at brontolo
(voice) +39-39-6083733       (fax)   +39-39-6083957 

More information about the Comp.lang.c mailing list