/* DIVIDE_START=exit.c */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <winb.h>
#include <te.h>
#include <fntb.h>
#include <gui.h>

#include	"var.h"

/*	initDataEXIT:DButton_EXIT[0]:MJ_DBUTTONL40の呼び出し関数	*/
int	CATLOGExit_OK()
{
	if ( OutSoundMes == YES ) {
		MMI_SendMessage( Alert_EXIT , MM_VISUALEFFECT , 1 , 807 );
		MMI_SendMessage( Alert_EXIT , MM_SOUNDEFFECT , 1 , 1004 );
	} else {
		MMI_SendMessage( Alert_EXIT , MM_VISUALEFFECT , 1 , 0 );
		MMI_SendMessage( Alert_EXIT , MM_SOUNDEFFECT , 1 , 0 );
	};
	MMI_SendMessage( Alert_EXIT , MM_ERASE , 0 );
	MMI_SendMessage( Alert_EXIT , MM_DETACH , 0 );
	MMI_SetHaltFlag( TRUE );
	// ファイルダイアログ関係の終了処理
	//	FDG_FreeFileDlg();		// メモリ開放
	//	FDG_RecovCurDir();		// カレントディレクトリを復帰する
	// 終了処理
	//	MMI_Close();
	//	SND_end();				// サウンドの終了
	//	FM_ResetVector();		// 致命的エラーハンドラの復帰
								// INT 23H/24H終了
	//	exit( re );
	return NOERR ;
}

/*	initDataEXIT:DButton_EXIT[1]:MJ_DBUTTONL40の呼び出し関数	*/
int	CATLOGExit_NO( )
{
	MMI_SendMessage( Alert_EXIT , MM_VISUALEFFECT , 1 , 0 );
	MMI_SendMessage( Alert_EXIT , MM_SOUNDEFFECT , 1 , 0 );
	MMI_SendMessage( Alert_EXIT , MM_ERASE , 0 );
	MMI_SendMessage( Alert_EXIT , MM_DETACH , 0 );
	return NOERR ;
}
/* DIVIDE_END */
