comparison src/mule-wnnfns.c @ 134:34a5b81f86ba r20-2b1

Import from CVS: tag r20-2b1
author cvs
date Mon, 13 Aug 2007 09:30:11 +0200
parents e292c9648bb9
children 59463afc5666
comparison
equal deleted inserted replaced
133:b27e67717092 134:34a5b81f86ba
540 { 540 {
541 if ((!wnnfns_buf[snum]) || (!wnnfns_env_rev[snum])) return; 541 if ((!wnnfns_buf[snum]) || (!wnnfns_env_rev[snum])) return;
542 jl_env_set (wnnfns_buf[snum], wnnfns_env_rev[snum]); 542 jl_env_set (wnnfns_buf[snum], wnnfns_env_rev[snum]);
543 wnnfns_norm = 0; 543 wnnfns_norm = 0;
544 } 544 }
545 return Qt;
545 } 546 }
546 547
547 DEFUN ("wnn-server-henkan-begin", Fwnn_begin_henkan, 1, 1, 0, /* 548 DEFUN ("wnn-server-henkan-begin", Fwnn_begin_henkan, 1, 1, 0, /*
548 Translate YOMI string to kanji. Retuen the number of bunsetsu. 549 Translate YOMI string to kanji. Retuen the number of bunsetsu.
549 */ 550 */
2055 } 2056 }
2056 2057
2057 static int 2058 static int
2058 yes_or_no (unsigned char *s) 2059 yes_or_no (unsigned char *s)
2059 { 2060 {
2060 extern Lisp_Object Fy_or_n_p();
2061 unsigned char mbuf[512]; 2061 unsigned char mbuf[512];
2062 unsigned char lb; 2062 unsigned char lb;
2063 int len; 2063 int len;
2064 int snum; 2064 int snum;
2065 if ((snum = check_wnn_server_type ()) == -1) return 0; 2065 if ((snum = check_wnn_server_type ()) == -1) return 0;
2071 /* truncate "(Y/N)" */ 2071 /* truncate "(Y/N)" */
2072 for (len = 0; (mbuf[len]) && (len < 512); len++); 2072 for (len = 0; (mbuf[len]) && (len < 512); len++);
2073 for (; (mbuf[len] != '(') && (len > 0); len--); 2073 for (; (mbuf[len] != '(') && (len > 0); len--);
2074 { 2074 {
2075 Lisp_Object yes, str; 2075 Lisp_Object yes, str;
2076 struct gcpro gcpro1;
2076 2077
2077 str = make_string (mbuf, len); 2078 str = make_string (mbuf, len);
2079 GCPRO1 (str);
2078 yes = call1(Qyes_or_no_p, str); 2080 yes = call1(Qyes_or_no_p, str);
2081 UNGCPRO;
2079 if (NILP (yes)) return 0; 2082 if (NILP (yes)) return 0;
2080 else return (1); 2083 else return (1);
2081 } 2084 }
2082 } 2085 }
2083 2086
2084 static void 2087 static void
2085 puts2 (char *s) 2088 puts2 (char *s)
2086 { 2089 {
2090 #if 0 /* jhod: We don't really need this echoed... */
2087 #if 0 2091 #if 0
2088 Lisp_Object args[1]; 2092 Lisp_Object args[1];
2089 char mbuf[512]; 2093 char mbuf[512];
2090 unsigned char lb; 2094 unsigned char lb;
2091 extern Lisp_Object Fmessage (); 2095 extern Lisp_Object Fmessage ();
2095 c2m (s, mbuf, lb); 2099 c2m (s, mbuf, lb);
2096 args[0] = make_string (mbuf, strlen (mbuf)); 2100 args[0] = make_string (mbuf, strlen (mbuf));
2097 Fmessage (1, args); 2101 Fmessage (1, args);
2098 #else 2102 #else
2099 message("%s",s); 2103 message("%s",s);
2100 #endif 2104 #endif
2105 #endif
2101 } 2106 }
2102 2107
2103 int 2108 int
2104 check_wnn_server_type (void) 2109 check_wnn_server_type (void)
2105 { 2110 {