/*
 *	Network Queueing System (NQS)
 *  This version of NQS is Copyright (C) 1992  John Roman
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 1, or (at your option)
 *  any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
/*
*  PROJECT:     Network Queueing System
*  AUTHOR:      John Roman
*
*  Modification history:
*
*       Version Who     When            Description
*       -------+-------+---------------+-------------------------
*       V01.10  JRR                     Initial version.
*       V01.2   JRR     03-Mar-1992	Modified to run at Monsanto.
*	V01.3	JRR	17-Jun-1992	Add header.
*/
/*++ qstat.c - Network Queueing System
 *
 * $Source: /usr2/jrroma/nqs-3.21/src/RCS/qcmplx.c,v $
 *
 * DESCRIPTION:
 *
 *	Display queue status information.
 *	This program must run as a setuid program.
 *
 *	qstat, qwatch, and qcomplex are very similiar commands
 *	the real difference between these commands are the 
 *	target item.  Qstat targets the queues.  Qwatch 
 *	targets the requests and qcomplex targets the complexes.
 *
 *	Since the method of arriving at the target displays are
 *	the same they share the same major sections of code.
 *	The arguments and target is passed onto main_dsp().
 *	This is ease in maintainability and readability.
 *
 *	The shared code may be found in lib/main_dsp.  Each
 *	set of code that is specific to queues, requests, and
 *	complexs may be found in queues.c, requests.c and complexes.c
 *	
 *	At one time a single binary with links for qstat, qwatch, and
 *	qcomplex was thought about.  We felt that this may constrain the
 *	code at some time in the future.  It was also felt that it may
 *	be more confusing to find the source code if it was the first
 *	time one had dove into the source.
 *					Terrie A. Carver  
 *					Computer Science Corperation
 *					Version 2.0 
 *					November 3, 1989
 */

#include <stdio.h>
#include "nqs.h"
int DEBUG;                              /* Debug flag for interactive pgms. */

/*** main
 *
 *
 *	qcmplx -Q
 */
main (argc, argv)
int argc;
char *argv[];
{
	long flags=0;
	char * selector=NULL;
	char * tname=NULL;
 	char * hname=NULL;
	int	i;

	/* step 1. parse the command line */
	flags = parse_args(&argc, argv,"nT:h:Q",&selector,
		&tname,&hname);

	flags |= SHO_CMPLX;


	/* step 4. display the information */
	main_dsp(argc,argv,flags,selector,tname,hname);
	printf("\n");

}

