Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site butler.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!tektronix!uw-beaver!uw-june!entropy!dataio!butler!chinn From: chinn@butler.UUCP (David Chinn) Newsgroups: net.unix,net.unix-wizards Subject: Need help on VARARGS and RCS Message-ID: <198@butler.UUCP> Date: Mon, 14-Apr-86 19:14:11 EST Article-I.D.: butler.198 Posted: Mon Apr 14 19:14:11 1986 Date-Received: Fri, 18-Apr-86 04:25:52 EST Organization: Butler - Controls Div., Kirkland WA Lines: 44 Xref: watmath net.unix:7641 net.unix-wizards:17623 /****************/ We have a copy of RCS lying around which which I cannot get to work. It core dumps when you do a 'ci f.c'. Using dbx I have been able to determine that the coredump occurs during a routine called "diagnose", invoked as follows: diagnose("%s <-- %s", RCSfilename,workfilename); where RCSfilename and workfilename are both char *. The routine diagnose looks like: diagnose(va_alist) va_dcl { if (!quietflag) { fprintf(stderr,va_alist); putc('\n',stderr); } } It is in the file "rcslex.c", and crashes when executing the fprintf. The question is, how is this supposed to work? I found a mention of 'va_alist' under varargs, but the usage example grabs the arguments in the called routine. My problem seems to occur with va_list being passed straight through to fprintf. Do the printf family of routines have to be built special to handle varargs? Is there any way to get around this? I have no sources. Unfortunately, I am not good enough with dbx to discern what va_alist thinks it is pointing to when it is passed to fprintf. We are running ULTRIX 1.0 on a VAX-11/750. Any information or pointers would be gladly appreciated. thanks in advance ... uw-beaver david m chinn !{tikal,teltone} box 639 !dataio!butler!chinn redmond, wash 98073