Path: utzoo!attcan!uunet!van-bc!jtc From: jtc@van-bc.wimsey.bc.ca (J.T. Conklin) Newsgroups: comp.lang.c Subject: Re: ANSI C prototypes Message-ID: <2978@van-bc.wimsey.bc.ca> Date: 30 Oct 90 15:40:58 GMT References: <1005@christopher-robin.cs.bham.ac.uk> Organization: UniFax Communications Inc., Vancouver, B.C., Canada Lines: 32 In article <1005@christopher-robin.cs.bham.ac.uk> ptf@uk.ac.bham.cs (Paul Flinders ) writes: > >This works fine _except_ for varargs functions eg. > >in foo.h: > extern void ddprintf(const char *fmt, ...); > >BUT in foo.c: > > void ddprintf(va_alist) > va_dcl; You seem to be using the old style interface which is not compatible with prototypes. Try something like #include void ddprintf(const char *fmt, ...) { va_list args; va_start(args, fmt); vfprintf(stderr, fmt, args); va_end(args); } --jtc -- J.T. Conklin UniFax Communications Inc. ...!{uunet,ubc-cs}!van-bc!jtc, jtc@wimsey.bc.ca