Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!pasteur!ucbvax!decwrl!sun!pitstop!sundc!seismo!uunet!mcvax!ukc!etive!hwcs!zen!vic From: vic@zen.UUCP (Victor Gavin) Newsgroups: comp.lang.c Subject: varargs and scanf Keywords: vfprintf, ANSI C,... Message-ID: <1494@zen.UUCP> Date: 27 Jan 89 18:33:31 GMT Organization: Zengrange Limited, Leeds, England Lines: 28 I have recently had a problem in using ANSI C prototypes and vararg functions. The function I was creating required two obligatory parameters and the rest were optional. The function was declared void foo(va_alist) My problem was that to catch any mistakes in programs which call it I used the prototype extern void foo(int,int,...); This prototype is included by the file that contains the function and so the compiler keeps complaining about type mis-matches on parameter one. I can understand this but I'd like to know if there is some way of explaining to the compiler (MS C v5.1, warnings level 3) that I don't want an error message coz the code is kosher. My other problem is that there isn't a varargs version of scanf(). Is there one in ANSI C or is it something that only I would find useful? vic -- Victor Gavin Zengrange Limited vic@zen.co.uk Greenfield Road ..!mcvax!ukc!zen.co.uk!vic Leeds LS9 8DB +44 532 489048 England