Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!sdd.hp.com!hp-pcd!hpcvia!brianh From: brianh@hpcvia.CV.HP.COM (brian_helterline) Newsgroups: comp.lang.c Subject: Re: my_printf calling printf Message-ID: <31530036@hpcvia.CV.HP.COM> Date: 27 Feb 91 16:31:31 GMT References: <1991Feb26.101626.21779@fwi.uva.nl> Organization: Hewlett-Packard Co., Corvallis, Oregon Lines: 16 jik@athena.mit.edu (Jonathan I. Kamens) writes: >In article <1991Feb26.101626.21779@fwi.uva.nl>, caspers@fwi.uva.nl (B.M. Caspers (I)) writes: >|> I need to write a function that calls the win_printf of the DESQview API C >|> library, which in its turn (I think) calls printf. Since I don't want to do >|> any argument processing that printf should do, can I give the format string and the rest of the arguments unchanged to [win_]printf? > > Is there a win_vprintf? If so, that's what you're going to have to use. If >not, you're in trouble. Not necesarily, you're only in trouble if you don't have vsprintf() since you can use that to create a single char array argument and pass that to win_printf. Of course, figuring out how large of a char array is needed is not always obvious. > > See the section entitled "Variable-Length Argument Lists" in the monthly >Frequently Asked Questions posting to this newsgroup. If it isn't around at >your site, E-mail me and I'll send it to you.