Need help on VARARGS and RCS

David Chinn chinn at butler.UUCP
Tue Apr 15 10:14:11 AEST 1986


/****************/

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



More information about the Comp.unix.wizards mailing list