X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fmule-canna.c;h=249e21dfbebc169c1c0793e3aa1450709fcc7c13;hb=0d4f9bdec1ceedd52112534582ba2842b1818250;hp=839ab98bd35574b693fefba1d398f01aa422a3b8;hpb=85bde9e7b19f5c55a51c61b91103704157a0d64e;p=chise%2Fxemacs-chise.git- diff --git a/src/mule-canna.c b/src/mule-canna.c index 839ab98..249e21d 100644 --- a/src/mule-canna.c +++ b/src/mule-canna.c @@ -1,4 +1,4 @@ -/* CANNA interface +/* CANNA interface -*- coding: euc-jp -*- Copyright (C) 1995 Free Software Foundation, Inc. Copyright (C) 1995 Sun Microsystems, Inc. @@ -190,6 +190,7 @@ static int IRCP_context; static Lisp_Object storeResults (unsigned char *, int, jrKanjiStatus *); static Lisp_Object kanjiYomiList (int, int); +static Lisp_Object CANNA_mode_keys (void); #ifdef CANNA_MULE static void m2c (unsigned char *, int, unsigned char *); @@ -326,10 +327,9 @@ No separator will be used otherwise. } /* For whatever reason, calling Fding directly from libCanna loses */ -static void call_Fding() +static void +call_Fding (void) { - extern Lisp_Object Fding(); - Fding (Qnil, Qnil, Qnil); } @@ -421,8 +421,7 @@ If nil is specified for each arg, the default value will be used. } else { - extern void (*jrBeepFunc)(); - Lisp_Object CANNA_mode_keys (); + extern void (*jrBeepFunc) (void); jrBeepFunc = call_Fding; @@ -535,7 +534,7 @@ Change Japanese pre-edit mode. return val; } -Lisp_Object +static Lisp_Object CANNA_mode_keys (void) { #define CANNAWORKBUFSIZE 32 @@ -718,7 +717,8 @@ byteLen (int bun, int len) } DEFUN ("canna-henkan-begin", Fcanna_henkan_begin, 1, 1, 0, /* -¤«¤Ê´Á»úÊÑ´¹¤·¤¿·ë²Ì¤òÊÖ´Ô¤¹¤ë¡£Ê¸ÀáÀڤ꤬¤·¤Æ¤¢¤ë¡£ +Return the result of kana-to-kanji conversion. +Clause separator is set. */ (yomi)) { @@ -773,7 +773,7 @@ kanjiYomiList (int context, int nbun) } DEFUN ("canna-henkan-next", Fcanna_henkan_next, 1, 1, 0, /* -¸õÊä°ìÍ÷¤òµá¤á¤ë¡£ +Return the list of candidates. */ (bunsetsu)) { @@ -798,7 +798,7 @@ DEFUN ("canna-henkan-next", Fcanna_henkan_next, 1, 1, 0, /* } else { - endp = XCDR (endp) = Fcons (make_string (p, slen), Qnil); + endp = XCDR (res) = Fcons (make_string (p, slen), Qnil); } p += slen + 1; } @@ -806,7 +806,7 @@ DEFUN ("canna-henkan-next", Fcanna_henkan_next, 1, 1, 0, /* } DEFUN ("canna-bunsetu-henkou", Fcanna_bunsetu_henkou, 2, 2, 0, /* -ʸÀá¤ÎŤµ¤ò»ØÄꤹ¤ë¡£ +Specify the length of a clause. */ (bunsetsu, bunlen)) { @@ -826,7 +826,7 @@ DEFUN ("canna-bunsetu-henkou", Fcanna_bunsetu_henkou, 2, 2, 0, /* } DEFUN ("canna-henkan-kakutei", Fcanna_henkan_kakutei, 2, 2, 0, /* -¸õÊäÁªÂò¡£ +Select a candidate. */ (bun, kouho)) { @@ -845,7 +845,7 @@ DEFUN ("canna-henkan-kakutei", Fcanna_henkan_kakutei, 2, 2, 0, /* } DEFUN ("canna-henkan-end", Fcanna_henkan_end, 0, 0, 0, /* -ÊÑ´¹½ªÎ»¡£ +End conversion. */ ()) { @@ -858,7 +858,7 @@ DEFUN ("canna-henkan-end", Fcanna_henkan_end, 0, 0, 0, /* } DEFUN ("canna-henkan-quit", Fcanna_henkan_quit, 0, 0, 0, /* -ÊÑ´¹½ªÎ»¡£ +Quit conversion. */ ()) { @@ -1776,12 +1776,12 @@ For canna /* EUC multibyte string to MULE internal string */ -#ifdef UTF2000 static void c2mu (unsigned char *cp, int l, unsigned char *mp) { - Emchar chr; unsigned char ch, *ep = cp+l; +#ifdef UTF2000 + Emchar chr; while ((cp < ep) && (ch = *cp++)) { @@ -1791,8 +1791,9 @@ c2mu (unsigned char *cp, int l, unsigned char *mp) } else if (ch == ISO_CODE_SS3) { + ch = *cp++; chr = MAKE_CHAR (Vcharset_japanese_jisx0212, - (*cp++) & 0x7f, (*cp++) & 0x7f); + ch & 0x7f, (*cp++) & 0x7f); } else if (ch & 0x80) { @@ -1843,14 +1844,7 @@ c2mu (unsigned char *cp, int l, unsigned char *mp) *mp++ = (chr & 0x3f) | 0x80; } } - *mp = 0; -} #else -static void -c2mu (char *cp, int l, char *mp) -{ - char ch, *ep = cp+l; - while ((cp < ep) && (ch = *cp)) { if ((unsigned char) ch == ISO_CODE_SS2) @@ -1871,9 +1865,9 @@ c2mu (char *cp, int l, char *mp) } *mp++ = *cp++; } +#endif *mp = 0; } -#endif /* MULE internal string to EUC multibyte string */