/***************************************
*                                      *
*          俽俶俙俹俽  儊僀儞          *
*                                      *
*                                      *
***************************************/

#include <iostream>
#include <cstdlib>
#include "snaps.h"
#include "mseid.h"
#include "mcntl.h"
#include "mfile_open.h"
#include "mecon.h"
#include "mkisoritu.h"
#include "mkisosu.h"


int main()
{
	// 曄悢愰尵
	int nendo;
	int shubetu;
	
	using namespace std;
	
	// 儊僀儞儖乕僠儞
	VersionConfirm();
	cout << "start" << endl;
	cntl();
	file_open();
	cout << "file open" << endl;
	seid();
	econ();
	cout << "econ" << endl;
	zero();
	waku();
	cout << "waku" << endl;
	kaizen();
	
	for( shubetu = 1 ; shubetu <= MAX_SHUBETU - 1 ; shubetu++ )
	{
		if( PerformSiml( shubetu ) )
		{
			switch( shubetu )
			{
				case 2 :
					cout << "侾崋抝巕悇寁" << endl;
					break ;
				case 3 :
					cout << "俁崋抝巕悇寁" << endl;
					break ;
				case 5 :
					cout << "侾崋彈巕悇寁" << endl;
					break ;
				case 6 :
					cout << "俁崋彈巕悇寁" << endl;
					break ;
				default :
					cout << "巜掕奜偺shubetu僐乕僪傪専弌 shubetu偼 " << shubetu << endl;
					exit( 1 );
			}
			dtst( shubetu );
			kiso( shubetu );
			noufuritu( shubetu );
			shke( SHONENDO + 1 , shubetu );
			for( nendo = SHONENDO + 2 ; nendo <= SAISHUNENDO ; nendo++ )
			{
				siml( nendo , shubetu );
				shke( nendo , shubetu );
			}
		}
	}
	stat();
	printout();
	cout << "end" << endl;
}


int PerformSiml( int shubetu )
{
	int perform;
	
	switch( shubetu )
	{
		case 2 :
		case 3 :
		case 5 :
		case 6 :
			perform = 1;
			break ;
		default :
			perform = 0;
			break ;
	}
	return( perform );
}
