#ifndef	_AFFRUN_H
#define	_AFFRUN_H

#define	AFFRUN_TYP_OFF	(0)	/* 登録なし			*/
#define	AFFRUN_TYP_IAP	(2)	/* 内蔵アプリ		*/
#define	AFFRUN_TYP_CCI	(3)	/* CCI 作成アプリ	*/
#define	AFFRUN_TYP_DOS	(4)	/* DOS コマンド		*/

#define	AFFRUN_DOS_MD_NORMAL	(0)	/* 既存のDOS console で実行		*/
#define	AFFRUN_DOS_MD_DSPIGN	(1)	/* 表示なし						*/

#ifndef	__CCI__
typedef	struct	_affRun_t
{	struct	_affRun_t		*next;
	int						ftyp;		/* ファイルタイプ	*/
	char					name[14];	/* ファイル名		*/
	int						atyp;
	union
	{	struct
		{	int				aplTyp;		/* アプリタイプ		*/
		} iap;
		struct
		{	char			func[128];	/* 関数名			*/
		} cci;
		struct
		{	int				cons;		/* コンソール有/無	*/
			char			cmd[128];
		} dos;
	} apl;
	size_t				parLen;		/* パラメータの長さ				*/
	char				*para;		/* パラメータ					*/
} AFFRUN_T;

#define	AFFRUN_HASH_MAX	(16)

extern AFFRUN_T	*AffRunFileTbl[AFFRUN_HASH_MAX];

extern AFFRUN_T	*Aff_getRunFile( int ftyp, CONST char *name);
extern int		Aff_setRunFileAttr( int ftyp, CONST char *name, int atyp, ... );
extern int		AFF_runFile( AFF_T *aff, int ftyp, char *name );

#endif

#endif
