2013-08-21 16:26:34 +02:00
|
|
|
|
--- FreeWnn-1.1.1-a022.bak/Wnn/jlib/jl.c 2013-08-06 20:02:27.258462915 +0900
|
|
|
|
|
+++ FreeWnn-1.1.1-a022/Wnn/jlib/jl.c 2013-08-06 18:59:37.294514823 +0900
|
2010-03-26 01:19:40 +01:00
|
|
|
|
@@ -52,6 +52,7 @@
|
|
|
|
|
# include <malloc.h>
|
|
|
|
|
# endif
|
|
|
|
|
#endif /* STDC_HEADERS */
|
2007-01-16 00:13:17 +01:00
|
|
|
|
+#include <stdarg.h>
|
|
|
|
|
#include <sys/types.h>
|
2010-03-26 01:19:40 +01:00
|
|
|
|
#include <sys/file.h>
|
|
|
|
|
#include <sys/stat.h>
|
|
|
|
|
@@ -159,7 +160,7 @@
|
2007-01-16 00:13:17 +01:00
|
|
|
|
static void make_space_for ();
|
|
|
|
|
static void make_space_for_bun ();
|
|
|
|
|
static void make_space_for_zenkouho ();
|
|
|
|
|
-static void message_out ();
|
|
|
|
|
+static void message_out (int (*) (const char *), const char *, ...);
|
|
|
|
|
static int ren_conv1 ();
|
|
|
|
|
static void set_dai ();
|
|
|
|
|
static void set_sho ();
|
2010-03-26 01:19:40 +01:00
|
|
|
|
@@ -275,7 +276,7 @@
|
2007-01-16 00:13:17 +01:00
|
|
|
|
static struct wnn_env *
|
|
|
|
|
find_same_env (js, env_n, lang)
|
|
|
|
|
register WNN_JSERVER_ID *js;
|
|
|
|
|
- register char *env_n;
|
|
|
|
|
+ register const char *env_n;
|
|
|
|
|
char *lang;
|
|
|
|
|
{
|
|
|
|
|
register int k;
|
2010-03-26 01:19:40 +01:00
|
|
|
|
@@ -314,7 +315,7 @@
|
2007-01-16 00:13:17 +01:00
|
|
|
|
add_new_env (js, env, env_n, server_n, lang)
|
|
|
|
|
register WNN_JSERVER_ID *js;
|
|
|
|
|
register struct wnn_env *env;
|
|
|
|
|
- char *env_n, *server_n, *lang;
|
|
|
|
|
+ const char *env_n, *server_n, *lang;
|
|
|
|
|
{
|
|
|
|
|
register int k;
|
|
|
|
|
|
2010-03-26 01:19:40 +01:00
|
|
|
|
@@ -435,15 +436,16 @@
|
2007-01-16 00:13:17 +01:00
|
|
|
|
|
|
|
|
|
struct wnn_env *
|
|
|
|
|
jl_connect_lang (env_n, server_n, lang, wnnrc_n, error_handler, message_handler, timeout)
|
|
|
|
|
- register char *env_n, *server_n, *wnnrc_n, *lang;
|
|
|
|
|
- int (*error_handler) (), (*message_handler) ();
|
|
|
|
|
+ register const char *env_n, *server_n, *wnnrc_n, *lang;
|
|
|
|
|
+ int (*error_handler) (const char *), (*message_handler) (const char *);
|
|
|
|
|
int timeout;
|
|
|
|
|
{
|
|
|
|
|
register WNN_JSERVER_ID *js = NULL;
|
|
|
|
|
struct wnn_env *env;
|
|
|
|
|
int env_exist;
|
|
|
|
|
char p_lang[16];
|
|
|
|
|
- register char *p, *l;
|
|
|
|
|
+ register char *p;
|
|
|
|
|
+ const char *l;
|
|
|
|
|
extern char *getenv ();
|
|
|
|
|
extern char *_wnn_get_machine_of_serv_defs ();
|
|
|
|
|
|
2010-03-26 01:19:40 +01:00
|
|
|
|
@@ -576,8 +578,8 @@
|
2007-01-16 00:13:17 +01:00
|
|
|
|
|
|
|
|
|
struct wnn_buf *
|
|
|
|
|
jl_open_lang (env_n, server_n, lang, wnnrc_n, error_handler, message_handler, timeout)
|
|
|
|
|
- char *env_n, *server_n, *wnnrc_n, *lang;
|
|
|
|
|
- int (*error_handler) (), (*message_handler) ();
|
|
|
|
|
+ const char *env_n, *server_n, *wnnrc_n, *lang;
|
|
|
|
|
+ int (*error_handler) (const char *), (*message_handler) (const char *);
|
|
|
|
|
int timeout;
|
|
|
|
|
{
|
|
|
|
|
register int k, dmy;
|
2010-03-26 01:19:40 +01:00
|
|
|
|
@@ -1504,7 +1506,7 @@
|
2007-01-16 00:13:17 +01:00
|
|
|
|
int prio;
|
|
|
|
|
int rw, hrw, rev;
|
|
|
|
|
char *pwd_dic, *pwd_hindo;
|
|
|
|
|
- int (*error_handler) (), (*message_handler) ();
|
|
|
|
|
+ int (*error_handler) (const char *), (*message_handler) (const char *);
|
|
|
|
|
{
|
|
|
|
|
char tmp[256];
|
|
|
|
|
char pwd[WNN_PASSWD_LEN], hpwd[WNN_PASSWD_LEN];
|
2010-03-26 01:19:40 +01:00
|
|
|
|
@@ -1519,7 +1521,7 @@
|
2007-01-16 00:13:17 +01:00
|
|
|
|
jl_disconnect (env);
|
|
|
|
|
return (-1);
|
|
|
|
|
}
|
|
|
|
|
- if ((int) error_handler == WNN_NO_CREATE || (rw == WNN_DIC_RDONLY))
|
|
|
|
|
+ if (error_handler == (int (*) (const char *)) WNN_NO_CREATE || (rw == WNN_DIC_RDONLY))
|
|
|
|
|
{
|
|
|
|
|
sprintf (tmp, "%s \"%s\" %s", msg_get (wnn_msg_cat, 200, NULL, env->lang), dic_name, msg_get (wnn_msg_cat, 201, NULL, env->lang));
|
|
|
|
|
/*
|
2010-03-26 01:19:40 +01:00
|
|
|
|
@@ -1533,7 +1535,7 @@
|
2007-01-16 00:13:17 +01:00
|
|
|
|
/*
|
|
|
|
|
"<22><><EFBFBD><EFBFBD><EFBFBD>ե<EFBFBD><D5A5><EFBFBD><EFBFBD><EFBFBD> \"%s\" <20><>̵<EFBFBD><CCB5><EFBFBD>衣<EFBFBD><E8A1A3><EFBFBD><EFBFBD>?(Y/N)",
|
|
|
|
|
*/
|
|
|
|
|
- if ((int) error_handler == WNN_CREATE || call_error_handler (error_handler, tmp))
|
2013-08-21 16:26:34 +02:00
|
|
|
|
+ if (error_handler == WNN_CREATE || call_error_handler (error_handler, tmp))
|
2007-01-16 00:13:17 +01:00
|
|
|
|
{
|
|
|
|
|
if (create_file (env, dic_name, JISHO, -1, /* -1 is dummy */
|
|
|
|
|
pwd_dic, (hindo_name && *hindo_name) ? "" : pwd_hindo, error_handler, message_handler) == -1)
|
2010-03-26 01:19:40 +01:00
|
|
|
|
@@ -1558,7 +1560,7 @@
|
2007-01-16 00:13:17 +01:00
|
|
|
|
jl_disconnect (env);
|
|
|
|
|
return (-1);
|
|
|
|
|
}
|
|
|
|
|
- if ((int) error_handler == WNN_NO_CREATE || (hrw == WNN_DIC_RDONLY))
|
|
|
|
|
+ if (error_handler == (int (*) (const char *)) WNN_NO_CREATE || (hrw == WNN_DIC_RDONLY))
|
|
|
|
|
{
|
|
|
|
|
sprintf (tmp, "%s \"%s\" %s", msg_get (wnn_msg_cat, 203, NULL, env->lang), hindo_name, msg_get (wnn_msg_cat, 201, NULL, env->lang));
|
|
|
|
|
/*
|
2010-03-26 01:19:40 +01:00
|
|
|
|
@@ -1572,7 +1574,7 @@
|
2007-01-16 00:13:17 +01:00
|
|
|
|
/*
|
|
|
|
|
"<22><><EFBFBD>٥ե<D9A5><D5A5><EFBFBD><EFBFBD><EFBFBD> \"%s\" <20><>̵<EFBFBD><CCB5><EFBFBD>衣<EFBFBD><E8A1A3><EFBFBD><EFBFBD>?(Y/N)",
|
|
|
|
|
*/
|
|
|
|
|
- if ((int) error_handler == WNN_CREATE || call_error_handler (error_handler, tmp))
|
2013-08-21 16:26:34 +02:00
|
|
|
|
+ if (error_handler == WNN_CREATE || call_error_handler (error_handler, tmp))
|
2007-01-16 00:13:17 +01:00
|
|
|
|
{
|
|
|
|
|
if (create_file (env, hindo_name, HINDO, fid, "", pwd_hindo, error_handler, message_handler) == -1)
|
|
|
|
|
return (-1);
|
2010-03-26 01:19:40 +01:00
|
|
|
|
@@ -1601,7 +1603,7 @@
|
2007-01-16 00:13:17 +01:00
|
|
|
|
}
|
|
|
|
|
else if (wnn_errorno == WNN_HINDO_NO_MATCH)
|
|
|
|
|
{
|
|
|
|
|
- if ((int) error_handler == WNN_NO_CREATE)
|
2013-08-21 16:26:34 +02:00
|
|
|
|
+ if (error_handler == (int (*) (const char *)) WNN_NO_CREATE)
|
2007-01-16 00:13:17 +01:00
|
|
|
|
{
|
|
|
|
|
return (-1);
|
|
|
|
|
}
|
2010-03-26 01:19:40 +01:00
|
|
|
|
@@ -1609,7 +1611,7 @@
|
2007-01-16 00:13:17 +01:00
|
|
|
|
/*
|
|
|
|
|
"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> \"%s\" <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̵<EFBFBD><CCB5><EFBFBD>衣<EFBFBD><E8A1A3><EFBFBD><EFBFBD>ľ<EFBFBD><C4BE>?(Y/N)",
|
|
|
|
|
*/
|
|
|
|
|
- if (!((int) error_handler == WNN_CREATE || call_error_handler (error_handler, tmp)))
|
|
|
|
|
+ if (!(error_handler == (int (*) (const char *)) WNN_CREATE || call_error_handler (error_handler, tmp)))
|
|
|
|
|
{
|
|
|
|
|
return (-1);
|
|
|
|
|
}
|
2010-03-26 01:19:40 +01:00
|
|
|
|
@@ -1685,7 +1687,7 @@
|
2007-01-16 00:13:17 +01:00
|
|
|
|
create_pwd_file (env, pwd_file, error_handler, message_handler)
|
|
|
|
|
register struct wnn_env *env;
|
|
|
|
|
char *pwd_file;
|
|
|
|
|
- int (*error_handler) (), (*message_handler) ();
|
|
|
|
|
+ int (*error_handler) (const char *), (*message_handler) (const char *);
|
|
|
|
|
{
|
|
|
|
|
FILE *fp;
|
|
|
|
|
char gomi[256];
|
2010-03-26 01:19:40 +01:00
|
|
|
|
@@ -2749,17 +2751,17 @@
|
2007-01-16 00:13:17 +01:00
|
|
|
|
int
|
|
|
|
|
jl_set_env_wnnrc (env, wnnrc_n, error_handler, message_handler)
|
|
|
|
|
register struct wnn_env *env;
|
|
|
|
|
- char *wnnrc_n;
|
|
|
|
|
- int (*error_handler) (), (*message_handler) ();
|
|
|
|
|
+ const char *wnnrc_n;
|
|
|
|
|
+ int (*error_handler) (const char *), (*message_handler) (const char *);
|
|
|
|
|
{
|
|
|
|
|
int level = 0;
|
|
|
|
|
int x;
|
|
|
|
|
wnn_errorno = 0;
|
|
|
|
|
- if ((int) error_handler == WNN_CREATE)
|
|
|
|
|
+ if (error_handler == (int (*) (const char *)) WNN_CREATE)
|
|
|
|
|
{
|
|
|
|
|
confirm_state = CREATE_WITHOUT_CONFIRM;
|
|
|
|
|
}
|
|
|
|
|
- else if ((int) error_handler == WNN_NO_CREATE)
|
|
|
|
|
+ else if (error_handler == (int (*) (const char *)) WNN_NO_CREATE)
|
|
|
|
|
{
|
|
|
|
|
confirm_state = NO_CREATE;
|
|
|
|
|
}
|
2013-08-21 16:26:34 +02:00
|
|
|
|
@@ -2775,9 +2777,8 @@
|
2007-01-16 00:13:17 +01:00
|
|
|
|
int
|
|
|
|
|
jl_set_env_wnnrc1 (env, wnnrc_n, error_handler, message_handler, level)
|
|
|
|
|
register struct wnn_env *env;
|
|
|
|
|
- char *wnnrc_n;
|
|
|
|
|
- int (*error_handler) (), (*message_handler) ();
|
2013-08-21 16:26:34 +02:00
|
|
|
|
- int level;
|
2007-01-16 00:13:17 +01:00
|
|
|
|
+ const char *wnnrc_n;
|
2013-08-21 16:26:34 +02:00
|
|
|
|
+ int (*error_handler) (const char *), (*message_handler) (const char *); int level;
|
2007-01-16 00:13:17 +01:00
|
|
|
|
{
|
|
|
|
|
register int num;
|
2013-08-21 16:26:34 +02:00
|
|
|
|
char s[20][EXPAND_PATH_LENGTH];
|
|
|
|
|
@@ -2829,7 +2830,7 @@
|
2007-01-16 00:13:17 +01:00
|
|
|
|
{
|
|
|
|
|
/* dic_add */
|
|
|
|
|
int prio, rdonly, hrdonly, rev;
|
|
|
|
|
- int (*error_handler1) () = (int (*)()) 0;
|
2013-08-21 16:26:34 +02:00
|
|
|
|
+ int (*error_handler1) (const char *) = NULL;
|
2007-01-16 00:13:17 +01:00
|
|
|
|
expand_expr_all (s[0], env);
|
|
|
|
|
if (num < 3 || !REAL_PARAM (s[1]))
|
|
|
|
|
{
|
2013-08-21 16:26:34 +02:00
|
|
|
|
@@ -2855,11 +2856,11 @@
|
2007-01-16 00:13:17 +01:00
|
|
|
|
else if (confirm_state == CREATE_WITHOUT_CONFIRM)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
- error_handler1 = (int (*)()) WNN_CREATE;
|
|
|
|
|
+ error_handler1 = (int (*) (const char *)) WNN_CREATE;
|
|
|
|
|
}
|
|
|
|
|
else if (confirm_state == NO_CREATE)
|
|
|
|
|
{
|
|
|
|
|
- error_handler1 = (int (*)()) WNN_NO_CREATE;
|
|
|
|
|
+ error_handler1 = (int (*) (const char *)) WNN_NO_CREATE;
|
|
|
|
|
}
|
|
|
|
|
if (jl_dic_add_e (env, s[0], s[1], rev, prio, rdonly, hrdonly, s[5], s[6], error_handler1, message_handler) == -1 && wnn_errorno != 0)
|
|
|
|
|
{
|
2013-08-21 16:26:34 +02:00
|
|
|
|
@@ -2990,7 +2991,7 @@
|
2007-01-16 00:13:17 +01:00
|
|
|
|
|
|
|
|
|
if (*s != '~' && *s != '@')
|
|
|
|
|
return (0);
|
|
|
|
|
- if ((int) strlen (s) >= EXPAND_PATH_LENGTH)
|
|
|
|
|
+ if (strlen (s) >= EXPAND_PATH_LENGTH)
|
|
|
|
|
return (-1);
|
|
|
|
|
|
|
|
|
|
s1 = s;
|
2013-08-21 16:26:34 +02:00
|
|
|
|
@@ -3008,12 +3009,12 @@
|
2007-01-16 00:13:17 +01:00
|
|
|
|
{
|
|
|
|
|
if (*s1)
|
|
|
|
|
{
|
|
|
|
|
- noerr = expandsuc = (NULL != (u = getpwnam (s1)) && (int) strlen (p = u->pw_dir) + (int) strlen (tmp) < EXPAND_PATH_LENGTH);
|
|
|
|
|
+ noerr = expandsuc = (NULL != (u = getpwnam (s1)) && strlen (p = u->pw_dir) + strlen (tmp) < EXPAND_PATH_LENGTH);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
- noerr = expandsuc = (NULL != (p = getenv ("HOME")) && (int) strlen (p) + (int) strlen (tmp) < EXPAND_PATH_LENGTH);
|
|
|
|
|
+ noerr = expandsuc = (NULL != (p = getenv ("HOME")) && strlen (p) + strlen (tmp) < EXPAND_PATH_LENGTH);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
2013-08-21 16:26:34 +02:00
|
|
|
|
@@ -3021,13 +3022,13 @@
|
2007-01-16 00:13:17 +01:00
|
|
|
|
{ /* then, *s must be '@' */
|
|
|
|
|
if (!strcmp (s1, "HOME"))
|
|
|
|
|
{
|
|
|
|
|
- noerr = expandsuc = (NULL != (p = getenv ("HOME")) && (int) strlen (p) + (int) strlen (tmp) < EXPAND_PATH_LENGTH);
|
|
|
|
|
+ noerr = expandsuc = (NULL != (p = getenv ("HOME")) && strlen (p) + strlen (tmp) < EXPAND_PATH_LENGTH);
|
|
|
|
|
}
|
|
|
|
|
else if (!strcmp (s1, "WNN_DIC_DIR"))
|
|
|
|
|
{
|
|
|
|
|
char buf[EXPAND_PATH_LENGTH];
|
|
|
|
|
expandsuc = 1;
|
|
|
|
|
- noerr = (NULL != (p = getenv ("HOME")) && (int) strlen (p) + (int) strlen (tmp) < EXPAND_PATH_LENGTH);
|
|
|
|
|
+ noerr = (NULL != (p = getenv ("HOME")) && strlen (p) + strlen (tmp) < EXPAND_PATH_LENGTH);
|
|
|
|
|
strcpy (buf, p);
|
|
|
|
|
strcat (buf, "/");
|
|
|
|
|
|
2013-08-21 16:26:34 +02:00
|
|
|
|
@@ -3044,15 +3045,15 @@
|
2007-01-16 00:13:17 +01:00
|
|
|
|
}
|
|
|
|
|
else if (!strcmp (s1, "LIBDIR"))
|
|
|
|
|
{
|
|
|
|
|
- noerr = expandsuc = ((int) strlen (p = LIBDIR) + (int) strlen (tmp) < EXPAND_PATH_LENGTH);
|
|
|
|
|
+ noerr = expandsuc = (strlen (p = LIBDIR) + strlen (tmp) < EXPAND_PATH_LENGTH);
|
|
|
|
|
}
|
|
|
|
|
else if (!strcmp (s1, "ENV"))
|
|
|
|
|
{ /* Added */
|
|
|
|
|
- noerr = expandsuc = (NULL != (p = env_name (env)) && (int) strlen (p) + (int) strlen (tmp) < EXPAND_PATH_LENGTH);
|
|
|
|
|
+ noerr = expandsuc = (NULL != (p = env_name (env)) && strlen (p) + strlen (tmp) < EXPAND_PATH_LENGTH);
|
|
|
|
|
}
|
|
|
|
|
else if (!strcmp (s1, "USR"))
|
|
|
|
|
{
|
|
|
|
|
- noerr = expandsuc = (NULL != (p = getlogname ()) && (int) strlen (p) + (int) strlen (tmp) < EXPAND_PATH_LENGTH);
|
|
|
|
|
+ noerr = expandsuc = (NULL != (p = getlogname ()) && strlen (p) + strlen (tmp) < EXPAND_PATH_LENGTH);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{ /* @HOME, @LIBDIR @ENV igai ha kaenai */
|
2013-08-21 16:26:34 +02:00
|
|
|
|
@@ -3076,7 +3077,7 @@
|
2007-01-16 00:13:17 +01:00
|
|
|
|
|
|
|
|
|
total = 0;
|
|
|
|
|
flag = 0;
|
|
|
|
|
- while (*st != NULL)
|
|
|
|
|
+ while (*st != 0)
|
|
|
|
|
{
|
|
|
|
|
if (isdigit (*st))
|
|
|
|
|
{
|
2013-08-21 16:26:34 +02:00
|
|
|
|
@@ -3135,7 +3136,7 @@
|
2007-01-16 00:13:17 +01:00
|
|
|
|
int d;
|
|
|
|
|
int fid;
|
|
|
|
|
char *pwd_dic, *pwd_hindo;
|
|
|
|
|
- int (*error_handler) (), (*message_handler) ();
|
|
|
|
|
+ int (*error_handler) (const char *), (*message_handler) (const char *);
|
|
|
|
|
{
|
|
|
|
|
char pwd[WNN_PASSWD_LEN], hpwd[WNN_PASSWD_LEN];
|
|
|
|
|
int rev_dict_type;
|
2013-08-21 16:26:34 +02:00
|
|
|
|
@@ -3243,7 +3244,7 @@
|
2007-01-16 00:13:17 +01:00
|
|
|
|
make_dir_rec1 (env, path, error_handler, message_handler)
|
|
|
|
|
struct wnn_env *env;
|
|
|
|
|
register char *path;
|
|
|
|
|
- int (*error_handler) (), (*message_handler) ();
|
|
|
|
|
+ int (*error_handler) (const char *), (*message_handler) (const char *);
|
|
|
|
|
{
|
|
|
|
|
char gomi[128];
|
|
|
|
|
register char *c;
|
2013-08-21 16:26:34 +02:00
|
|
|
|
@@ -3266,7 +3267,7 @@
|
2007-01-16 00:13:17 +01:00
|
|
|
|
make_dir1 (env, dirname, error_handler, message_handler)
|
|
|
|
|
register struct wnn_env *env;
|
|
|
|
|
register char *dirname;
|
|
|
|
|
- int (*error_handler) (), (*message_handler) ();
|
|
|
|
|
+ int (*error_handler) (const char *), (*message_handler) (const char *);
|
|
|
|
|
{
|
|
|
|
|
char gomi[128];
|
|
|
|
|
if (dirname[0] == C_LOCAL)
|
2013-08-21 16:26:34 +02:00
|
|
|
|
@@ -3287,7 +3288,7 @@
|
2007-01-16 00:13:17 +01:00
|
|
|
|
return (0); /* dir already exists */
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
- if ((int) error_handler != WNN_CREATE)
|
|
|
|
|
+ if (error_handler != (int (*) (const char *)) WNN_CREATE)
|
|
|
|
|
{
|
|
|
|
|
sprintf (gomi, "%s \"%s\" %s%s", msg_get (wnn_msg_cat, 210, NULL, env->lang), dirname, msg_get (wnn_msg_cat, 201, NULL, env->lang), msg_get (wnn_msg_cat, 202, NULL, env->lang));
|
|
|
|
|
/*
|
2013-08-21 16:26:34 +02:00
|
|
|
|
@@ -3324,8 +3325,8 @@
|
2007-01-16 00:13:17 +01:00
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
call_error_handler (error_handler, c)
|
|
|
|
|
- int (*error_handler) ();
|
|
|
|
|
- char *c;
|
|
|
|
|
+ int (*error_handler) (const char *);
|
|
|
|
|
+ const char *c;
|
|
|
|
|
{
|
|
|
|
|
register int x;
|
|
|
|
|
x = error_handler (c);
|
2013-08-21 16:26:34 +02:00
|
|
|
|
@@ -3340,16 +3341,16 @@
|
2007-01-16 00:13:17 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
-message_out (message_handler, format, s1, s2, s3, s4, s5, s6, s7, s8)
|
|
|
|
|
- int (*message_handler) ();
|
|
|
|
|
- char *format;
|
|
|
|
|
- int s1, s2, s3, s4, s5, s6, s7, s8;
|
|
|
|
|
+message_out (int (*message_handler) (const char *), const char *format, ...)
|
|
|
|
|
{
|
|
|
|
|
char buf[256];
|
|
|
|
|
+ va_list args;
|
|
|
|
|
|
|
|
|
|
if (message_handler)
|
|
|
|
|
{
|
|
|
|
|
- sprintf (buf, format, s1, s2, s3, s4, s5, s6, s7, s8);
|
|
|
|
|
+ va_start (args, format);
|
|
|
|
|
+ vsprintf (buf, format, args);
|
|
|
|
|
+ va_end (args);
|
|
|
|
|
(*message_handler) (buf);
|
|
|
|
|
}
|
|
|
|
|
}
|
2013-08-21 16:26:34 +02:00
|
|
|
|
--- FreeWnn-1.1.1-a022.bak/Wnn/jlib/js.c 2005-04-11 00:26:37.000000000 +0900
|
|
|
|
|
+++ FreeWnn-1.1.1-a022/Wnn/jlib/js.c 2013-08-06 19:12:48.783918101 +0900
|
2010-03-26 01:19:40 +01:00
|
|
|
|
@@ -979,7 +979,7 @@
|
2007-01-16 00:13:17 +01:00
|
|
|
|
free((char *)env);
|
|
|
|
|
*/
|
|
|
|
|
set_current_js (env->js_id);
|
|
|
|
|
- handler_of_jserver_dead (NULL);
|
|
|
|
|
+ handler_of_jserver_dead (-1);
|
|
|
|
|
snd_env_head (&tmp_env, JS_DISCONNECT);
|
|
|
|
|
snd_flush ();
|
|
|
|
|
x = get4com ();
|