/***************************************************************************
* Copyright (C) 2004 by TAM(Teppei Tamra) *
* tam-t@par.odn.ne.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 of the License, 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 this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
/* う ぜ ぇ */
#ifndef WNNPROTO_H
#define WNNPROTO_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
extern "C" {
/* 基礎的なん */
#define w_char unsigned short
struct wnn_buf *jl_open_lang(char *,char *,char *,char *,int (*)(char *),int(*)(char *),int);
/*
wnn6sdk及びwnn7sdk、FreeWnnでの関数の違いをフォロー。
*/
#ifdef HAVE_LIBWNN7
#define HAVE_LIBWNN6
#endif
#ifndef HAVE_LIBWNN6
#include "wnnstruct.h"
#define jl_zenkouho_suu(buf) ((buf)->zenkouho_daip? (buf)->zenkouho_dai_suu:(buf)->zenkouho_suu)
int jl_ren_conv(struct wnn_buf*,w_char*,int,int,int); /*jl_fi_ren_convとかもあったなぁ */
int jl_nobi_conv(struct wnn_buf*,int,int,int,int,int);
int jl_update_hindo(struct wnn_buf*,int,int);
#else
int jl_fi_ren_conv(struct wnn_buf*,w_char*,int,int,int);
int jl_optimize_fi(struct wnn_buf*,int,int);
int jl_fi_nobi_conv(struct wnn_buf*,int,int,int,int,int);
int jl_zenkouho_suu(struct wnn_buf*);
#define jl_ren_conv(a,b,c,d,e) jl_fi_ren_conv(a,b,c,d,e)
#define jl_nobi_conv(a,b,c,d,e,f) jl_fi_nobi_conv(a,b,s,d,e,f)
#define jl_update_hindo(a,b,c) jl_optimize_fi(a,b,c)
/* int jl_isconnect(struct wnn_buf*); */
#endif
/* 変換に関するそれ */
int wnn_get_area(struct wnn_buf*,int,int,w_char*,int);
int jl_zenkouho(struct wnn_buf*,int,int,int);
void jl_get_zenkouho_kanji(struct wnn_buf*,int ,w_char *);
int jl_set_jikouho(struct wnn_buf*,int);
int jl_kill(struct wnn_buf*,int,int);
/* FreeWnn */
#define WNN_NO_USE 0
#define WNN_USE_MAE 1
#define WNN_USE_ATO 2
#define WNN_USE_ZENGO (WNN_USE_MAE | WNN_USE_ATO)
#define WNN_UNIQ_KNJ 2
#define WNN_UNIQ 1
#define WNN_NO_UNIQ 0
#define WNN_NO_CREATE 0
#define WNN_CREATE (-1)
#define WNN_SHO 0
#define WNN_DAI 1
#define jl_get_kanji(buf,bun1,bun2,area) wnn_get_area(buf,bun1,bun2,area,1)
#define jl_get_yomi(buf,bun1,bun2,area) wnn_get_area(buf,bun1,bun2,area,0)
}
#endif