/* This file is part of Cloudy and is copyright (C)1978-2006 by Gary J. Ferland
 * For conditions of distribution and use see copyright notice in license.txt */
/*input_init initial input_readarray array for storing line images at start of calculation */
#include "cddefines.h"
#include "input.h"

void input_init(void)
{

#	ifdef DEBUG_FUN
	fputs( "<+>input_init()\n", debug_fp );
#	endif

	/* this sub must be called before calling READAR to get line images
	 * it simply sets the pointer to set up reading the images
	 * */
	if( input.iReadWay > 0 )
	{
		/* this is usual case, read from the start of array, the commands */
		input.nRead = -1;
	}
	else if( input.iReadWay < 0 )
	{
		/* this is special case where we read from end of array, the ini file */
		/* save the current counter so we can reset it when done */
		input.nReadSv = input.nRead;

		/* and set current counter to the bottom of the stack */
		input.nRead = NKRD;
	}


#	ifdef DEBUG_FUN
	fputs( " <->input_init()\n", debug_fp );
#	endif
	return;
}

