1 /* # skkinput (Simple Kana-Kanji Input)
2  *
3  * This file is part of skkinput.
4  * Copyright (C) 2002
5  * Takashi SAKAMOTO (PXG01715@nifty.ne.jp)
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2, or (at your option)
10  * any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with skkinput; see the file COPYING.  If not, write to
19  * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
20  */
21 #if !defined (kfile_h)
22 #define	kfile_h
23 
24 #include "Char.h"
25 #include <stdio.h>
26 #include "kanji.h"
27 
28 typedef struct tagKFILE {
29 	FILE*				m_pf ;
30 	KANJISTATEMACHINE	m_ksm ;
31 	int					m_iCodingSystem ;
32 }	KFILE ;
33 
34 typedef struct tagKFILEPOS {
35 	long				m_lPosition ;	/* �ե�������Ƭ����ΰ��֡�*/
36 	KANJISTATEMACHINE	m_ksm ;			/* �������ֵ����ξ��֡�*/
37 }	KFILEPOS ;
38 
39 #define	KFILEPOS_POSITION(pos)	((pos).m_lPosition)
40 #define	KFILEPOS_STATE(pos)		((pos).m_ksm)
41 
42 /*	Prototypes */
43 Boolean	KFile_Init	(KFILE*) ;
44 Boolean	KFile_Open	(KFILE*, const char*, int) ;
45 Boolean	KFile_Close	(KFILE*) ;
46 Char	KFile_Getc	(KFILE*) ;
47 Boolean	KFile_FindsAtBeginningOfLine  (KFILE*, const Char*) ;
48 Boolean	KFile_FindsAtBeginningOfLineA (KFILE*, const char*) ;
49 Boolean	KFile_Cmps					(KFILE*, const Char*) ;
50 Boolean	KFile_Cmpsn					(KFILE*, const Char*, int) ;
51 Boolean	KFile_Nextline				(KFILE*) ;
52 Boolean	KFile_Tell					(KFILE*, KFILEPOS*) ;
53 Boolean	KFile_Seek					(KFILE*, KFILEPOS*) ;
54 Boolean	KFile_Seekn					(KFILE*, long, int) ;
55 Boolean	KFile_Rewind				(KFILE*) ;
56 int		KFile_GetCodingSystem		(KFILE*) ;
57 int		KFile_DetectCodingSystem	(KFILE*) ;
58 
59 #endif
60 
61