Does anybody have a fix for Arnold Robbins CXREF ?

Kevin Szabo ksbszabo at watvlsi.UUCP
Sat Jan 25 06:29:37 AEST 1986


CXREF, distributed a year or so ago, doesn't like very long strings.
It doesn't core dump but the output gets severely mangled.

Anybody got a fix?  If not I'll dig into it myself, but I would prefer
not to.  I  have already corresponded with Arnold;  he hasn't worked
on CXREF for a while.


					Kevin Szabo

An example of the problem --
:::::::::::::::::::::::: test.c ::::::::::::::::::::::::::
#include	"include.h"
#ifdef system3
#define	index	strchr
#endif

static	char	*optarg;	/* Global argument pointer. */
static	int	optind = 0;	/* Global argv index. */


ParseCommandLine( argc, argv )
	int argc;
	char *argv[];
{
	int	c;

	/*  Non default invocation	*/
	while(( c = getopt( argc, argv, "gvXx:" )) != EOF ){
		switch( c ) {
		case 'g':
		case 'v':
			printf( "%s: version = %0.2f\n", argv[0], VERSION );
			break;
		case 'x':			/* Trace settings */
			DEBUG_PUSH( optarg );
			break;
		case 'X':
			break;
		case '?':
		default:
			Usage();
			exit(1);
			break;
		}
	}
}

static
Usage()
{
	printf("Usage: symple [-vgX] [-x <debug opts>].\n\
	-v Prints the version of symple.\n\
	-g Forces symple to prompt for graphical output terminal.\n\
	-X Turns on very verbose debugging info (not for you).\n\
	-x <args> passes args to the debugger (not for you either).\n");
	return;
}

getopt(argc, argv, optstring)
int argc;
char *argv[];
char *optstring;
{
}
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

The cxref output (abbreviated) looks like:

	C Cross Reference Listing of test.c

'v'                 	test.c        	20
'x'                 	test.c        	23
"%s: version = %0.2f	test.c        	21you either).\n"
you either).\n"
you either).\n"
0                   	test.c        	7, 21
1                   	test.c        	31
-- 
Kevin Szabo'  ihnp4!watmath!watvlsi!ksbszabo  (VLSI Group,U of Waterloo,Ont,Can)



More information about the Comp.lang.c mailing list