egg-980217.
[elisp/egg.git] / egg / wnnrpc.el
1 ;;; egg/wnnrpc.el --- WNN Support (low level interface) in Egg
2 ;;;                   Input Method Architecture
3
4 ;; Copyright (C) 1997, 1998 Mule Project, Powered by Electrotechnical
5 ;; Laboratory, JAPAN.
6 ;; Project Leader: Satoru Tomura <tomura@etl.go.jp>
7
8 ;; Author: NIIBE Yutaka <gniibe@mri.co.jp>
9 ;;         KATAYAMA Yoshio <kate@pfu.co.jp> ; Korean, Chinese support.
10 ;;
11 ;; Maintainer: NIIBE Yutaka <gniibe@mri.co.jp>
12
13 ;; This file will be part of GNU Emacs (in future).
14
15 ;; EGG is free software; you can redistribute it and/or modify
16 ;; it under the terms of the GNU General Public License as published by
17 ;; the Free Software Foundation; either version 2, or (at your option)
18 ;; any later version.
19
20 ;; EGG is distributed in the hope that it will be useful,
21 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23 ;; GNU General Public License for more details.
24
25 ;; You should have received a copy of the GNU General Public License
26 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
27 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
28 ;; Boston, MA 02111-1307, USA.
29
30 ;;; Commentary:
31
32 ;;; Code:
33
34 (eval-when-compile
35   (require 'egg-com)
36   ;; (load-library "egg/wnn")
37   (defmacro wnn-const (c)
38     "Macro for WNN constants."
39     (cond ((eq c 'JS_VERSION)             0)
40           ((eq c 'JS_OPEN)                1)
41           ((eq c 'JS_CLOSE)               3)
42           ((eq c 'JS_CONNECT)             5)
43           ((eq c 'JS_DISCONNECT)          6)
44           ((eq c 'JS_ENV_EXIST)           7)
45           ((eq c 'JS_ENV_STICKY)          8)
46           ((eq c 'JS_ENV_UNSTICKY)        9)
47           ((eq c 'JS_KANREN)             17)
48           ((eq c 'JS_KANTAN_SHO)         18)
49           ((eq c 'JS_KANZEN_SHO)         19)
50           ((eq c 'JS_KANTAN_DAI)         20)
51           ((eq c 'JS_KANZEN_DAI)         21)
52           ((eq c 'JS_HINDO_SET)          24)
53           ((eq c 'JS_DIC_ADD)            33)
54           ((eq c 'JS_DIC_DELETE)         34)
55           ((eq c 'JS_DIC_USE)            35)
56           ((eq c 'JS_DIC_LIST)           36)
57           ((eq c 'JS_DIC_INFO)           37)
58           ((eq c 'JS_FUZOKUGO_SET)       41)
59           ((eq c 'JS_FUZOKUGO_GET)       48)
60           ((eq c 'JS_WORD_ADD)           49)
61           ((eq c 'JS_WORD_DELETE)        50)
62           ((eq c 'JS_WORD_SEARCH)        51)
63           ((eq c 'JS_WORD_SEARCH_BY_ENV) 52)
64           ((eq c 'JS_WORD_INFO)          53)
65           ((eq c 'JS_WORD_COMMENT_SET)   54)
66           ((eq c 'JS_PARAM_SET)          65)
67           ((eq c 'JS_PARAM_GET)          66)
68           ((eq c 'JS_MKDIR)              81)
69           ((eq c 'JS_ACCESS)             82)
70           ((eq c 'JS_WHO)                83)
71           ((eq c 'JS_ENV_LIST)           85)
72           ((eq c 'JS_FILE_LIST_ALL)      86)
73           ((eq c 'JS_DIC_LIST_ALL)       87)
74           ((eq c 'JS_FILE_READ)          97)
75           ((eq c 'JS_FILE_WRITE)         98)
76           ((eq c 'JS_FILE_SEND)          99)
77           ((eq c 'JS_FILE_RECEIVE)      100)
78           ((eq c 'JS_HINDO_FILE_CREATE) 101)
79           ((eq c 'JS_DIC_FILE_CREATE)   102)
80           ((eq c 'JS_FILE_REMOVE)       103)
81           ((eq c 'JS_FILE_LIST)         104)
82           ((eq c 'JS_FILE_INFO)         105)
83           ((eq c 'JS_FILE_LOADED)       106)
84           ((eq c 'JS_FILE_LOADED_LOCAL) 107)
85           ((eq c 'JS_FILE_DISCARD)      108)
86           ((eq c 'JS_FILE_COMMENT_SET)  109)
87           ((eq c 'JS_FILE_PASSWORD)     110)
88           ((eq c 'JS_FILE_STAT)         111)
89           ((eq c 'JS_KILL)              112)
90           ((eq c 'JS_HINSI_LIST)        114)
91           ((eq c 'JS_HINSI_NAME)        115)
92           ((eq c 'JS_HINSI_NUMBER)      116)
93           ((eq c 'JS_HINSI_DICTS)       117)
94           ((eq c 'JS_HINSI_TABLE_SET)   118)
95
96           ((eq c 'JLIB_VERSION) 16387)  ; 0x4003
97
98           ((eq c 'WNN_REV_DICT) 3)
99           ((eq c 'WNN_VECT_NO)      -1)
100           ((eq c 'WNN_VECT_BUNSETSU) 2)
101           ((eq c 'WNN_VECT_KANREN) 0)
102           ((eq c 'WNN_VECT_KANZEN) 1)
103           ((eq c 'WNN_VECT_KANTAN) 1)
104           ((eq c 'WNN_MAX_ENV_OF_A_CLIENT) 32)
105           ((eq c 'WNN_MAX_DIC_OF_AN_ENV)   30)
106           ((eq c 'WNN_MAX_FILE_OF_AN_ENV)  60))))
107
108 (defconst wnnrpc-error-message
109   '(("Japanese" .
110      [
111       nil
112       "\e$B%U%!%$%k$,B8:_$7$^$;$s\e(B"
113       nil
114       "\e$B%a%b%j\e(B allocation \e$B$G<:GT$7$^$7$?\e(B"
115       nil
116       "\e$B<-=q$G$O$"$j$^$;$s\e(B"
117       "\e$BIQEY%U%!%$%k$G$O$"$j$^$;$s\e(B"
118       "\e$BIUB08l%U%!%$%k$G$O$"$j$^$;$s\e(B"
119       nil
120       "\e$B<-=q%F!<%V%k$,0lGU$G$9\e(B"
121       "\e$BIQEY%U%!%$%k$,;XDj$5$l$?<-=q$NIQEY%U%!%$%k$G$O$"$j$^$;$s\e(B"
122       nil
123       nil
124       nil
125       nil
126       nil
127       "\e$B%U%!%$%k$,%*!<%W%s$G$-$^$;$s\e(B"
128       "\e$B@5$7$$IQEY%U%!%$%k$G$O$"$j$^$;$s\e(B"
129       "\e$B@5$7$$IUB08l%U%!%$%k$G$O$"$j$^$;$s\e(B"
130       "\e$BIUB08l$N8D?t\e(B, \e$B%Y%/%?D9$5$J$I$,B?2a$.$^$9\e(B"
131       "\e$B$=$NHV9f$N<-=q$O;H$o$l$F$$$^$;$s\e(B"
132       nil
133       nil
134       nil
135       "\e$BIUB08l%U%!%$%k$NFbMF$,@5$7$/$"$j$^$;$s\e(B"
136       "\e$B5?;wIJ;lHV9f$,0[>o$G$9\e(B(hinsi.data \e$B$,@5$7$/$"$j$^$;$s\e(B)"
137       "\e$BL$Dj5A$NIJ;l$,A0C<IJ;l$H$7$FDj5A$5$l$F$$$^$9\e(B"
138       "\e$BIUB08l%U%!%$%k$,FI$_9~$^$l$F$$$^$;$s\e(B"
139       nil
140       nil
141       "\e$B<-=q$N%(%$%s%H%j$,B?2a$.$^$9\e(B"
142       "\e$BJQ49$7$h$&$H$9$kJ8;zNs$,D92a$.$^$9\e(B"
143       "\e$BIUB08l2r@ONN0h$,ITB-$7$F$$$^$9\e(B"
144       nil
145       "\e$B<!8uJdNN0h$,ITB-$7$F$$$^$9\e(B"
146       "\e$B8uJd$,\e(B 1 \e$B$D$b:n$l$^$;$s$G$7$?\e(B"
147       nil
148       nil
149       nil
150       nil
151       "\e$BFI$_$,D92a$.$^$9\e(B"
152       "\e$B4A;z$,D92a$.$^$9\e(B"
153       "\e$B;XDj$5$l$?<-=q$OEPO?2DG=$G$O$"$j$^$;$s\e(B"
154       "\e$BFI$_$ND9$5$,\e(B 0 \e$B$G$9\e(B"
155       "\e$B;XDj$5$l$?<-=q$O5U0z$-2DG=$G$O$"$j$^$;$s\e(B"
156       "\e$B%j!<%I%*%s%j!<$N<-=q$KEPO?\e(B/\e$B:o=|$7$h$&$H$7$^$7$?\e(B"
157       "\e$B4D6-$KB8:_$7$J$$<-=q$KEPO?$7$h$&$H$7$^$7$?\e(B"
158       nil
159       nil
160       "\e$B%j!<%I%*%s%j!<$NIQEY$rJQ99$7$h$&$H$7$^$7$?\e(B"
161       "\e$B;XDj$5$l$?C18l$,B8:_$7$^$;$s\e(B"
162       nil
163       nil
164       nil
165       nil
166       nil
167       nil
168       nil
169       nil
170       nil
171       "\e$B%a%b%j\e(B allocation \e$B$G<:GT$7$^$7$?\e(B"
172       nil
173       nil
174       nil
175       nil
176       nil
177       nil
178       nil
179       "\e$B2?$+$N%(%i!<$,5/$3$j$^$7$?\e(B"
180       "\e$B%P%0$,H/@8$7$F$$$kLOMM$G$9\e(B"
181       "\e$B%5!<%P$,;`$s$G$$$^$9\e(B"
182       "allocation \e$B$K<:GT$7$^$7$?\e(B"
183       "\e$B%5!<%P$H@\B3$G$-$^$;$s$G$7$?\e(B"
184       "\e$BDL?.%W%m%H%3%k$N%P!<%8%g%s$,9g$C$F$$$^$;$s\e(B"
185       "\e$B%/%i%$%"%s%H$N@8@.$7$?4D6-$G$O$"$j$^$;$s\e(B"
186       nil
187       nil
188       nil
189       nil
190       nil
191       "\e$B%G%#%l%/%H%j$r:n$k$3$H$,$G$-$^$;$s\e(B"
192       nil
193       nil
194       nil
195       nil
196       nil
197       nil
198       nil
199       nil
200       nil
201       "\e$B%U%!%$%k$rFI$_9~$`$3$H$,$G$-$^$;$s\e(B"
202       "\e$B%U%!%$%k$r=q$-=P$9$3$H$,$G$-$^$;$s\e(B"
203       "\e$B%/%i%$%"%s%H$NFI$_9~$s$@%U%!%$%k$G$O$"$j$^$;$s\e(B"
204       "\e$B$3$l0J>e%U%!%$%k$rFI$_9~$`$3$H$,$G$-$^$;$s\e(B"
205       "\e$B%Q%9%o!<%I$,4V0c$C$F$$$^$9\e(B"
206       "\e$B%U%!%$%k$,FI$_9~$^$l$F$$$^$9\e(B"
207       "\e$B%U%!%$%k$,:o=|$G$-$^$;$s\e(B"
208       "\e$B%U%!%$%k$,:n@.=PMh$^$;$s\e(B"
209       "WNN \e$B$N%U%!%$%k$G$"$j$^$;$s\e(B"
210       "\e$B%U%!%$%k$N\e(B inode \e$B$H\e(B FILE_UNIQ \e$B$r0lCW$5$;$k;v$,$G$-$^$;$s\e(B"
211       "\e$BIJ;l%U%!%$%k$,Bg$-2a$.$^$9\e(B"
212       "\e$BIJ;l%U%!%$%k$,Bg$-2a$.$^$9\e(B"
213       "\e$BIJ;l%U%!%$%k$,B8:_$7$^$;$s\e(B"
214       "\e$BIJ;l%U%!%$%k$NFbMF$,4V0c$C$F$$$^$9\e(B"
215       nil
216       "\e$BIJ;l%U%!%$%k$,FI$_9~$^$l$F$$$^$;$s\e(B"
217       "\e$BIJ;lL>$,4V0c$C$F$$$^$9\e(B"
218       "\e$BIJ;lHV9f$,4V0c$C$F$$$^$9\e(B"
219       nil
220       "\e$B$=$NA`:n$O%5%]!<%H$5$l$F$$$^$;$s\e(B"
221       "\e$B%Q%9%o!<%I$NF~$C$F$$$k%U%!%$%k$,%*!<%W%s$G$-$^$;$s\e(B"
222       "uumrc \e$B%U%!%$%k$,B8:_$7$^$;$s\e(B"
223       "uumrc \e$B%U%!%$%k$N7A<0$,8m$C$F$$$^$9\e(B"
224       "\e$B$3$l0J>e4D6-$r:n$k$3$H$O$G$-$^$;$s\e(B"
225       "\e$B$3$N%/%i%$%"%s%H$,FI$_9~$s$@%U%!%$%k$G$"$j$^$;$s\e(B"
226       "\e$B<-=q$KIQEY%U%!%$%k$,$D$$$F$$$^$;$s\e(B"
227       "\e$B%Q%9%o!<%I$N%U%!%$%k$,:n@.=PMh$^$;$s\e(B"
228       ])
229     ("Chinese-GB" .
230      [
231       nil
232       "\e$AND<~2;4fTZ\e(B"
233       nil
234       "\e$ADZ4f\e(Balloc\e$AJ'0\\e(B"
235       nil
236       "\e$A2;JGWV5d\e(B"
237       "\e$A2;JGF56HND<~\e(B"
238       "\e$A2;JGND7(ND<~\e(B"
239       nil
240       "\e$AWV5d1m8qBz\e(B"
241       "\e$AF56HND<~#:2;JGV86(5DWV5d5DF56HND<~\e(B"
242       nil
243       nil
244       nil
245       nil
246       nil
247       "\e$AND<~2;D\4r?*\e(B"
248       "\e$A2;JGU}H75DF56HND<~\e(B"
249       "\e$A2;JGU}H75DND7(ND<~\e(B"
250       "\e$A8=JtSo5D8vJ}!"OrA?3$6H5H3,9}\e(B"
251       "\e$AUb8v:EBk5DWV5d!"C;SPJ9SC\e(B"
252       nil
253       nil
254       nil
255       "\e$AND7(ND<~5DDZH]2;U}H7\e(B"
256       "\e$APiDb4JPT:EBkRl3#\e(Bcixing.data\e$A2;U}H7\e(B"
257       "\e$AN46(Re5D4JPT!"6(ReAKG06K4JPT\e(B"
258       "\e$AND7(ND<~2;D\6AH!\e(B"
259       nil
260       nil
261       "\e$AWV5d5DOnJ}3,9}\e(B"
262       "\e$A1d;;:sWV7{4.5D3$6H3,9}\e(B"
263       "\e$A8=JtSo=bNvSr2;9;\e(B"
264       nil
265       "\e$A4N:n29Sr2;9;\e(B"
266       "\e$A:n29\e(B 1\e$A8vR2C;SP\e(B"
267       nil
268       nil
269       nil
270       nil
271       "\e$A6ARt3$6H3,9}\e(B"
272       "\e$A::WV3$6H3,9}\e(B"
273       "\e$AV86(5DWV5d!"2;D\5GB<\e(B"
274       "\e$A6ARt5D3$6HJG\e(B0"
275       "\e$AV86(5DWV5d!"2;D\Df2i\e(B"
276       "\e$AV;6A5DWV5d!"5GB<\e(B/\e$AO{3}AK\e(B"
277       "\e$A;7>3VP2;4fTZ5DWV5d!"5GB<AK\e(B"
278       nil
279       nil
280       "\e$AV;6A5DF56H!"1d8|AK\e(B"
281       "\e$AV86(5D5%WV2;4fTZ\e(B"
282       nil
283       nil
284       nil
285       nil
286       nil
287       nil
288       nil
289       nil
290       nil
291       "\e$ADZ4f\e(Balloc\e$AJ'0\\e(B"
292       nil
293       nil
294       nil
295       nil
296       nil
297       nil
298       nil
299       "\e$ASP3v4m7"Iz\e(B"
300       "\e$A:COsSP#b#u#g7"Iz\e(B"
301       "server\e$AK@AK\e(B"
302       "alloc\e$AJ'0\AK\e(B"
303       "\e$A2;D\:M\e(Bserver\e$AA,=S\e(B"
304       "\e$AM(PE9f3L5D0f1>2;7{\e(B"
305       "\e$A2;JG#c#W#n#nSC;'Iz3I5D;7>3\e(B"
306       nil
307       nil
308       nil
309       nil
310       nil
311       "\e$AWSD?B<2;D\44=(\e(B"
312       nil
313       nil
314       nil
315       nil
316       nil
317       nil
318       nil
319       nil
320       nil
321       "\e$AND<~2;D\6AH!\e(B"
322       "\e$AND<~2;D\P43v\e(B"
323       "\e$A2;JG#c#W#n#nSC;'?I6AH!5DND<~\e(B"
324       "\e$ARTIO5DND<~2;D\6AH!\e(B"
325       "password\e$A2;6T\e(B"
326       "\e$AND<~U}TZ6AH!\e(B"
327       "\e$AND<~2;D\O{3}\e(B"
328       "\e$AND<~C;SP44=(3v@4\e(B"
329       "\e$A2;JG#c#W#n#n5DND<~\e(B"
330       "\e$AND<~5D\e(BI-node\e$A:M\e(BFILE_UNIQ\e$A2;D\R;VB\e(B"
331       "\e$A4JPTND<~L+4s\e(B"
332       "\e$A4JPTND<~L+4s\e(B"
333       "\e$A4JPTND<~2;4fTZ\e(B"
334       "\e$A4JPTND<~5DDZH]2;6T\e(B"
335       nil
336       "\e$A4JPTND<~2;D\6AH!\e(B"
337       "\e$A4JPTC{2;6T\e(B"
338       "\e$A4JPT:EBk2;6T\e(B"
339       nil
340       "\e$AUb8v2YWw2;V'3V\e(B"
341       "password\e$A5DJdHkND<~2;D\4r?*\e(B"
342       "uumrc\e$AND<~2;4fTZ\e(B"
343       "uumrc\e$AND<~5DPNJ=4mNs\e(B"
344       "\e$ARTIO;7>32;D\44=(\e(B"
345       "\e$AUb8v#c#W#n#nSC;'!"6AH!5DND<~C;SP\e(B"
346       "\e$AWV5d5DF56HND<~C;SP\e(B"
347       "password\e$A5DND<~C;SP44=(3v@4\e(B"
348       ])
349     ("Chinese-CNS" .
350      [
351       nil
352       "\e$(GEFG5DbGtGc\e(B"
353       nil
354       "\e$(GDyGt\e(Balloc\e$(GFBZu\e(B"
355       nil
356       "\e$(GDbQRGsL(\e(B"
357       "\e$(GDbQRs"PyEFG5\e(B"
358       "\e$(GDbQREFNNEFG5\e(B"
359       nil
360       "\e$(GGsL(OPV*iH\e(B"
361       "\e$(Gs"PyEFG5!3DbQRQ@LyN{GsL(N{s"PyEFG5\e(B"
362       nil
363       nil
364       nil
365       nil
366       nil
367       "\e$(GEFG5DbWdFTbd\e(B"
368       "\e$(GDbQRF_m}N{s"PyEFG5\e(B"
369       "\e$(GDbQRF_m}N{EFNNEFG5\e(B"
370       "\e$(GOazhk#N{T6m0!#GWbXO[Pya+b>g4\e(B"
371       "\e$(G]UT6f@n#N{GsL(!#JtH4KpFn\e(B"
372       nil
373       nil
374       nil
375       "\e$(GEFNNEFG5N{DyU)DbF_m}\e(B"
376       "\e$(Gapsib$MLf@n#\,Z&\e(Bcixing.data\e$(GDbF_m}\e(B"
377       "\e$(GF\LyexN{b$ML!#LyexD'P)j&b$ML\e(B"
378       "\e$(GEFNNEFG5DbWd{tL=\e(B"
379       nil
380       nil
381       "\e$(GGsL(N{bzm0b>g4\e(B"
382       "\e$(G|H_PG[Gs\JHkN{O[Pyb>g4\e(B"
383       "\e$(GOazhk#fXN5YQDbY\\e(B"
384       nil
385       "\e$(GH9OlfPYQDbY\\e(B"
386       "\e$(GOlfP\e(B 1\e$(GT6D>JtH4\e(B"
387       nil
388       nil
389       nil
390       nil
391       "\e$(G{tSvO[Pyb>g4\e(B"
392       "\e$(GiGGsO[Pyb>g4\e(B"
393       "\e$(GQ@LyN{GsL(!#DbWd`trg\e(B"
394       "\e$(G{tSvN{O[PyQR\e(B0"
395       "\e$(GQ@LyN{GsL(!#DbWdXKQg\e(B"
396       "\e$(GF7{tN{GsL(!#`trg\e(B/\e$(GV<XfD'\e(B"
397       "\e$(Gt?h:DcDbGtGcN{GsL(!#`trgD'\e(B"
398       nil
399       nil
400       "\e$(GF7{tN{s"Py!#|HJUD'\e(B"
401       "\e$(GQ@LyN{^LGsDbGtGc\e(B"
402       nil
403       nil
404       nil
405       nil
406       nil
407       nil
408       nil
409       nil
410       nil
411       "\e$(GDyGt\e(Balloc\e$(GFBZu\e(B"
412       nil
413       nil
414       nil
415       nil
416       nil
417       nil
418       nil
419       "\e$(GH4Exrc`uFm\e(B"
420       "\e$(GGob/H4$\$o$a`uFm\e(B"
421       "server\e$(GH;D'\e(B"
422       "alloc\e$(GFBZuD'\e(B"
423       "\e$(GDbWdLO\e(Bserver\e$(G]YZY\e(B"
424       "\e$(G]WOj]=a#N{NjF[Db\J\e(B"
425       "\e$(GDbQR$]$q$h$hFnEBFmH)N{t?h:\e(B"
426       nil
427       nil
428       nil
429       nil
430       nil
431       "\e$(GDMFxrgDbWd^6Pz\e(B"
432       nil
433       nil
434       nil
435       nil
436       nil
437       nil
438       nil
439       nil
440       nil
441       "\e$(GEFG5DbWd{tL=\e(B"
442       "\e$(GEFG5DbWdlQEx\e(B"
443       "\e$(GDbQR$]$q$h$hFnEBF+{tL=N{EFG5\e(B"
444       "\e$(GEhD8N{EFG5DbWd{tL=\e(B"
445       "password\e$(GDbhW\e(B"
446       "\e$(GEFG5F_Gc{tL=\e(B"
447       "\e$(GEFG5DbWdV<Xf\e(B"
448       "\e$(GEFG5JtH4^6PzExKt\e(B"
449       "\e$(GDbQR$C$W$h$hN{EFG5\e(B"
450       "\e$(GEFG5N{\e(BI-node\e$(GLO\e(BFILE_UNIQ\e$(GDbWdD!S3\e(B"
451       "\e$(Gb$MLEFG5E4DK\e(B"
452       "\e$(Gb$MLEFG5E4DK\e(B"
453       "\e$(Gb$MLEFG5DbGtGc\e(B"
454       "\e$(Gb$MLEFG5N{DyU)DbhW\e(B"
455       nil
456       "\e$(Gb$MLEFG5DbWd{tL=\e(B"
457       "\e$(Gb$MLGXDbhW\e(B"
458       "\e$(Gb$MLf@n#DbhW\e(B"
459       nil
460       "\e$(G]UT6pgI"DbEEQ=\e(B"
461       "password\e$(GN{rSD+EFG5DbWdFTbd\e(B"
462       "cwnnrc\e$(GEFG5DbGtGc\e(B"
463       "cwnnrc\e$(GEFG5N{J0H"rck(\e(B"
464       "\e$(GEhD8t?h:DbWd^6Pz\e(B"
465       "\e$(G]UT6$C$W$h$hFnEB!#{tL=N{EFG5JtH4\e(B"
466       "\e$(GGsL(N{s"PyEFG5JtH4\e(B"
467       "password\e$(GN{EFG5JtH4^6PzExKt\e(B"
468       ])
469     ("Korean" .
470      [
471       nil
472       "\e$(CH-@O@L\e(B \e$(CA8@gGOAv\e(B \e$(C>J=@4O4Y\e(B"
473       nil
474       "\e$(C8^8p8.\e(B alloc \e$(C?!<-\e(B \e$(C=GFPG_@>4O4Y\e(B"
475       nil
476       "\e$(C;g@|@L\e(B \e$(C>F4U4O4Y\e(B"
477       "\e$(C:s55\e(B \e$(CH-@O@L\e(B \e$(C>F4U4O4Y\e(B"
478       "\e$(C:N<S>n\e(B \e$(CH-@O@L\e(B \e$(C>F4U4O4Y\e(B"
479       nil
480       "\e$(C;g@|\e(B \e$(CEW@L:m@L\e(B \e$(C2K\e(B \e$(CC!@>4O4Y\e(B"
481       "\e$(CAvA$5H\e(B \e$(C;g@|@G\e(B \e$(C:s55\e(B \e$(CH-@O@L\e(B \e$(C>F4U4O4Y\e(B"
482       nil
483       nil
484       nil
485       nil
486       nil
487       "\e$(CH-@O@;\e(B \e$(C?-\e(B \e$(C<v\e(B \e$(C>x@>4O4Y\e(B"
488       "\e$(C8B4B\e(B \e$(C:s55\e(B \e$(CH-@O@L\e(B \e$(C>F4U4O4Y\e(B"
489       "\e$(C8B4B\e(B \e$(C:N<S>n\e(B \e$(CH-@O@L\e(B \e$(C>F4U4O4Y\e(B"
490       "\e$(C:N<S>n@G\e(B \e$(C09<v0!\e(B \e$(C3J9+\e(B \e$(C890E3*\e(B \e$(C:$EM@G\e(B \e$(C1f@L0!\e(B \e$(C3J9+\e(B \e$(C1i4O4Y\e(B"
491       "\e$(C1W\e(B \e$(C9xH#@G\e(B \e$(C;g@|@:\e(B \e$(C;g?k5G0m\e(B \e$(C@VAv\e(B \e$(C>J=@4O4Y\e(B"
492       nil
493       nil
494       nil
495       "\e$(C:N<S>n\e(B \e$(CH-@O@G\e(B \e$(C3;?k@L\e(B \e$(C8BAv\e(B \e$(C>J=@4O4Y\e(B"
496       "\e$(C0!;s\e(B \e$(CG0;g@G\e(B \e$(C9xH#0!\e(B \e$(CF2834O4Y\e(B. hinsi.data \e$(C0!\e(B \e$(C8BAv\e(B \e$(C>J=@4O4Y\e(B"
497       "\e$(C9LA$@G@G\e(B \e$(CG0;g0!\e(B \e$(C@|4\\e(B \e$(CG0;g7N\e(B \e$(CA$@G5G>n\e(B \e$(C@V=@4O4Y\e(B"
498       "\e$(C:N<S>n\e(B \e$(CH-@O@L\e(B \e$(C@PGtA.\e(B \e$(C@VAv\e(B \e$(C>J=@4O4Y\e(B"
499       nil
500       nil
501       "\e$(C;g@|@G\e(B \e$(C?#F.8.0!\e(B \e$(C3J9+\e(B \e$(C89=@4O4Y\e(B"
502       "\e$(C:/H/GO7A4B\e(B \e$(C9.@Z?-@L\e(B \e$(C3J9+\e(B \e$(C1i4O4Y\e(B"
503       "\e$(C:N<S>n\e(B \e$(CGX<.\e(B \e$(C?5?*@L\e(B \e$(C:NA7GU4O4Y\e(B"
504       nil
505       "\e$(C4Y@=\e(B \e$(CHD:8\e(B \e$(C?5?*@L\e(B \e$(C:NA7GU4O4Y\e(B"
506       "\e$(CHD:80!\e(B \e$(C>x@>4O4Y\e(B"
507       nil
508       nil
509       nil
510       nil
511       "\e$(CGQ1[@L\e(B \e$(C3J9+\e(B \e$(C1i4O4Y\e(B"
512       "\e$(CGQ@Z0!\e(B \e$(C3J9+\e(B \e$(C1i4O4Y\e(B"
513       "\e$(CAvA$5H\e(B \e$(C;g@|@:\e(B \e$(C5n7O\e(B \e$(C:R0!4I@T4O4Y\e(B"
514       "\e$(CGQ1[@G\e(B \e$(C1f@L0!\e(B 0 \e$(C@T4O4Y\e(B"
515       "\e$(CAvA$5H\e(B \e$(C;g@|@:\e(B \e$(C?*B|A6\e(B \e$(C:R0!4I@T4O4Y\e(B"
516       "\e$(C@P1b@|?k\e(B \e$(C;g@|?!\e(B \e$(C5n7O\e(B/\e$(C<R0E\e(B \e$(CGO7A0m\e(B \e$(CG_@>4O4Y\e(B"
517       "\e$(CA8@gGOAv\e(B \e$(C>J4B\e(B \e$(C;g@|?!\e(B \e$(C5n7O\e(B \e$(CGO7A0m\e(B \e$(CG_@>4O4Y\e(B"
518       nil
519       nil
520       "\e$(C@P1b@|?k\e(B \e$(C:s558&\e(B \e$(C0f=E\e(B \e$(CGO7A0m\e(B \e$(CG_@>4O4Y\e(B"
521       "\e$(CAvA$5H\e(B \e$(C4\>n4B\e(B \e$(CA8@gGOAv\e(B \e$(C>J=@4O4Y\e(B"
522       nil
523       nil
524       nil
525       nil
526       nil
527       nil
528       nil
529       nil
530       nil
531       "\e$(C8^8p8.\e(B alloc \e$(C?!\e(B \e$(C=GFPG_@>4O4Y\e(B"
532       nil
533       nil
534       nil
535       nil
536       nil
537       nil
538       nil
539       "\e$(C?!7/0!\e(B \e$(C9_;}G_@>4O4Y\e(B"
540       "\e$(C9v1W\e(B(Bug)\e$(C0!\e(B \e$(C9_;}G_@>4O4Y\e(B"
541       "\e$(C<-9v\e(B(Server)\e$(C0!\e(B \e$(CAW>n\e(B \e$(C@V@>4O4Y\e(B"
542       "alloc\e$(C?!\e(B \e$(C=GFPG_@>4O4Y\e(B"
543       "\e$(C<-9v\e(B(Server) \e$(C?M\e(B \e$(CA"CKGR\e(B \e$(C<v\e(B \e$(C>x@>4O4Y\e(B"
544       "\e$(CEk=E\e(B \e$(CGA7NEdD]@G\e(B \e$(C9vA/@L\e(B \e$(C8BAv\e(B \e$(C>J=@4O4Y\e(B"
545       "\e$(CE,6s@L>HF.0!\e(B \e$(C;}<:GQ\e(B \e$(CH/0f@L\e(B \e$(C>F4U4O4Y\e(B"
546       nil
547       nil
548       nil
549       nil
550       nil
551       "\e$(C5p7:Ed8.8&\e(B \e$(C885i\e(B \e$(C<v\e(B \e$(C>x@>4O4Y\e(B"
552       nil
553       nil
554       nil
555       nil
556       nil
557       nil
558       nil
559       nil
560       nil
561       "\e$(CH-@O\e(B \e$(C@P1b?!\e(B \e$(C=GFPG_@>4O4Y\e(B"
562       "\e$(CH-@O\e(B \e$(C>21b?!\e(B \e$(C=GFPG_@>4O4Y\e(B"
563       "\e$(CE,6s@L>HF.0!\e(B \e$(C@P>n\e(B \e$(C5e80\e(B \e$(CH-@O@L\e(B \e$(C>F4U4O4Y\e(B"
564       "\e$(C4u\e(B \e$(C@L;s@G\e(B \e$(CH-@O@;\e(B \e$(C@P>n\e(B \e$(C5e81\e(B \e$(C<v\e(B \e$(C>x@>4O4Y\e(B"
565       "\e$(CFP=:?v5e0!\e(B \e$(CF2834O4Y\e(B"
566       "\e$(CH-@O@L\e(B \e$(C@PGtA.\e(B \e$(C@V@>4O4Y\e(B"
567       "\e$(CH-@O@;\e(B \e$(C<R0EGR\e(B \e$(C<v\e(B \e$(C>x@>4O4Y\e(B"
568       "\e$(CH-@O@;\e(B \e$(C@[<:GR\e(B \e$(C<v\e(B \e$(C>x@>4O4Y\e(B"
569       "kWnn\e$(C@G\e(B \e$(CH-@O@L\e(B \e$(C>F4U4O4Y\e(B"
570       "\e$(CH-@O@G\e(B I-node \e$(C?M\e(B FILE_UNIQ \e$(C8&\e(B \e$(C@OD!=CE3\e(B \e$(C<v\e(B \e$(C>x@>4O4Y\e(B"
571       "\e$(CG0;g\e(B \e$(CH-@O@G\e(B \e$(CE)1b0!\e(B \e$(C3J9+\e(B \e$(CE.4O4Y\e(B"
572       "\e$(CG0;g\e(B \e$(CH-@O@G\e(B \e$(CE)1b0!\e(B \e$(C3J9+\e(B \e$(CE.4O4Y\e(B"
573       "\e$(CG0;g\e(B \e$(CH-@O@L\e(B \e$(CA8@gGOAv\e(B \e$(C>J=@4O4Y\e(B"
574       "\e$(CG0;g\e(B \e$(CH-@O@G\e(B \e$(C3;?k@L\e(B \e$(CF2834O4Y\e(B"
575       nil
576       "\e$(CG0;g\e(B \e$(CH-@O@L\e(B \e$(C@PGtA.\e(B \e$(C@VAv\e(B \e$(C>J=@4O4Y\e(B"
577       "\e$(CG0;g\e(B \e$(C@L8'@L\e(B \e$(CF2834O4Y\e(B"
578       "\e$(CG0;g\e(B \e$(C9xH#0!\e(B \e$(CF2834O4Y\e(B"
579       nil
580       "\e$(C1W\e(B \e$(CA6@[@:\e(B \e$(CAv?x5GAv\e(B \e$(C>J=@4O4Y\e(B"
581       "\e$(CFP=:?v5e0!\e(B \e$(C5i>n@V4B\e(B \e$(CH-@O@;\e(B \e$(C?-\e(B \e$(C<v\e(B \e$(C>x@>4O4Y\e(B"
582       "uumrc \e$(C@L\e(B \e$(CA8@gGOAv\e(B \e$(C>J=@4O4Y\e(B"
583       "uumrc \e$(C@G\e(B \e$(CG|=D@L\e(B \e$(CF2834O4Y\e(B"
584       "\e$(C@L\e(B \e$(C@L;s\e(B \e$(CH/0f@;\e(B \e$(C@[<:GR\e(B \e$(C<v\e(B \e$(C>x@>4O4Y\e(B"
585       "\e$(CE)6s@L>HF.0!\e(B \e$(C@P>n\e(B \e$(C5e80\e(B \e$(CH-@O@L\e(B \e$(C>F4U4O4Y\e(B"
586       "\e$(C;g@|?!\e(B \e$(C:s55\e(B \e$(CH-@O@L\e(B \e$(CA8@gGOAv\e(B \e$(C>J=@4O4Y\e(B"
587       "\e$(CFP=:?v5e\e(B \e$(CH-@O@;\e(B \e$(C@[<:GR\e(B \e$(C<v\e(B \e$(C>x@>4O4Y\e(B"
588       ]))
589   "Array of WNN error messages.  Indexed by error code.")
590
591 (defun wnnrpc-get-error-message (errno)
592   "Return error message string specified by ERRNO."
593   (let ((msg (or (assoc egg-default-language wnnrpc-error-message)
594                  (assoc its-current-language wnnrpc-error-message)
595                  (assoc "Japanese" wnnrpc-error-message))))
596     (or (aref (cdr msg) errno) (format "#%d" errno))))
597
598 (defmacro wnnrpc-call-with-environment (e vlist send-expr &rest receive-exprs)
599   (let ((v (append
600             `((proc (wnnenv-get-proc ,e))
601               (env-id (wnnenv-get-env-id ,e))
602               (egg-zhuyin its-zhuyin))
603             vlist)))
604     (list
605      'let v
606      (append
607         `(save-excursion
608            (set-buffer (process-buffer proc))
609            (erase-buffer)
610            ,send-expr
611            (process-send-region proc (point-min) (point-max))
612            (goto-char (prog1 (point) (accept-process-output proc))))
613         receive-exprs))))
614
615 (defsubst wnnrpc-test-result-and-get-error (proc result)
616   (if (< result 0)                      ; Get error # (XXX: Bad protocol)
617       (let (error)
618         (comm-unpack (u) error)
619         (- error))
620     result))
621 \f
622 (defun wnnrpc-open (proc myhostname username)
623   "Open the session.  Return 0 on success, error code on failure."
624   (comm-call-with-proc proc (result)
625     (comm-format (u u s s)
626                  (wnn-const JS_OPEN)
627                  (wnn-const JLIB_VERSION)
628                  myhostname username)
629     (comm-unpack (u) result)
630     (wnnrpc-test-result-and-get-error proc result)))
631
632 (defun wnnrpc-connect (proc envname)
633   "Establish new `connection' and make an environment.
634 Return the identitifation of the environment on success, 
635 negate-encoded error code on failure."
636   (comm-call-with-proc proc (result)
637     (comm-format (u s) (wnn-const JS_CONNECT) envname)
638     (comm-unpack (u) result)
639     (wnnrpc-test-result-and-get-error proc result)))
640
641 (defun wnnrpc-open-file (proc env-id filename)
642   "Open the file FILENAME on the environment ENV-ID on server process PROC.
643 Return file descripter on success, negate-encoded error code on failure."
644   (comm-call-with-proc proc (result)
645     (comm-format (u u s) (wnn-const JS_FILE_READ) env-id filename)
646     (comm-unpack (u) result)
647     (wnnrpc-test-result-and-get-error proc result)))
648
649 (defun wnnrpc-set-fuzokugo-file (proc env-id fid)
650   "For PROC, on environment ENV-ID, 
651 Set Fuzokugo file specified by FID.
652 Return 0 on success, negate-encoded error code on failure."
653   (comm-call-with-proc proc (result)
654     (comm-format (u u i) (wnn-const JS_FUZOKUGO_SET) env-id fid)
655     (comm-unpack (u) result)
656     (wnnrpc-test-result-and-get-error proc result)))
657
658 (defun wnnrpc-set-dictionary (proc env-id rev dic freq pri dic-mode freq-mode)
659   "Set dictionary on server.
660 Return 0 on success, negate-encoded error code on faiulure."
661   (comm-call-with-proc proc (result)
662     (comm-format (u u i i i u u s s u) (wnn-const JS_DIC_ADD)
663                  env-id dic freq pri
664                  (if dic-mode 0 1)
665                  (if freq-mode 0 1)
666                  "" ""          ; XXX: No password
667                  (if rev 1 0))
668     (comm-unpack (u) result)
669     (wnnrpc-test-result-and-get-error proc result)))
670
671 (defun wnnrpc-version (proc)
672   "Return the version number of WNN server."
673   (comm-call-with-proc proc (result)
674     (comm-format (u) (wnn-const JS_VERSION))
675     (comm-unpack (u) result)
676     result))
677
678 (defun wnnrpc-access (proc env-id mode path) 
679   "On the server connected by PROC, check the accessibility of file in
680 the environment ENV-ID.  Return 0 when the remote file
681 (dictionary/frequency) of PATH can be accessed in mode MODE.  Return
682 Non-zero otherwise."
683   (comm-call-with-proc proc (result)
684     (comm-format (u u u s) (wnn-const JS_ACCESS) env-id mode path)
685     (comm-unpack (u) result)
686     result))
687
688 (defun wnnrpc-mkdir (proc env-id path)
689   "Create directory specified by PATH."
690   (comm-call-with-proc proc (result)
691     (comm-format (u u s) (wnn-const JS_MKDIR) env-id path)
692     (comm-unpack (u) result)
693     (wnnrpc-test-result-and-get-error proc result)))
694
695 (defun wnnrpc-create-dictionary (proc env-id dicname)
696   "Create dictionary on server."
697   (comm-call-with-proc proc (result)
698     (comm-format (u u s S s s u) (wnn-const JS_DIC_FILE_CREATE)
699                  env-id dicname ""      ; XXX: No comment
700                  "" ""          ; XXX: No passwd
701                  (wnn-const WNN_REV_DICT))
702     (comm-unpack (u) result)
703     (wnnrpc-test-result-and-get-error proc result)))
704
705 (defun wnnrpc-create-frequency (proc env-id freqname dictionary)
706   "Create frequency file on server."
707   (comm-call-with-proc proc (result)
708     (comm-format (u u u s S s) (wnn-const JS_HINDO_FILE_CREATE)
709                  env-id dictionary freqname "" ; XXX: No comment
710                  "")                    ; XXX: No password
711     (comm-unpack (u) result)
712     (wnnrpc-test-result-and-get-error proc result)))
713
714 (defun wnnrpc-discard-file (proc env-id fid)
715   "Discard a file specified by FID.  Call this for already-opened file
716 before remove and create new file."
717   (comm-call-with-proc proc (result)
718     (comm-format (u u u) (wnn-const JS_FILE_DISCARD)
719                  env-id fid)
720     (comm-unpack (u) result)
721     (wnnrpc-test-result-and-get-error proc result)))
722
723 (defun wnnrpc-remove-file (proc filename)
724   "Remove the file."
725   (comm-call-with-proc proc (result)
726     (comm-format (u s s) (wnn-const JS_FILE_REMOVE) filename "") ; No passwd
727     (comm-unpack (u) result)
728     (wnnrpc-test-result-and-get-error proc result)))
729
730 (defun wnnrpc-set-conversion-parameters (proc env-id v)
731   "Set conversion parameters."
732   (comm-call-with-proc proc (result)
733     (comm-format  (u u i i i i i i i i i i i i i i i i i)
734                   (wnn-const JS_PARAM_SET)
735                   env-id
736                   (aref v  0) (aref v  1) (aref v  2) (aref v  3)
737                   (aref v  4) (aref v  5) (aref v  6) (aref v  7)
738                   (aref v  8) (aref v  9) (aref v 10) (aref v 11)
739                   (aref v 12) (aref v 13) (aref v 14) (aref v 15)
740                   (aref v 16) (aref v 17))
741     (comm-unpack (u) result)
742     (wnnrpc-test-result-and-get-error proc result)))
743
744 (defsubst wnnrpc-receive-sho-bunsetsu-list-sub (e proc number-of-sho-bunsetsu)
745   (let ((i 0)
746         slist
747         end start jiritsugo-end dic-no entry freq right-now
748         hinshi status status-backward kangovect evaluation)
749     (while (< i number-of-sho-bunsetsu)
750       (comm-unpack (u u u u u u u u u u u u)
751                    end start jiritsugo-end dic-no entry freq right-now
752                    hinshi status status-backward kangovect evaluation)
753       (setq slist
754             (cons
755              (wnn-bunsetsu-create e
756               end start jiritsugo-end dic-no entry freq right-now
757               hinshi status status-backward kangovect evaluation)
758              slist))
759       (setq i (1+ i)))
760     (reverse slist)))
761
762 (defsubst wnnrpc-receive-sho-bunsetsu-list-sub-2 (proc slist)
763   (let ((l slist)
764         result origin fuzokugo b)
765     (while l
766       (setq b (car l))
767       (comm-unpack (S S S) result origin fuzokugo)
768       (wnn-bunsetsu-set-converted b result)
769       (wnn-bunsetsu-set-yomi b origin)
770       (wnn-bunsetsu-set-fuzokugo b fuzokugo)
771       (setq l (cdr l)))
772     slist))
773
774 (defun wnnrpc-receive-sho-bunsetsu-list (e proc number-of-sho-bunsetsu)
775   (let ((slist (wnnrpc-receive-sho-bunsetsu-list-sub e proc
776                                                      number-of-sho-bunsetsu)))
777     (wnnrpc-receive-sho-bunsetsu-list-sub-2 proc slist)))
778
779 (defun wnnrpc-renbunsetsu-conversion (e yomi hinshi fuzoku &optional v)
780   "Convert YOMI string into Kanji.
781 HINSHI and FUZOKU are information of preceding bunsetsu."
782   (let (v0 v1)
783     (if v
784         (setq v0 v
785               v1 (wnn-const WNN_VECT_KANREN))
786       (setq v0 (wnn-const WNN_VECT_KANREN)
787             v1 (wnn-const WNN_VECT_NO)))
788     (wnnrpc-call-with-environment e (number-of-dai-bunsetsu kanji-length error
789                                      number-of-sho-bunsetsu dlist)
790       (comm-format (u u S i S i i i) (wnn-const JS_KANREN)
791                    env-id yomi hinshi fuzoku v0 v1
792                    (wnn-const WNN_VECT_BUNSETSU))
793       (comm-unpack (u) number-of-dai-bunsetsu)
794       (if (< number-of-dai-bunsetsu 0)
795           (let (error)
796             (comm-unpack (u) error)
797             (error "WNN Error on renbunsetsu conversion: %s"
798                    (wnnrpc-get-error-message error)))
799         (comm-unpack (u u) number-of-sho-bunsetsu kanji-length)
800         (setq dlist (cons nil nil))
801         (let ((i 0)
802               (d dlist)
803               end start count evaluation)
804           (catch 'break
805             (while t
806               (comm-unpack (u u u u) end start count evaluation)
807               (setcar d (vector end start count evaluation))
808               (if (< (setq i (1+ i)) number-of-dai-bunsetsu)
809                   (setq d (setcdr d (cons nil nil)))
810                 (throw 'break nil))))
811           (cons dlist
812                 (wnnrpc-receive-sho-bunsetsu-list e proc
813                                                   number-of-sho-bunsetsu)))))))
814
815 (defun wnnrpc-get-bunsetsu-candidates (e yomi hinshi fuzoku &optional v)
816   ""
817   (let (v0 v1)
818     (if v
819         (setq v0 v
820               v1 (wnn-const WNN_VECT_KANZEN))
821       (setq v0 (wnn-const WNN_VECT_KANZEN)
822             v1 (wnn-const WNN_VECT_NO)))
823     (wnnrpc-call-with-environment e (number-of-sho-bunsetsu kanji-length slist)
824       (comm-format (u u S i S i i) (wnn-const JS_KANZEN_SHO)
825                      env-id yomi hinshi fuzoku v0 v1)
826       (comm-unpack (u) number-of-sho-bunsetsu)
827       (if (< number-of-sho-bunsetsu 0)
828           (let (error)
829             (comm-unpack (u) error)
830             (error "WNN Error on getting candidates: %s"
831                    (wnnrpc-get-error-message error)))
832         (comm-unpack (u) kanji-length)
833         (wnnrpc-receive-sho-bunsetsu-list e proc number-of-sho-bunsetsu)))))
834
835 (defun wnnrpc-tanbunsetsu-conversion (e yomi hinshi fuzoku &optional v)
836   ""
837   (let (v0 v1)
838     (if v
839         (setq v0 v
840               v1 (wnn-const WNN_VECT_KANTAN))
841       (setq v0 (wnn-const WNN_VECT_KANTAN)
842             v1 (wnn-const WNN_VECT_NO)))
843     (wnnrpc-call-with-environment e (number-of-sho-bunsetsu kanji-length slist)
844       (comm-format (u u S i S i i) (wnn-const JS_KANTAN_SHO)
845                      env-id yomi hinshi fuzoku v0 v1)
846       (comm-unpack (u) number-of-sho-bunsetsu)
847       (if (< number-of-sho-bunsetsu 0)  ; Get error # (XXX: Bad protocol)
848           (let (error)
849             (comm-unpack (u) error)
850             (error "WNN Error on tanbunsetsu conversion: %s"
851                    (wnnrpc-get-error-message error)))
852         (comm-unpack (u) kanji-length)
853         (wnnrpc-receive-sho-bunsetsu-list e proc number-of-sho-bunsetsu)))))
854
855 (defun wnnrpc-set-frequency (e dicno entry ima hindo)
856   ""
857   (wnnrpc-call-with-environment e (result)
858     (comm-format (u u i i i i) (wnn-const JS_HINDO_SET)
859                  env-id dicno entry ima hindo)
860     (comm-unpack (u) result)
861     (wnnrpc-test-result-and-get-error proc result)))
862
863 (defun wnnrpc-close (proc)
864   ""
865   (comm-call-with-proc proc (result)
866     (comm-format (u) (wnn-const JS_CLOSE))
867     (comm-unpack (u) result)
868     (wnnrpc-test-result-and-get-error proc result)))
869
870 (defun wnnrpc-env-exist (proc envname)
871   ""
872   (comm-call-with-proc proc (result)
873     (comm-format (u s) (wnn-const JS_ENV_EXIST) envname)
874     (comm-unpack (u) result)
875     result))
876
877 (defun wnnrpc-make-env-sticky (e)
878   ""
879   (wnnrpc-call-with-environment e (result)
880     (comm-format (u u) (wnn-const JS_ENV_STICKY) env-id)
881     (comm-unpack (u) result)
882     (wnnrpc-test-result-and-get-error proc result)))
883
884 (defun wnnrpc-make-env-unsticky (e)
885   ""
886   (wnnrpc-call-with-environment e (result)
887     (comm-format (u u) (wnn-const JS_ENV_UNSTICKY) env-id)
888     (comm-unpack (u) result)
889     (wnnrpc-test-result-and-get-error proc result)))
890
891 (defun wnnrpc-disconnect (e)
892   ""
893   (wnnrpc-call-with-environment e (result)
894     (comm-format (u u) (wnn-const JS_DISCONNECT) env-id)
895     (comm-unpack (u) result)
896     (wnnrpc-test-result-and-get-error proc result)))
897
898 (defun wnnrpc-add-word (e dictionary yomi kanji comment hinshi initial-freq)
899   ""
900   (wnnrpc-call-with-environment e (result)
901     (comm-format (u u u S S S u u) (wnn-const JS_WORD_ADD)
902                  env-id
903                  dictionary yomi kanji comment
904                  hinshi initial-freq)
905     (comm-unpack (u) result)
906     (wnnrpc-test-result-and-get-error proc result)))
907
908 (defun wnnrpc-get-dictionary-list-with-environment (e)
909   ""
910   (wnnrpc-call-with-environment e (number-of-dic)
911     (comm-format (u u) (wnn-const JS_DIC_LIST) env-id)
912     (comm-unpack (u) number-of-dic)
913     (if (< number-of-dic 0)
914         (let (error)                    ; XXX js.c is correct?
915           (comm-unpack (u) error)
916           (error "WNN Error on listing dictionaries: %s"
917                  (wnnrpc-get-error-message error)))
918       (wnnrpc-receive-dictionary-list proc number-of-dic))))
919
920 (defun wnnrpc-receive-dictionary-list (proc number-of-dic)
921   (let (dic-entry dic freq dic-mode freq-mode enable-flag nice
922         rev comment dicname freqname dic-passwd freq-passwd
923         type gosuu dic-local-flag freq-local-flag)
924     (if (= number-of-dic 0)
925         nil
926       (comm-unpack (u u u u u u u u S s s s s u u u u)
927                    dic-entry dic freq dic-mode freq-mode enable-flag nice
928                    rev comment dicname freqname dic-passwd freq-passwd
929                    type gosuu dic-local-flag freq-local-flag)
930       (cons 
931        (vector dic-entry dic freq dic-mode freq-mode enable-flag nice
932                rev comment dicname freqname dic-passwd freq-passwd
933                type gosuu dic-local-flag freq-local-flag)
934        (wnnrpc-receive-dictionary-list proc (1- number-of-dic))))))
935
936 (defsubst wnndic-get-id (dic)
937   (aref dic 0))
938
939 (defsubst wnndic-get-comment (dic)
940   (aref dic 8))
941
942 (defsubst wnndic-get-dictname (dic)
943   (aref dic 9))
944
945 (defun wnnrpc-get-writable-dictionary-id-list (e)
946   ""
947   (wnnrpc-call-with-environment e (number-of-dic result)
948     (comm-format (u u i) (wnn-const JS_HINSI_DICTS) env-id -1)
949     (comm-unpack (u) number-of-dic)
950     (if (> number-of-dic 0)
951         (let ((l (cons nil nil))
952               (i 0)
953               dic)
954           (setq result l)
955           (catch 'break
956             (while t
957               (comm-unpack (u) dic)
958               (setcar l dic)
959               (if (< (setq i (1+ i)) number-of-dic)
960                   (setq l (setcdr l (cons nil nil)))
961                 (throw 'break nil))))
962           result)
963       (if (= number-of-dic 0)
964           nil
965         (let (error)
966           (comm-unpack (u) error)
967           (error "WNN Error on listing dictionaries: %s"
968                  (wnnrpc-get-error-message error)))))))
969
970 (defun wnnrpc-get-hinshi-list (e dic name)
971   ""
972   (wnnrpc-call-with-environment e (number-of-hinshi size result)
973     (comm-format (u u u S) (wnn-const JS_HINSI_LIST) env-id dic name)
974     (comm-unpack (u u) number-of-hinshi size)
975     (if (> number-of-hinshi 0)
976         (let ((l (cons nil nil))
977               (i 0)
978               hinshi)
979           (setq result l)
980           (catch 'break
981             (while t
982               (comm-unpack (S) hinshi)
983               (setcar l hinshi)
984               (if (< (setq i (1+ i)) number-of-hinshi)
985                   (setq l (setcdr l (cons nil nil)))
986                 (throw 'break nil))))
987           result)
988       (if (= number-of-hinshi 0)
989           nil
990         (let (error)
991           (comm-unpack (u) error)
992           (error "WNN Error on listing HINSHI: %s"
993                  (wnnrpc-get-error-message error)))))))
994
995 (defun wnnrpc-hinshi-number (proc name)
996   ""
997   (comm-call-with-proc proc (result)
998     (comm-format (u S) (wnn-const JS_HINSI_NUMBER) name)
999     (comm-unpack (u) result)
1000     (wnnrpc-test-result-and-get-error proc result)))
1001
1002 (defun wnnrpc-get-conversion-parameters (e)
1003   ""
1004   (wnnrpc-call-with-environment e (result
1005                                    n nsho p1 p2 p3 p4 p5 p6 p7 p8 p9
1006                                    p10 p11 p12 p13 p14 p15)
1007     (comm-format (u u) (wnn-const JS_PARAM_GET) env-id)
1008     (comm-unpack (u) result)
1009     (if (< result 0)
1010         (let (error)
1011           (comm-unpack (u) error)
1012           (- error))
1013       (comm-unpack  (u u u u u  u u u u u  u u u u u u u)
1014                     n nsho p1 p2 p3 p4 p5 p6 p7 p8 p9
1015                     p10 p11 p12 p13 p14 p15)
1016       (vector n nsho p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15))))
1017
1018 (defun wnnrpc-file-loaded (proc path)
1019   ""
1020   (comm-call-with-proc proc (result)
1021     (comm-format (u s) (wnn-const JS_FILE_LOADED) path)
1022     (comm-unpack (u) result)
1023     result))
1024
1025 (defun wnnrpc-write-file (e fid filename)
1026   (wnnrpc-call-with-environment e (result)
1027     (comm-format (u u u s) (wnn-const JS_FILE_WRITE) env-id fid filename)
1028     (comm-unpack (u) result)
1029     (wnnrpc-test-result-and-get-error proc result)))
1030
1031 (defun wnnrpc-get-fuzokugo-file (e)
1032   ""
1033   (wnnrpc-call-with-environment e (result)
1034     (comm-format (u u u) (wnn-const JS_FUZOKUGO_GET) env-id)
1035     (comm-unpack (u) result)
1036     (wnnrpc-test-result-and-get-error proc result)))
1037
1038 (defsubst wnnrpc-receive-file-list (proc)
1039   (let ((i 0)
1040         flist
1041         number-of-files fid local-flag ref-count type name)
1042     (comm-unpack (u) number-of-files)
1043     (if (< number-of-files 0)
1044         (error "WNN: wnnrpc-receive-file-list")
1045       (while (< i number-of-files)
1046         (comm-unpack (u u u u s) fid local-flag ref-count type name)
1047         (setq flist (cons (vector fid local-flag ref-count type name) flist))
1048         (setq i (1+ i)))
1049       flist)))
1050
1051 (defun wnnrpc-get-file-list (proc)
1052   ""
1053   (comm-call-with-proc proc (result)
1054     (comm-format (u) (wnn-const JS_FILE_LIST_ALL))
1055     (wnnrpc-receive-file-list proc)))
1056
1057 (defun wnnrpc-get-file-list-with-env (e)
1058   ""
1059   (wnnrpc-call-with-environment e (result)
1060     (comm-format (u u) (wnn-const JS_FILE_LIST) env-id)
1061     (wnnrpc-receive-file-list proc)))
1062
1063 (defun wnnrpc-file-attribute (e path)
1064   "3: dictionary, 4: hindo file, 5: fuzokugo-file"
1065   (wnnrpc-call-with-environment e (result)
1066     (comm-format (u u s) (wnn-const JS_FILE_STAT) env-id path)
1067     (comm-unpack (u) result)
1068     (wnnrpc-test-result-and-get-error proc result)))
1069
1070 (defun wnnrpc-get-file-info (e fid)
1071   ""
1072   (wnnrpc-call-with-environment e (result name local-flag ref-count type)
1073     (comm-format (u u u) (wnn-const JS_FILE_INFO) env-id fid)
1074     (comm-unpack (u) result)
1075     (if (< result 0)
1076         (let (error)
1077           (comm-unpack (u) error)
1078           (- error))
1079       (comm-unpack (s u u u) name local-flag ref-count type)
1080       (vector name local-flag ref-count type))))
1081
1082 (defun wnnrpc-who (proc)
1083   ""
1084   (comm-call-with-proc proc (number-of-entry w)
1085     (comm-format (u) (wnn-const JS_WHO))
1086     (comm-unpack (u) number-of-entry)
1087     (if (< number-of-entry 0)
1088         (let (error)
1089           (comm-unpack (u) error)
1090           (- error))
1091       (let ((i 0)
1092             sd username hostname e-array)
1093         (while (< i number-of-entry)
1094           (comm-unpack (u s s) sd username hostname)
1095           (setq e-array (make-vector 32 nil))
1096           (let ((j 0) e)
1097             (while (< j (wnn-const WNN_MAX_ENV_OF_A_CLIENT))
1098               (comm-unpack (u) e)
1099               (aset e-array j e)
1100               (setq j (1+ j))))
1101           (setq w (cons (vector sd username hostname e-array) w))
1102           (setq i (1+ i)))
1103         (reverse w)))))
1104
1105 (defun wnnrpc-get-env-list (proc)
1106   (comm-call-with-proc proc (number-of-entry l)
1107     (comm-format (u) (wnn-const JS_ENV_LIST))
1108     (comm-unpack (u) number-of-entry)
1109     (if (< number-of-entry 0)
1110         (let (error)
1111           (comm-unpack (u) error)
1112           (- error))
1113       (let ((i 0)
1114             env-id env-name ref-count fuzokugo-fid dic-max
1115             dic-array file-array)
1116         (while (< i number-of-entry)
1117           (comm-unpack (u s u u u) env-id env-name ref-count
1118                          fuzokugo-fid dic-max)
1119           (setq dic-array (make-vector 30 nil))
1120           (setq file-array (make-vector 60 nil))
1121           (let ((j 0) d)
1122             (while (< j (wnn-const WNN_MAX_DIC_OF_AN_ENV))
1123               (comm-unpack (u) d)
1124               (aset dic-array j d)
1125               (setq j (1+ j))))
1126           (let ((j 0) f)
1127             (while (< j (wnn-const WNN_MAX_FILE_OF_AN_ENV))
1128               (comm-unpack (u) f)
1129               (aset file-array j f)
1130               (setq j (1+ j))))
1131           (setq l (cons (vector env-id env-name ref-count fuzokugo-fid dic-max
1132                                 dic-array file-array) l))
1133           (setq i (1+ i)))
1134         (reverse l)))))
1135
1136 (defun wnnrpc-kill (proc)
1137   ""
1138   (comm-call-with-proc proc (result)
1139     (comm-format (u) (wnn-const JS_KILL))
1140     (comm-unpack (u) result)
1141     result))                            ; XXX: Bad protocol: error?
1142
1143 (defun wnnrpc-delete-dictionary (e dic)
1144   ""
1145   (wnnrpc-call-with-environment e (result)
1146     (comm-format (u u u) (wnn-const JS_DIC_DELETE) env-id dic)
1147     (comm-unpack (u) result)
1148     (wnnrpc-test-result-and-get-error proc result)))
1149
1150 (defun wnnrpc-set-flag-on-dictionary (e dic flag)
1151   ""
1152   (wnnrpc-call-with-environment e (result)
1153     (comm-format (u u u u) (wnn-const JS_DIC_USE) env-id dic flag)
1154     (comm-unpack (u) result)
1155     (wnnrpc-test-result-and-get-error proc result)))
1156
1157 (defun wnnrpc-get-dictionary-list (proc)
1158   ""
1159   (comm-call-with-proc proc (number-of-dic)
1160     (comm-format (u) (wnn-const JS_DIC_LIST_ALL))
1161     (comm-unpack (u) number-of-dic)
1162     (wnnrpc-receive-dictionary-list proc number-of-dic)))
1163
1164 (defun wnnrpc-delete-word (e dic entry)
1165   ""
1166   (wnnrpc-call-with-environment e (result)
1167     (comm-format (u u u u) (wnn-const JS_WORD_DELETE) env-id dic entry)
1168     (comm-unpack (u) result)
1169     (wnnrpc-test-result-and-get-error proc result)))
1170
1171 (defun wnnrpc-receive-word (proc yomi)
1172   (let ((loop t)
1173         dic serial hinshi hindo right-now internal-hindo internal-right-now
1174         l l1 kanji comment)
1175     (while loop
1176       (comm-unpack (u) dic)
1177       (if (< dic 0)
1178           (setq loop nil)
1179         (comm-unpack (u u u u u u) serial hinshi hindo right-now
1180                      internal-hindo internal-right-now)
1181         (setq l (cons (vector dic serial hinshi hindo right-now
1182                               internal-hindo internal-right-now
1183                               yomi nil nil) l) )))
1184     (setq l (reverse l)
1185           l1 l)
1186     (while l1
1187       (comm-unpack (S S) kanji comment)
1188       (aset (car l1) 8 kanji)
1189       (aset (car l1) 9 comment)
1190       (setq l1 (cdr l1)))
1191     l))
1192
1193 (defun wnnrpc-search-word-in-dictionary (e dic yomi)
1194   ""
1195   (wnnrpc-call-with-environment e (c0 c1)
1196     (comm-format (u u u S) (wnn-const JS_WORD_SEARCH) env-id dic yomi)
1197     ;; XXX Bad protocol: error?
1198     (comm-unpack (u u) c0 c1)           ; ignored
1199     (wnnrpc-receive-word proc yomi)))
1200
1201 (defun wnnrpc-search-word (e yomi)
1202   ""
1203   (wnnrpc-call-with-environment e (c0 c1)
1204     (comm-format (u u S) (wnn-const JS_WORD_SEARCH_BY_ENV) env-id yomi)
1205     ;; XXX Bad protocol: error?
1206     (comm-unpack (u u) c0 c1)           ; ignored
1207     (wnnrpc-receive-word proc yomi)))
1208
1209 (defun wnnrpc-get-word-info (e dic entry)
1210   ""
1211   (wnnrpc-call-with-environment e (result c0 c1 yomi)
1212     (comm-format (u u u u) (wnn-const JS_WORD_INFO) env-id dic entry)
1213     (comm-unpack (u) result)
1214     (if (< result 0)
1215         (let (error)
1216           (comm-unpack (u) error)
1217           (- error))
1218       (comm-unpack (S) yomi)            ; XXX: reversed string
1219       (comm-unpack (u u) c0 c1) ; ignored
1220       (wnnrpc-receive-word proc yomi))))
1221
1222 (defun wnnrpc-set-comment-on-word (e dic entry comment)
1223   ""
1224   (wnnrpc-call-with-environment e (result)
1225     (comm-format (u u u u S) (wnn-const JS_WORD_COMMENT_SET)
1226                  env-id dic entry comment)
1227     (comm-unpack (u) result)
1228     (wnnrpc-test-result-and-get-error proc result)))
1229
1230 (defun wnnrpc-get-dictionary-info (e dic)
1231   ""
1232   (wnnrpc-call-with-environment e (result)
1233     (comm-format (u u u) (wnn-const JS_DIC_INFO) env-id dic)
1234     (comm-unpack (u) result)
1235     (if (< result 0)
1236         (let (error)
1237           (comm-unpack (u) error)
1238           (- error))
1239       (wnnrpc-receive-dictionary-list proc 1))))
1240
1241 (defun wnnrpc-set-file-comment (e fid comment)
1242   ""
1243   (wnnrpc-call-with-environment e (result)
1244     (comm-format (u u u S) (wnn-const JS_FILE_COMMENT_SET) env-id fid comment)
1245     (comm-unpack (u) result)
1246     (wnnrpc-test-result-and-get-error proc result)))
1247
1248 (defun wnnrpc-hinshi-name (proc hinshi)
1249   ""
1250   (comm-call-with-proc proc (result)
1251     (comm-format (u u) (wnn-const JS_HINSI_NAME) hinshi)
1252     (comm-unpack (u) result)
1253     (if (< result 0)
1254         (let (error)
1255           (comm-unpack (u) error)
1256           (- error))
1257       (comm-unpack (S) result)
1258       result)))
1259
1260 ;;; WHICH: 1: DIC, 2: HINDO, 3(0): Both
1261 (defun wnnrpc-set-file-password (e fid which old new)
1262   ""
1263   (wnnrpc-call-with-environment e (result)
1264     (comm-format (u u u u s s) (wnn-const JS_FILE_PASSWORD)
1265                  env-id fid which old new)
1266     (comm-unpack (u) result)
1267     (wnnrpc-test-result-and-get-error proc result)))
1268
1269 (defun wnnrpc-set-hinshi-table (e dic hinshi-table)
1270   ""
1271   (wnnrpc-call-with-environment e (result)
1272     (comm-format (u u u S) (wnn-const JS_HINSI_TABLE_SET)
1273                  env-id dic hinshi-table)
1274     (comm-unpack (u) result)
1275     (wnnrpc-test-result-and-get-error proc result)))
1276
1277 (defsubst wnnrpc-receive-dai-bunsetsu-list (proc number-of-bunsetsu)
1278   (let ((i 0)
1279         slist
1280         end start number-of-sho-bunsetsu evaluation v)
1281     (while (< i number-of-bunsetsu)
1282       (comm-unpack (u u u u)
1283                    end start number-of-sho-bunsetsu evaluation)
1284       (setq slist
1285             (cons (vector end start number-of-sho-bunsetsu evaluation nil)
1286                   slist))
1287       (setq i (1+ i)))
1288     (setq slist (reverse slist))
1289     (let ((s slist)
1290           result)
1291       (while s
1292         (setq v (car s))
1293         (setq result (wnnrpc-receive-sho-bunsetsu-list-sub-2 proc (aref v 2)))
1294         (aset v 4 result)
1295         (setq s (cdr s)))
1296       (setq s slist)
1297       (while s
1298         (setq v (car s))
1299         (wnnrpc-receive-sho-bunsetsu-list-sub-2 proc (aref v 4))
1300         (setq s (cdr s)))
1301       slist)))
1302
1303 (defun wnnrpc-daibunsetsu-conversion (e yomi hinshi fuzoku &optional v)
1304   ""
1305   (let (v0 v1)
1306     (if v
1307         (setq v0 v
1308               v1 (wnn-const WNN_VECT_KANTAN))
1309       (setq v0 (wnn-const WNN_VECT_KANTAN)
1310             v1 (wnn-const WNN_VECT_NO)))
1311     (wnnrpc-call-with-environment e (number-of-bunsetsu sho-size kanji-size)
1312       (comm-format (u u S i S i i) (wnn-const JS_KANTAN_DAI)
1313                    env-id yomi hinshi fuzoku v0 v1)
1314       (comm-unpack (u) number-of-bunsetsu)
1315       (if (< number-of-bunsetsu 0)      ; Get error # (XXX: Bad protocol)
1316           (let (error)
1317             (comm-unpack (u) error)
1318             (error "WNN Error on daibunsetsu conversion: %s"
1319                    (wnnrpc-get-error-message error)))
1320         (comm-unpack (u u) sho-size kanji-size)
1321         (wnnrpc-receive-dai-bunsetsu-list proc number-of-bunsetsu)))))
1322
1323 (defun wnnrpc-get-daibunsetsu-candidate (e yomi hinshi fuzoku &optional v)
1324   ""
1325   (let (v0 v1)
1326     (if v
1327         (setq v0 v
1328               v1 (wnn-const WNN_VECT_KANZEN))
1329       (setq v0 (wnn-const WNN_VECT_KANZEN)
1330             v1 (wnn-const WNN_VECT_NO)))
1331     (wnnrpc-call-with-environment e (number-of-bunsetsu sho-size kanji-size)
1332       (comm-format (u u S i S i i) (wnn-const JS_KANZEN_DAI)
1333                    env-id yomi hinshi fuzoku v0 v1)
1334       (comm-unpack (u) number-of-bunsetsu)
1335       (if (< number-of-bunsetsu 0)      ; Get error # (XXX: Bad protocol)
1336           (let (error)
1337             (comm-unpack (u) error)
1338             (error "WNN Error on daibunsetsu conversion: %s"
1339                    (wnnrpc-get-error-message error)))
1340         (comm-unpack (u u) sho-size kanji-size)
1341         (wnnrpc-receive-dai-bunsetsu-list proc number-of-bunsetsu)))))
1342 \f
1343 ;; XXX: NIY: check in the file contents
1344 ;; 16
1345 (defun wnnrpc-local-file-loaded (proc path)
1346   ""
1347   (let ((attr (file-attributes path)))
1348     (let ((time (cons (car (nth 6 attr)) (car (cdr (nth 6 attr)))))
1349           (inode (nth 10 attr))
1350           (dev (nth 11 attr))
1351           (padded-hostname
1352            (substring 
1353             (concat (system-name)
1354                     "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0") 0 16)))
1355       (comm-call-with-proc proc (result)
1356         (comm-format (u U U U s) (wnn-const JS_FILE_LOADED_LOCAL)
1357                      time dev inode padded-hostname)
1358         (comm-unpack (u) result)
1359         result))))
1360
1361 (defun wnnrpc-file-receive (e fid local-filename)
1362   ""
1363   (wnnrpc-call-with-environment e (filename)
1364     (comm-format (u u u) (wnn-const JS_FILE_RECEIVE)
1365                  env-id fid)
1366     (comm-unpack (s) filename)
1367     (if (null local-filename)
1368         (setq local-filename (substring filename
1369                                         (1+ (string-match "!" filename)))))
1370     (wnnrpc-file-receive-sub proc local-filename)))
1371
1372 (defun wnnrpc-file-receive-sub (proc local-filename)
1373   ;; XXX check file header
1374   (let ((attr (file-attributes local-filename)))
1375     (let ((time (cons (car (nth 6 attr)) (car (cdr (nth 6 attr)))))
1376           (inode (nth 10 attr))
1377           (dev (nth 11 attr))
1378           (padded-hostname
1379            (substring 
1380             (concat (system-name)
1381                     "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0") 0 16)))
1382     (comm-call-with-proc-1 proc (result)
1383       (comm-format (u U U U s) 0 ; ACK
1384                    time dev inode padded-hostname)
1385       (comm-unpack (s) result)
1386       (cond ((< result 0)
1387              (let (error)
1388                (comm-unpack (u) error)
1389                (- error)))
1390             ((= result 0)
1391              )          ; done
1392             ((or (= result 1) (= result 3) (= result 2))
1393               ;; XXX distingush creation...
1394              (comm-call-with-proc-1 proc (contents result)
1395                (comm-format (u) 0)      ; ACK
1396                (comm-unpack (B u) contents result)
1397                ;; XXX XXXXXXXXXXXXXXXXX save the contents...
1398                (wnnrpc-test-result-and-get-error proc result))))))))
1399
1400 (defun wnnrpc-file-send (e filename)
1401   ""
1402   (wnnrpc-call-with-environment e (result)
1403     (comm-format (u u U U U s) (wnn-const JS_FILE_SEND)
1404                  env-id time dev inode padded-hostname)
1405     (comm-unpack (u) result)
1406     (if (/= result -1)
1407         (progn
1408           (comm-unpack (u) result)
1409           (if (< result 0)
1410               (let (error)
1411                 (comm-unpack (u) error)
1412                 (- error))
1413             result))
1414       (comm-unpack (u) result)
1415       (if (< result 0)
1416           (let (error)
1417             (comm-unpack (u) error)
1418             (- error))
1419         (let ((path (concat (system-name) "!" filename)))
1420           (wnnrpc-send-file-sub proc path))))))
1421
1422 (defun wnnrpc-send-file-sub (proc path)
1423   (comm-call-with-proc-1 proc (result)
1424     (progn
1425       (comm-format (s) path)
1426       ;; XXXXXXXXXXXXXX send the contents of file...
1427       (while xxx
1428         (if (= c 255)
1429             (comm-format (b b) 255 0)
1430           (comm-format (b) c)))
1431       (comm-format (b b) 255 255))
1432     (comm-unpack (u) result)
1433     (wnnrpc-test-result-and-get-error proc result)))
1434
1435 (defun wnnrpc-file-remove-client ()
1436 )
1437
1438 (defun wnnrpc-dic-file-create-client ()
1439 )
1440
1441 (defun wnnrpc-hindo-file-create-client ()
1442 113
1443 )
1444
1445 ;;; egg/wnnrpc.el ends here.