.\" .\" $Id: connect.man,v 1.4 2001/09/16 14:20:17 hiroo Exp $ .\" .\" .\" FreeWnn is a network-extensible Kana-to-Kanji conversion system. .\" This file is part of FreeWnn. .\" .\" Copyright Kyoto University Research Institute for Mathematical Sciences .\" 1987, 1988, 1989, 1990, 1991, 1992 .\" Copyright OMRON Corporation. 1987, 1988, 1989, 1990, 1991, 1992, 1999 .\" Copyright ASTEC, Inc. 1987, 1988, 1989, 1990, 1991, 1992 .\" Copyright FreeWnn Project 1999, 2000 .\" .\" Maintainer: FreeWnn Project .\" .\" 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 .\" .TH JL_CONNECT 3 "19 September 1991" .SH 名称 .sv 1 .nf .ta 0.1i 2i jl_connect() 環境を作る。 .fi .SH 形式 .sv 1 .nf .ta 0.1i 3i #include "jllib.h" struct wnn_env * jl_connect(env_n, server_n, wnnrc_n, error_handler, message_handler,timeout) char *env_n; /* 環境名 */ char *server_n; /* サーバ名 */ char *wnnrc_n; /* wnnrcファイル名 */ int (*error_handler)(); /* エラー・ハンドラ */ int (*message_handler)(); /* メッセージ・ハンドラ */ int timeout; /* タイムアウト時間 */ .fi .SH 機能 .HP 0 .IP 新しい環境を指定されたサーバ server_n 上に指定された環境名 env_n で作り、 環境を返す。 サーバとコネクトされていない場合は、コネクションを張る。 既にその環境が存在する時には、その環境を返す。 初期化ファイル wnnrc_n が指定された場合、ファイル中の初期化を行なう。 初期化を行なわない場合は、wnnrc_n に NULL を指定する。jl_open 参照。 エラー・ハンドラ error_handler、メッセージ・ハンドラ message_handler を 用いる。jl_dic_add 参照。 timeout(秒)以内に、サーバと接続できない場合は、接続を中断し異常終了する。 タイムアウトの設定のために、SIGALARM を使用している。 timeout が 0 または、負の場合は、SIGALARM を使用しない。 js_connect を参照。 .SH リターンバリュー .sv 1 .nf 正常終了時には、環境を返す。 異常終了時には NULL を返す。 .fi .SH 使用上の注意 .HP 0 .IP タイムアウトには、SIGALARM を使用しているので、注意が必要である。 SIGALARM を使用しない場合には、timeout に 0 を設定しなければならない。