#include	<stdio.h>
#include	<stdlib.h>
#include	<string.h>
#include	<farstr.h>
#include	<ctype.h>
#include	<jctype.h>
#include	<direct.h>
#include	<dos.h>

#define		NAME_MAX	8
#define		NAMEEXT_MAX	12

#define		NULLP	'\0'
#define		putsn(a)	fputs((a),stdout)
#define		errputs(a)	fputs((a),stderr)

typedef unsigned long	u_long;
typedef unsigned int	u_int;

typedef struct find_t	find_t;


typedef struct FileTree
{
	char	name[ NAMEEXT_MAX+1 ];	/* defined in stdio.h */
	char	attr;
	
	struct FileTree far		*right;
	struct FileTree far		*left;
}FileTree;
#define		Tree	FileTree far

typedef struct DirData
{
	char	path[ FILENAME_MAX+1 ];	/* パス名     */
	char	name[ FILENAME_MAX+1 ];	/* ファイル名 */
	
	int 	files;		/* ファイル総数 */
	int 	matchfile;	/* 表示対象ファイル数 */
	int 	depth;		/* ディレクトリの深さ 0〜 */
	u_long	pathdat;	/* ディレクトリの経路 */
	
	u_long	size;		/* ファイルサイズ合計 */
	
}DirData;
#define		Dir		DirData far

/*
typedef		struct DirData far		Dir;
typedef		struct FileTree far		Tree;
*/

/******************************/

#define		OPT_FILE	0x01
#define		OPT_ASCII	0x02
#define		OPT_SUM 	0x04

