/* # skkinput (Simple Kana-Kanji Input)
 * commondef.h
 * This file is part of skkinput.
 * Copyright (C) 1997
 * Takashi SAKAMOTO (sakamoto@yajima.kuis.kyoto-u.ac.jp)
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2, or (at your option)
 * any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with skkinput; see the file COPYING.  If not, write to
 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 */
#ifndef commondef_h
#define commondef_h

/*
 * 定数の定義。
 */
/* skkinput が管理しているバッファの容量。*/
#define TEXTBUFSIZE		(512)
#define BUFSIZE			(TEXTBUFSIZE)
/* skkserv とのコミュニケーションに使うバッファの容量。*/
#define TRANSBUFSIZE		(TEXTBUFSIZE)
/* skkinput が管理できる最大の文字列。この中で変換作業をすることになる。*/
#define TEXTMAXLEN		(TEXTBUFSIZE-1)
/* skkinput が X11 から XLookupString を使って、読み込む際のバッファの容量。*/
#define STRBUFSIZE		(10)
/* ローマ字仮名変換を行う時に可能なローマ字の長さの最大値。*/
#define MAX_PREFIX_LENGTH	(4)
/* 使用可能な最大のマーカの数。*/
#define MAXMARKERNUM		(15)

#ifndef True
#define True	(1)
#define False	(0)
#endif
#define ENDOFTBL	(0)
#ifndef ERR
#define	ERR	(-1)
#endif

/*
 * file-coding-system
 */
enum {
  CODING_SYSTEM_IS_EUC = 0, CODING_SYSTEM_IS_JIS,
} ;

/*
 * 共通に利用されるマクロ。
 */
#define baisuu(a,b)	((a) - ((a)%(b)))
#define swap_int(a,b)	do { int tmp ; tmp = (b) ; (b) = (a) ; (a) = tmp ; } while( 0 )
#endif
