Mercurial > hg > xemacs-beta
comparison src/mule-canna.c @ 404:2f8bb876ab1d r21-2-32
Import from CVS: tag r21-2-32
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:16:07 +0200 |
parents | 74fd4e045ea6 |
children | de805c49cfc1 |
comparison
equal
deleted
inserted
replaced
403:9f011ab08d48 | 404:2f8bb876ab1d |
---|---|
716 } | 716 } |
717 return i; | 717 return i; |
718 } | 718 } |
719 | 719 |
720 DEFUN ("canna-henkan-begin", Fcanna_henkan_begin, 1, 1, 0, /* | 720 DEFUN ("canna-henkan-begin", Fcanna_henkan_begin, 1, 1, 0, /* |
721 かな漢字変換した結果を返還する。文節切りがしてある。 | 721 Return the result of kana-to-kanji conversion. |
722 Clause separator is set. | |
722 */ | 723 */ |
723 (yomi)) | 724 (yomi)) |
724 { | 725 { |
725 int nbun; | 726 int nbun; |
726 | 727 |
771 } | 772 } |
772 return res; | 773 return res; |
773 } | 774 } |
774 | 775 |
775 DEFUN ("canna-henkan-next", Fcanna_henkan_next, 1, 1, 0, /* | 776 DEFUN ("canna-henkan-next", Fcanna_henkan_next, 1, 1, 0, /* |
776 候補一覧を求める。 | 777 Return the list of candidates. |
777 */ | 778 */ |
778 (bunsetsu)) | 779 (bunsetsu)) |
779 { | 780 { |
780 int i, slen, len; | 781 int i, slen, len; |
781 unsigned char *p, RkBuf[RKBUFSIZE]; | 782 unsigned char *p, RkBuf[RKBUFSIZE]; |
796 { | 797 { |
797 endp = res = Fcons (make_string (p, slen), Qnil); | 798 endp = res = Fcons (make_string (p, slen), Qnil); |
798 } | 799 } |
799 else | 800 else |
800 { | 801 { |
801 endp = XCDR (endp) = Fcons (make_string (p, slen), Qnil); | 802 endp = XCDR (res) = Fcons (make_string (p, slen), Qnil); |
802 } | 803 } |
803 p += slen + 1; | 804 p += slen + 1; |
804 } | 805 } |
805 return res; | 806 return res; |
806 } | 807 } |
807 | 808 |
808 DEFUN ("canna-bunsetu-henkou", Fcanna_bunsetu_henkou, 2, 2, 0, /* | 809 DEFUN ("canna-bunsetu-henkou", Fcanna_bunsetu_henkou, 2, 2, 0, /* |
809 文節の長さを指定する。 | 810 Specify the length of a clause. |
810 */ | 811 */ |
811 (bunsetsu, bunlen)) | 812 (bunsetsu, bunlen)) |
812 { | 813 { |
813 int nbun, len; | 814 int nbun, len; |
814 | 815 |
824 len = byteLen (nbun, XINT (bunlen)); | 825 len = byteLen (nbun, XINT (bunlen)); |
825 return kanjiYomiList (IRCP_context, RkResize (IRCP_context, len)); | 826 return kanjiYomiList (IRCP_context, RkResize (IRCP_context, len)); |
826 } | 827 } |
827 | 828 |
828 DEFUN ("canna-henkan-kakutei", Fcanna_henkan_kakutei, 2, 2, 0, /* | 829 DEFUN ("canna-henkan-kakutei", Fcanna_henkan_kakutei, 2, 2, 0, /* |
829 候補選択。 | 830 Select a candidate. |
830 */ | 831 */ |
831 (bun, kouho)) | 832 (bun, kouho)) |
832 { | 833 { |
833 int nbun, nkouho; | 834 int nbun, nkouho; |
834 | 835 |
843 RkXfer (IRCP_context, nkouho); | 844 RkXfer (IRCP_context, nkouho); |
844 return Qt; | 845 return Qt; |
845 } | 846 } |
846 | 847 |
847 DEFUN ("canna-henkan-end", Fcanna_henkan_end, 0, 0, 0, /* | 848 DEFUN ("canna-henkan-end", Fcanna_henkan_end, 0, 0, 0, /* |
848 変換終了。 | 849 End conversion. |
849 */ | 850 */ |
850 ()) | 851 ()) |
851 { | 852 { |
852 if (confirmContext () == 0) | 853 if (confirmContext () == 0) |
853 { | 854 { |
856 RkEndBun (IRCP_context, 1); /* 学習はいつでも行って良いものなのか? */ | 857 RkEndBun (IRCP_context, 1); /* 学習はいつでも行って良いものなのか? */ |
857 return Qt; | 858 return Qt; |
858 } | 859 } |
859 | 860 |
860 DEFUN ("canna-henkan-quit", Fcanna_henkan_quit, 0, 0, 0, /* | 861 DEFUN ("canna-henkan-quit", Fcanna_henkan_quit, 0, 0, 0, /* |
861 変換終了。 | 862 Quit conversion. |
862 */ | 863 */ |
863 ()) | 864 ()) |
864 { | 865 { |
865 if (confirmContext () == 0) | 866 if (confirmContext () == 0) |
866 { | 867 { |
1775 I assume CANNA can handle only Japanese EUC. */ | 1776 I assume CANNA can handle only Japanese EUC. */ |
1776 | 1777 |
1777 /* EUC multibyte string to MULE internal string */ | 1778 /* EUC multibyte string to MULE internal string */ |
1778 | 1779 |
1779 static void | 1780 static void |
1780 c2mu (char *cp, int l, char *mp) | 1781 c2mu (unsigned char *cp, int l, unsigned char *mp) |
1781 { | 1782 { |
1782 char ch, *ep = cp+l; | 1783 unsigned char ch, *ep = cp+l; |
1783 | 1784 |
1784 while ((cp < ep) && (ch = *cp)) | 1785 while ((cp < ep) && (ch = *cp)) |
1785 { | 1786 { |
1786 if ((unsigned char) ch == ISO_CODE_SS2) | 1787 if ((unsigned char) ch == ISO_CODE_SS2) |
1787 { | 1788 { |