//	ＡＩＧライブラリ　基本関数：パラメーター取得関数
//		Copyright (C) 1989-1992,95,2001 by AIG-SOFT

#ifndef	__AIG_PARAM__
#define	__AIG_PARAM__	1

#include "deftype.h"

#ifdef	__cplusplus
// 95/11 : G++対応
extern	"C" {
#endif
#ifdef	__PROTO_TYPE	/* プロトタイプ宣言 */
	int	check_param2(const char *,unchar **,int,int);
	int	check_param3(const char *,unchar **,int,int *,int);
	int	check_param3L(const char *,unchar **,int,long *,int);
	#ifdef	__STDDEF_H
//	time_tはstddef.hが必要になる
	int	check_param3T(const char *,unchar **,int,time_t *,int);
	#endif
	int	check_param3n(const char *,unchar **,int ,int [],int ,int ,int ,int *);
	int	check_param3nL(const char *,unchar **,int ,long [],int ,int ,int ,int *);
	int	getfname(int,unchar **,int,int *);
	int	helpcom(int,unchar **,int,const char *,const char *);
	int	helpcom0(int,unchar **,int,const char *,const char *);
	int	check_version(unchar *,unchar *,int ,unchar **,int);
	int	line_option(unchar *,int,unchar **,int);
	int	line_option0(unchar *,int,unchar **,int,int);
	int	set_param(unchar **,int,unchar **,int);
	int	read_param(unchar **,unchar **);
	int	read_param2(unchar **,unchar **,int);
	int	read_param_no(int *);
	int	read_param_no2(int *,unchar **,int);
	int	check_lots_option(unchar *,int,unchar *,int,unchar **,unchar *);
	int	check_param_error(unchar **,int);
	int	GetDriveParam(int ,unchar *,int *);
	int	IndirectGet(unchar *,unchar *(*),unchar **,int,int);
	void	clear_param(void);
#else	/* フォーワード宣言 */
	int	check_param2();
	int	check_param3();
	int	check_param3L();
	int	check_param3T();	// こちらは引数の型がないのでいつでも宣言可能
	int	check_param3n();
	int	check_param3nL();
	int	getfname();
	int	helpcom();
	int	helpcom0();
	int	check_version();
	int	line_option();
	int	line_option0();
	int	set_param();
	int	read_param();
	int	read_param2();
	int	read_param_no();
	int	read_param_no2();
	int	check_lots_option();
	int	check_param_error();
	int	GetDriveParam();
	int	IndirectGet();
	void	clear_param();
#endif
#ifdef	__cplusplus
}
#endif

/* マクロ関数 */
#define	line_option(line,point,argv,mode) line_option0(line,point,argv,mode,0)
#define	check_param3L(prm,argv,argc,num,mode)	check_param3(prm,argv,argc,(int*)num,mode)
#define	check_param3T(prm,argv,argc,num,mode)	check_param3(prm,argv,argc,(int*)num,mode)
#define	check_param3nL(prm,argv,argc,num,mode,limit,min,get) check_param3(prm,argv,argc,(int*)num,mode,limit,min,get)

#endif
