Trouble with cxref(1)

Leo Pinard leo at aai.uu.net
Sun Feb 11 16:39:37 AEST 1990


In article <2019 at cjsa.WA.COM> jeff at cjsa.WA.COM (Jeffery Small) writes:
>I have been unable to get cxref(1) to work.  I am attempting to run this on
>a set of program files which compile and lint clean.  I have tried all manner
>of invocations with no improvement so I am tossing this out for comments.
>
>Now, on a Sun-3/60 (4.0.3 OS) using either /bin/cxref of /usr/5bin/cxref,
>I get the following message:
>
>    SWITCH ERROR IN TMPSCAN: inafunct = no
>
>and cxref aborts.  Does anyone have any idea what I am doing wrong or what
>problems I should be looking for?

I posted a question about this recently and got an answer for the Sun, at
least.  Jim Litchfield sent me the answer (Thanks, Jim!).  It's a bug in cpp
that can be worked around by running cpp separately, and then cxref.  I use the
following script:

#! /bin/csh
foreach name (*.c)
/usr/lib/cpp -Dunix -Dsun -Dsparc $name >${name:r}.cref.c
end
cxref -cst -o rpe.cref *.cref.c 
foreach name (*.cref.c)
\rm $name
end

To find out what options to pass the compiler, do a cc -dryrun.  The bug is
supposedly fixed in 4.1.

Leo Pinard  leo at aai.uu.net



More information about the Comp.unix.questions mailing list