#include "peg_pic.h"


/* initialize param. and create I/O file names */

void innam(int iargc, char *pargv[]) {
	int i;

	if( !strncmp(pargv[1], "tools", 5) || !strncmp(pargv[1], "-t", 2) ) {
		/* user requested tools....*/
		if( iargc == 2 ) {
			/* just tools was given as parameter; display usage */
			usage(1, iargc, pargv, 0);
		} else if( iargc > 2 ){
			/* let's see what we got after tools....*/
			if( !strncmp(pargv[2],"approx",6) ) {
				/* approximation */
//				toolsApprox(iargv, pargv);
			} else if( !strncmp(pargv[2],"times",5) ) {
				/* show running times */
//				toolsTimes(iargv, pargv);
			} else {
				/* unknown tools; display tools help */
				usage(1, iargc, pargv, 0);
			}
		}
		
	}

	
	if (iargc < 2 ) {
		/* no parameters given; display usage */
		usage(0, iargc, pargv, 0);
	}

		
	tstep =0;
	hist_hi =0;
	thist_hi =0;
	vxscale =1.;
	start_step_for_dump = 0;


	/** criating name of directory with atomic data **/

	i= strlen(pargv[0]) - 4;           /* size of "BIT1" is 4 */
	strncpy(dargv3, pargv[0], i);
	strcat(dargv3, "atdata/");

	if( iargc == 4 ) {
		/* there is step defined in input parameters
		 * this step defines step at which dump file (given by previous parameter) was written
		 * The purpose of this parameter is that dump and other files are written in sequence with
		 * current files
		 */
		start_step_for_dump = atoi(pargv[3]);
	}
	
	
	
} /* End of INNAM */

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