Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!dayton!ems!rosevax!rosesun!dave From: dave@rosesun.Rosemount.COM (Dave Marquardt) Newsgroups: comp.lang.c Subject: using varargs function to call another varargs function Message-ID: <1332@rosevax.Rosemount.COM> Date: Mon, 29-Jun-87 16:34:46 EDT Article-I.D.: rosevax.1332 Posted: Mon Jun 29 16:34:46 1987 Date-Received: Wed, 1-Jul-87 02:45:49 EDT Sender: news@rosevax.Rosemount.COM Reply-To: dave@rosesun.Rosemount.COM (Dave Marquardt) Distribution: world Organization: Rosemount Inc., Eden Prairie, MN Lines: 25 A user came to me recently with the following problem, and since I've never written anything using varargs, I'm stumped. The user wants to pass a variable number of arguments to a function like printf, like this: #include WINDOW *window1; dprintf(a,b,s,va_alist) int a,b; char *s; va_dcl { wmove(window1, a, b); wprintw(window1, s, va_alist); } First off, can you do something like this? Secondly, I doubt that I have the syntax right. Can someone point me in the right direction? Dave Dave Marquardt dave@rosevax.Rosemount.COM