int
main (int argc, char *argv [])
{	int	k ;

	print_version () ;

	if (argc < 2 || strcmp (argv [1], "--help") == 0 || strcmp (argv [1], "-h") == 0)
	{	
		return 1 ;
	} ;

	if (strcmp (argv [1], "--instrument") == 0)
	{	int error = 0 ;

		for (k = 2 ; k < argc ; k++)
			error += instrument_dump (argv [k]) ;
		return error ;
		} ;

	if (strcmp (argv [1], "--broadcast") == 0)
	{	int error = 0 ;

		for (k = 2 ; k < argc ; k++)
			error += broadcast_dump (argv [k]) ;
		return error ;
		} ;

	if (strcmp (argv [1], "--channel-map") == 0)
	{	int error = 0 ;

		for (k = 2 ; k < argc ; k++)
			error += chanmap_dump (argv [k]) ;
		return error ;
		} ;

	if (strcmp (argv [1], "--cart") == 0)
	{	int error = 0 ;

		for (k = 2 ; k < argc ; k++)
			error += cart_dump (argv [k]) ;
		return error ;
		} ;

	for (k = 1 ; k < argc ; k++)
		info_dump (argv [k]) ;

	if (argc > 2)
		total_dump () ;

	return 0 ;
} /* main */
Example #2
0
int
main (int argc, char *argv [])
{	int	k ;

	print_version () ;

	if (argc < 2 || strcmp (argv [1], "--help") == 0 || strcmp (argv [1], "-h") == 0)
	{	usage_exit (program_name (argv [0])) ;
		return 1 ;
		} ;

	if (strcmp (argv [1], "-i") == 0)
	{	int error = 0 ;

		for (k = 2 ; k < argc ; k++)
			error += instrument_dump (argv [k]) ;
		return error ;
		} ;

	if (strcmp (argv [1], "-b") == 0)
	{	int error = 0 ;

		for (k = 2 ; k < argc ; k++)
			error += broadcast_dump (argv [k]) ;
		return error ;
		} ;

	if (strcmp (argv [1], "-c") == 0)
	{	int error = 0 ;

		for (k = 2 ; k < argc ; k++)
			error += chanmap_dump (argv [k]) ;
		return error ;
		} ;

	for (k = 1 ; k < argc ; k++)
		info_dump (argv [k]) ;

	if (argc > 2)
		total_dump () ;

	return 0 ;
} /* main */