ee35e72947c3b2615c7b63cdca215ab34416fd66
[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 (cdr (or (assoc egg-default-language wnnrpc-error-message)
594                       (assoc its-current-language wnnrpc-error-message)
595                       (assoc 'Japanese wnnrpc-error-message)))))
596     (or (and (< errno (length msg)) (aref msg errno))
597         (format "#%d" errno))))
598
599 (defmacro wnnrpc-call-with-environment (e vlist send-expr &rest receive-exprs)
600   (let ((v (append
601             `((proc (wnnenv-get-proc ,e))
602               (env-id (wnnenv-get-env-id ,e))
603               (egg-zhuyin its-zhuyin))
604             vlist)))
605     (list
606      'let v
607      (append
608         `(save-excursion
609            (set-buffer (process-buffer proc))
610            (erase-buffer)
611            ,send-expr
612            (process-send-region proc (point-min) (point-max))
613            (goto-char (prog1 (point) (accept-process-output proc))))
614         receive-exprs))))
615
616 (defsubst wnnrpc-test-result-and-get-error (proc result)
617   (if (< result 0)                      ; Get error # (XXX: Bad protocol)
618       (let (error)
619         (comm-unpack (u) error)
620         (- error))
621     result))
622 \f
623 (defun wnnrpc-open (proc myhostname username)
624   "Open the session.  Return 0 on success, error code on failure."
625   (comm-call-with-proc proc (result)
626     (comm-format (u u s s)
627                  (wnn-const JS_OPEN)
628                  (wnn-const JLIB_VERSION)
629                  myhostname username)
630     (comm-unpack (u) result)
631     (wnnrpc-test-result-and-get-error proc result)))
632
633 (defun wnnrpc-connect (proc envname)
634   "Establish new `connection' and make an environment.
635 Return the identitifation of the environment on success, 
636 negate-encoded error code on failure."
637   (comm-call-with-proc proc (result)
638     (comm-format (u s) (wnn-const JS_CONNECT) envname)
639     (comm-unpack (u) result)
640     (wnnrpc-test-result-and-get-error proc result)))
641
642 (defun wnnrpc-open-file (proc env-id filename)
643   "Open the file FILENAME on the environment ENV-ID on server process PROC.
644 Return file descripter on success, negate-encoded error code on failure."
645   (comm-call-with-proc proc (result)
646     (comm-format (u u s) (wnn-const JS_FILE_READ) env-id filename)
647     (comm-unpack (u) result)
648     (wnnrpc-test-result-and-get-error proc result)))
649
650 (defun wnnrpc-set-fuzokugo-file (proc env-id fid)
651   "For PROC, on environment ENV-ID, 
652 Set Fuzokugo file specified by FID.
653 Return 0 on success, negate-encoded error code on failure."
654   (comm-call-with-proc proc (result)
655     (comm-format (u u i) (wnn-const JS_FUZOKUGO_SET) env-id fid)
656     (comm-unpack (u) result)
657     (wnnrpc-test-result-and-get-error proc result)))
658
659 (defun wnnrpc-set-dictionary (proc env-id rev dic freq pri dic-mode freq-mode)
660   "Set dictionary on server.
661 Return 0 on success, negate-encoded error code on faiulure."
662   (comm-call-with-proc proc (result)
663     (comm-format (u u i i i u u s s u) (wnn-const JS_DIC_ADD)
664                  env-id dic freq pri
665                  (if dic-mode 0 1)
666                  (if freq-mode 0 1)
667                  "" ""          ; XXX: No password
668                  (if rev 1 0))
669     (comm-unpack (u) result)
670     (wnnrpc-test-result-and-get-error proc result)))
671
672 (defun wnnrpc-version (proc)
673   "Return the version number of WNN server."
674   (comm-call-with-proc proc (result)
675     (comm-format (u) (wnn-const JS_VERSION))
676     (comm-unpack (u) result)
677     result))
678
679 (defun wnnrpc-access (proc env-id mode path) 
680   "On the server connected by PROC, check the accessibility of file in
681 the environment ENV-ID.  Return 0 when the remote file
682 (dictionary/frequency) of PATH can be accessed in mode MODE.  Return
683 Non-zero otherwise."
684   (comm-call-with-proc proc (result)
685     (comm-format (u u u s) (wnn-const JS_ACCESS) env-id mode path)
686     (comm-unpack (u) result)
687     result))
688
689 (defun wnnrpc-mkdir (proc env-id path)
690   "Create directory specified by PATH."
691   (comm-call-with-proc proc (result)
692     (comm-format (u u s) (wnn-const JS_MKDIR) env-id path)
693     (comm-unpack (u) result)
694     (wnnrpc-test-result-and-get-error proc result)))
695
696 (defun wnnrpc-create-dictionary (proc env-id dicname)
697   "Create dictionary on server."
698   (comm-call-with-proc proc (result)
699     (comm-format (u u s S s s u) (wnn-const JS_DIC_FILE_CREATE)
700                  env-id dicname ""      ; XXX: No comment
701                  "" ""          ; XXX: No passwd
702                  (wnn-const WNN_REV_DICT))
703     (comm-unpack (u) result)
704     (wnnrpc-test-result-and-get-error proc result)))
705
706 (defun wnnrpc-create-frequency (proc env-id freqname dictionary)
707   "Create frequency file on server."
708   (comm-call-with-proc proc (result)
709     (comm-format (u u u s S s) (wnn-const JS_HINDO_FILE_CREATE)
710                  env-id dictionary freqname "" ; XXX: No comment
711                  "")                    ; XXX: No password
712     (comm-unpack (u) result)
713     (wnnrpc-test-result-and-get-error proc result)))
714
715 (defun wnnrpc-discard-file (proc env-id fid)
716   "Discard a file specified by FID.  Call this for already-opened file
717 before remove and create new file."
718   (comm-call-with-proc proc (result)
719     (comm-format (u u u) (wnn-const JS_FILE_DISCARD)
720                  env-id fid)
721     (comm-unpack (u) result)
722     (wnnrpc-test-result-and-get-error proc result)))
723
724 (defun wnnrpc-remove-file (proc filename)
725   "Remove the file."
726   (comm-call-with-proc proc (result)
727     (comm-format (u s s) (wnn-const JS_FILE_REMOVE) filename "") ; No passwd
728     (comm-unpack (u) result)
729     (wnnrpc-test-result-and-get-error proc result)))
730
731 (defun wnnrpc-set-conversion-parameters (proc env-id v)
732   "Set conversion parameters."
733   (comm-call-with-proc proc (result)
734     (comm-format  (u u i i i i i i i i i i i i i i i i i)
735                   (wnn-const JS_PARAM_SET)
736                   env-id
737                   (aref v  0) (aref v  1) (aref v  2) (aref v  3)
738                   (aref v  4) (aref v  5) (aref v  6) (aref v  7)
739                   (aref v  8) (aref v  9) (aref v 10) (aref v 11)
740                   (aref v 12) (aref v 13) (aref v 14) (aref v 15)
741                   (aref v 16) (aref v 17))
742     (comm-unpack (u) result)
743     (wnnrpc-test-result-and-get-error proc result)))
744
745 (defsubst wnnrpc-receive-sho-bunsetsu-list-sub (e proc number-of-sho-bunsetsu)
746   (let ((i 0)
747         slist
748         end start jiritsugo-end dic-no entry freq right-now
749         hinshi status status-backward kangovect evaluation)
750     (while (< i number-of-sho-bunsetsu)
751       (comm-unpack (u u u u u u u u u u u u)
752                    end start jiritsugo-end dic-no entry freq right-now
753                    hinshi status status-backward kangovect evaluation)
754       (setq slist
755             (cons
756              (wnn-bunsetsu-create e
757               end start jiritsugo-end dic-no entry freq right-now
758               hinshi status status-backward kangovect evaluation)
759              slist))
760       (setq i (1+ i)))
761     (reverse slist)))
762
763 (defsubst wnnrpc-receive-sho-bunsetsu-list-sub-2 (proc slist)
764   (let ((l slist)
765         result origin fuzokugo b)
766     (while l
767       (setq b (car l))
768       (comm-unpack (S S S) result origin fuzokugo)
769       (wnn-bunsetsu-set-converted b result)
770       (wnn-bunsetsu-set-yomi b origin)
771       (wnn-bunsetsu-set-fuzokugo b fuzokugo)
772       (setq l (cdr l)))
773     slist))
774
775 (defun wnnrpc-receive-sho-bunsetsu-list (e proc number-of-sho-bunsetsu)
776   (let ((slist (wnnrpc-receive-sho-bunsetsu-list-sub e proc
777                                                      number-of-sho-bunsetsu)))
778     (wnnrpc-receive-sho-bunsetsu-list-sub-2 proc slist)))
779
780 (defun wnnrpc-renbunsetsu-conversion (e yomi hinshi fuzoku &optional v)
781   "Convert YOMI string into Kanji.
782 HINSHI and FUZOKU are information of preceding bunsetsu."
783   (let (v0 v1)
784     (if v
785         (setq v0 v
786               v1 (wnn-const WNN_VECT_KANREN))
787       (setq v0 (wnn-const WNN_VECT_KANREN)
788             v1 (wnn-const WNN_VECT_NO)))
789     (wnnrpc-call-with-environment e (number-of-dai-bunsetsu kanji-length error
790                                      number-of-sho-bunsetsu dlist)
791       (comm-format (u u S i S i i i) (wnn-const JS_KANREN)
792                    env-id yomi hinshi fuzoku v0 v1
793                    (wnn-const WNN_VECT_BUNSETSU))
794       (comm-unpack (u) number-of-dai-bunsetsu)
795       (if (< number-of-dai-bunsetsu 0)
796           (let (error)
797             (comm-unpack (u) error)
798             (error "WNN Error on renbunsetsu conversion: %s"
799                    (wnnrpc-get-error-message error)))
800         (comm-unpack (u u) number-of-sho-bunsetsu kanji-length)
801         (setq dlist (cons nil nil))
802         (let ((i 0)
803               (d dlist)
804               end start count evaluation)
805           (catch 'break
806             (while t
807               (comm-unpack (u u u u) end start count evaluation)
808               (setcar d (vector end start count evaluation))
809               (if (< (setq i (1+ i)) number-of-dai-bunsetsu)
810                   (setq d (setcdr d (cons nil nil)))
811                 (throw 'break nil))))
812           (cons dlist
813                 (wnnrpc-receive-sho-bunsetsu-list e proc
814                                                   number-of-sho-bunsetsu)))))))
815
816 (defun wnnrpc-get-bunsetsu-candidates (e yomi hinshi fuzoku &optional v)
817   ""
818   (let (v0 v1)
819     (if v
820         (setq v0 v
821               v1 (wnn-const WNN_VECT_KANZEN))
822       (setq v0 (wnn-const WNN_VECT_KANZEN)
823             v1 (wnn-const WNN_VECT_NO)))
824     (wnnrpc-call-with-environment e (number-of-sho-bunsetsu kanji-length slist)
825       (comm-format (u u S i S i i) (wnn-const JS_KANZEN_SHO)
826                      env-id yomi hinshi fuzoku v0 v1)
827       (comm-unpack (u) number-of-sho-bunsetsu)
828       (if (< number-of-sho-bunsetsu 0)
829           (let (error)
830             (comm-unpack (u) error)
831             (error "WNN Error on getting candidates: %s"
832                    (wnnrpc-get-error-message error)))
833         (comm-unpack (u) kanji-length)
834         (wnnrpc-receive-sho-bunsetsu-list e proc number-of-sho-bunsetsu)))))
835
836 (defun wnnrpc-tanbunsetsu-conversion (e yomi hinshi fuzoku &optional v)
837   ""
838   (let (v0 v1)
839     (if v
840         (setq v0 v
841               v1 (wnn-const WNN_VECT_KANTAN))
842       (setq v0 (wnn-const WNN_VECT_KANTAN)
843             v1 (wnn-const WNN_VECT_NO)))
844     (wnnrpc-call-with-environment e (number-of-sho-bunsetsu kanji-length slist)
845       (comm-format (u u S i S i i) (wnn-const JS_KANTAN_SHO)
846                      env-id yomi hinshi fuzoku v0 v1)
847       (comm-unpack (u) number-of-sho-bunsetsu)
848       (if (< number-of-sho-bunsetsu 0)  ; Get error # (XXX: Bad protocol)
849           (let (error)
850             (comm-unpack (u) error)
851             (error "WNN Error on tanbunsetsu conversion: %s"
852                    (wnnrpc-get-error-message error)))
853         (comm-unpack (u) kanji-length)
854         (wnnrpc-receive-sho-bunsetsu-list e proc number-of-sho-bunsetsu)))))
855
856 (defun wnnrpc-set-frequency (e dicno entry ima hindo)
857   ""
858   (wnnrpc-call-with-environment e (result)
859     (comm-format (u u i i i i) (wnn-const JS_HINDO_SET)
860                  env-id dicno entry ima hindo)
861     (comm-unpack (u) result)
862     (wnnrpc-test-result-and-get-error proc result)))
863
864 (defun wnnrpc-close (proc)
865   ""
866   (comm-call-with-proc proc (result)
867     (comm-format (u) (wnn-const JS_CLOSE))
868     (comm-unpack (u) result)
869     (wnnrpc-test-result-and-get-error proc result)))
870
871 (defun wnnrpc-env-exist (proc envname)
872   ""
873   (comm-call-with-proc proc (result)
874     (comm-format (u s) (wnn-const JS_ENV_EXIST) envname)
875     (comm-unpack (u) result)
876     result))
877
878 (defun wnnrpc-make-env-sticky (e)
879   ""
880   (wnnrpc-call-with-environment e (result)
881     (comm-format (u u) (wnn-const JS_ENV_STICKY) env-id)
882     (comm-unpack (u) result)
883     (wnnrpc-test-result-and-get-error proc result)))
884
885 (defun wnnrpc-make-env-unsticky (e)
886   ""
887   (wnnrpc-call-with-environment e (result)
888     (comm-format (u u) (wnn-const JS_ENV_UNSTICKY) env-id)
889     (comm-unpack (u) result)
890     (wnnrpc-test-result-and-get-error proc result)))
891
892 (defun wnnrpc-disconnect (e)
893   ""
894   (wnnrpc-call-with-environment e (result)
895     (comm-format (u u) (wnn-const JS_DISCONNECT) env-id)
896     (comm-unpack (u) result)
897     (wnnrpc-test-result-and-get-error proc result)))
898
899 (defun wnnrpc-add-word (e dictionary yomi kanji comment hinshi initial-freq)
900   ""
901   (wnnrpc-call-with-environment e (result)
902     (comm-format (u u u S S S u u) (wnn-const JS_WORD_ADD)
903                  env-id
904                  dictionary yomi kanji comment
905                  hinshi initial-freq)
906     (comm-unpack (u) result)
907     (wnnrpc-test-result-and-get-error proc result)))
908
909 (defun wnnrpc-get-dictionary-list-with-environment (e)
910   ""
911   (wnnrpc-call-with-environment e (number-of-dic)
912     (comm-format (u u) (wnn-const JS_DIC_LIST) env-id)
913     (comm-unpack (u) number-of-dic)
914     (if (< number-of-dic 0)
915         (let (error)                    ; XXX js.c is correct?
916           (comm-unpack (u) error)
917           (error "WNN Error on listing dictionaries: %s"
918                  (wnnrpc-get-error-message error)))
919       (wnnrpc-receive-dictionary-list proc number-of-dic))))
920
921 (defun wnnrpc-receive-dictionary-list (proc number-of-dic)
922   (let (dic-entry dic freq dic-mode freq-mode enable-flag nice
923         rev comment dicname freqname dic-passwd freq-passwd
924         type gosuu dic-local-flag freq-local-flag)
925     (if (= number-of-dic 0)
926         nil
927       (comm-unpack (u u u u u u u u S s s s s u u u u)
928                    dic-entry dic freq dic-mode freq-mode enable-flag nice
929                    rev comment dicname freqname dic-passwd freq-passwd
930                    type gosuu dic-local-flag freq-local-flag)
931       (cons 
932        (vector dic-entry dic freq dic-mode freq-mode enable-flag nice
933                rev comment dicname freqname dic-passwd freq-passwd
934                type gosuu dic-local-flag freq-local-flag)
935        (wnnrpc-receive-dictionary-list proc (1- number-of-dic))))))
936
937 (defsubst wnndic-get-id (dic)
938   (aref dic 0))
939
940 (defsubst wnndic-get-comment (dic)
941   (aref dic 8))
942
943 (defsubst wnndic-get-dictname (dic)
944   (aref dic 9))
945
946 (defun wnnrpc-get-writable-dictionary-id-list (e)
947   ""
948   (wnnrpc-call-with-environment e (number-of-dic result)
949     (comm-format (u u i) (wnn-const JS_HINSI_DICTS) env-id -1)
950     (comm-unpack (u) number-of-dic)
951     (if (> number-of-dic 0)
952         (let ((l (cons nil nil))
953               (i 0)
954               dic)
955           (setq result l)
956           (catch 'break
957             (while t
958               (comm-unpack (u) dic)
959               (setcar l dic)
960               (if (< (setq i (1+ i)) number-of-dic)
961                   (setq l (setcdr l (cons nil nil)))
962                 (throw 'break nil))))
963           result)
964       (if (= number-of-dic 0)
965           nil
966         (let (error)
967           (comm-unpack (u) error)
968           (error "WNN Error on listing dictionaries: %s"
969                  (wnnrpc-get-error-message error)))))))
970
971 (defun wnnrpc-get-hinshi-list (e dic name)
972   ""
973   (wnnrpc-call-with-environment e (number-of-hinshi size result)
974     (comm-format (u u u S) (wnn-const JS_HINSI_LIST) env-id dic name)
975     (comm-unpack (u u) number-of-hinshi size)
976     (if (> number-of-hinshi 0)
977         (let ((l (cons nil nil))
978               (i 0)
979               hinshi)
980           (setq result l)
981           (catch 'break
982             (while t
983               (comm-unpack (S) hinshi)
984               (setcar l hinshi)
985               (if (< (setq i (1+ i)) number-of-hinshi)
986                   (setq l (setcdr l (cons nil nil)))
987                 (throw 'break nil))))
988           result)
989       (if (= number-of-hinshi 0)
990           nil
991         (let (error)
992           (comm-unpack (u) error)
993           (error "WNN Error on listing HINSHI: %s"
994                  (wnnrpc-get-error-message error)))))))
995
996 (defun wnnrpc-hinshi-number (proc name)
997   ""
998   (comm-call-with-proc proc (result)
999     (comm-format (u S) (wnn-const JS_HINSI_NUMBER) name)
1000     (comm-unpack (u) result)
1001     (wnnrpc-test-result-and-get-error proc result)))
1002
1003 (defun wnnrpc-get-conversion-parameters (e)
1004   ""
1005   (wnnrpc-call-with-environment e (result
1006                                    n nsho p1 p2 p3 p4 p5 p6 p7 p8 p9
1007                                    p10 p11 p12 p13 p14 p15)
1008     (comm-format (u u) (wnn-const JS_PARAM_GET) env-id)
1009     (comm-unpack (u) result)
1010     (if (< result 0)
1011         (let (error)
1012           (comm-unpack (u) error)
1013           (- error))
1014       (comm-unpack  (u u u u u  u u u u u  u u u u u u u)
1015                     n nsho p1 p2 p3 p4 p5 p6 p7 p8 p9
1016                     p10 p11 p12 p13 p14 p15)
1017       (vector n nsho p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15))))
1018
1019 (defun wnnrpc-file-loaded (proc path)
1020   ""
1021   (comm-call-with-proc proc (result)
1022     (comm-format (u s) (wnn-const JS_FILE_LOADED) path)
1023     (comm-unpack (u) result)
1024     result))
1025
1026 (defun wnnrpc-write-file (e fid filename)
1027   (wnnrpc-call-with-environment e (result)
1028     (comm-format (u u u s) (wnn-const JS_FILE_WRITE) env-id fid filename)
1029     (comm-unpack (u) result)
1030     (wnnrpc-test-result-and-get-error proc result)))
1031
1032 (defun wnnrpc-get-fuzokugo-file (e)
1033   ""
1034   (wnnrpc-call-with-environment e (result)
1035     (comm-format (u u u) (wnn-const JS_FUZOKUGO_GET) env-id)
1036     (comm-unpack (u) result)
1037     (wnnrpc-test-result-and-get-error proc result)))
1038
1039 (defsubst wnnrpc-receive-file-list (proc)
1040   (let ((i 0)
1041         flist
1042         number-of-files fid local-flag ref-count type name)
1043     (comm-unpack (u) number-of-files)
1044     (if (< number-of-files 0)
1045         (error "WNN: wnnrpc-receive-file-list")
1046       (while (< i number-of-files)
1047         (comm-unpack (u u u u s) fid local-flag ref-count type name)
1048         (setq flist (cons (vector fid local-flag ref-count type name) flist))
1049         (setq i (1+ i)))
1050       flist)))
1051
1052 (defun wnnrpc-get-file-list (proc)
1053   ""
1054   (comm-call-with-proc proc (result)
1055     (comm-format (u) (wnn-const JS_FILE_LIST_ALL))
1056     (wnnrpc-receive-file-list proc)))
1057
1058 (defun wnnrpc-get-file-list-with-env (e)
1059   ""
1060   (wnnrpc-call-with-environment e (result)
1061     (comm-format (u u) (wnn-const JS_FILE_LIST) env-id)
1062     (wnnrpc-receive-file-list proc)))
1063
1064 (defun wnnrpc-file-attribute (e path)
1065   "3: dictionary, 4: hindo file, 5: fuzokugo-file"
1066   (wnnrpc-call-with-environment e (result)
1067     (comm-format (u u s) (wnn-const JS_FILE_STAT) env-id path)
1068     (comm-unpack (u) result)
1069     (wnnrpc-test-result-and-get-error proc result)))
1070
1071 (defun wnnrpc-get-file-info (e fid)
1072   ""
1073   (wnnrpc-call-with-environment e (result name local-flag ref-count type)
1074     (comm-format (u u u) (wnn-const JS_FILE_INFO) env-id fid)
1075     (comm-unpack (u) result)
1076     (if (< result 0)
1077         (let (error)
1078           (comm-unpack (u) error)
1079           (- error))
1080       (comm-unpack (s u u u) name local-flag ref-count type)
1081       (vector name local-flag ref-count type))))
1082
1083 (defun wnnrpc-who (proc)
1084   ""
1085   (comm-call-with-proc proc (number-of-entry w)
1086     (comm-format (u) (wnn-const JS_WHO))
1087     (comm-unpack (u) number-of-entry)
1088     (if (< number-of-entry 0)
1089         (let (error)
1090           (comm-unpack (u) error)
1091           (- error))
1092       (let ((i 0)
1093             sd username hostname e-array)
1094         (while (< i number-of-entry)
1095           (comm-unpack (u s s) sd username hostname)
1096           (setq e-array (make-vector 32 nil))
1097           (let ((j 0) e)
1098             (while (< j (wnn-const WNN_MAX_ENV_OF_A_CLIENT))
1099               (comm-unpack (u) e)
1100               (aset e-array j e)
1101               (setq j (1+ j))))
1102           (setq w (cons (vector sd username hostname e-array) w))
1103           (setq i (1+ i)))
1104         (reverse w)))))
1105
1106 (defun wnnrpc-get-env-list (proc)
1107   (comm-call-with-proc proc (number-of-entry l)
1108     (comm-format (u) (wnn-const JS_ENV_LIST))
1109     (comm-unpack (u) number-of-entry)
1110     (if (< number-of-entry 0)
1111         (let (error)
1112           (comm-unpack (u) error)
1113           (- error))
1114       (let ((i 0)
1115             env-id env-name ref-count fuzokugo-fid dic-max
1116             dic-array file-array)
1117         (while (< i number-of-entry)
1118           (comm-unpack (u s u u u) env-id env-name ref-count
1119                          fuzokugo-fid dic-max)
1120           (setq dic-array (make-vector 30 nil))
1121           (setq file-array (make-vector 60 nil))
1122           (let ((j 0) d)
1123             (while (< j (wnn-const WNN_MAX_DIC_OF_AN_ENV))
1124               (comm-unpack (u) d)
1125               (aset dic-array j d)
1126               (setq j (1+ j))))
1127           (let ((j 0) f)
1128             (while (< j (wnn-const WNN_MAX_FILE_OF_AN_ENV))
1129               (comm-unpack (u) f)
1130               (aset file-array j f)
1131               (setq j (1+ j))))
1132           (setq l (cons (vector env-id env-name ref-count fuzokugo-fid dic-max
1133                                 dic-array file-array) l))
1134           (setq i (1+ i)))
1135         (reverse l)))))
1136
1137 (defun wnnrpc-kill (proc)
1138   ""
1139   (comm-call-with-proc proc (result)
1140     (comm-format (u) (wnn-const JS_KILL))
1141     (comm-unpack (u) result)
1142     result))                            ; XXX: Bad protocol: error?
1143
1144 (defun wnnrpc-delete-dictionary (e dic)
1145   ""
1146   (wnnrpc-call-with-environment e (result)
1147     (comm-format (u u u) (wnn-const JS_DIC_DELETE) env-id dic)
1148     (comm-unpack (u) result)
1149     (wnnrpc-test-result-and-get-error proc result)))
1150
1151 (defun wnnrpc-set-flag-on-dictionary (e dic flag)
1152   ""
1153   (wnnrpc-call-with-environment e (result)
1154     (comm-format (u u u u) (wnn-const JS_DIC_USE) env-id dic flag)
1155     (comm-unpack (u) result)
1156     (wnnrpc-test-result-and-get-error proc result)))
1157
1158 (defun wnnrpc-get-dictionary-list (proc)
1159   ""
1160   (comm-call-with-proc proc (number-of-dic)
1161     (comm-format (u) (wnn-const JS_DIC_LIST_ALL))
1162     (comm-unpack (u) number-of-dic)
1163     (wnnrpc-receive-dictionary-list proc number-of-dic)))
1164
1165 (defun wnnrpc-delete-word (e dic entry)
1166   ""
1167   (wnnrpc-call-with-environment e (result)
1168     (comm-format (u u u u) (wnn-const JS_WORD_DELETE) env-id dic entry)
1169     (comm-unpack (u) result)
1170     (wnnrpc-test-result-and-get-error proc result)))
1171
1172 (defun wnnrpc-receive-word (proc yomi)
1173   (let ((loop t)
1174         dic serial hinshi hindo right-now internal-hindo internal-right-now
1175         l l1 kanji comment)
1176     (while loop
1177       (comm-unpack (u) dic)
1178       (if (< dic 0)
1179           (setq loop nil)
1180         (comm-unpack (u u u u u u) serial hinshi hindo right-now
1181                      internal-hindo internal-right-now)
1182         (setq l (cons (vector dic serial hinshi hindo right-now
1183                               internal-hindo internal-right-now
1184                               yomi nil nil) l) )))
1185     (setq l (reverse l)
1186           l1 l)
1187     (while l1
1188       (comm-unpack (S S) kanji comment)
1189       (aset (car l1) 8 kanji)
1190       (aset (car l1) 9 comment)
1191       (setq l1 (cdr l1)))
1192     l))
1193
1194 (defun wnnrpc-search-word-in-dictionary (e dic yomi)
1195   ""
1196   (wnnrpc-call-with-environment e (c0 c1)
1197     (comm-format (u u u S) (wnn-const JS_WORD_SEARCH) env-id dic yomi)
1198     ;; XXX Bad protocol: error?
1199     (comm-unpack (u u) c0 c1)           ; ignored
1200     (wnnrpc-receive-word proc yomi)))
1201
1202 (defun wnnrpc-search-word (e yomi)
1203   ""
1204   (wnnrpc-call-with-environment e (c0 c1)
1205     (comm-format (u u S) (wnn-const JS_WORD_SEARCH_BY_ENV) env-id yomi)
1206     ;; XXX Bad protocol: error?
1207     (comm-unpack (u u) c0 c1)           ; ignored
1208     (wnnrpc-receive-word proc yomi)))
1209
1210 (defun wnnrpc-get-word-info (e dic entry)
1211   ""
1212   (wnnrpc-call-with-environment e (result c0 c1 yomi)
1213     (comm-format (u u u u) (wnn-const JS_WORD_INFO) env-id dic entry)
1214     (comm-unpack (u) result)
1215     (if (< result 0)
1216         (let (error)
1217           (comm-unpack (u) error)
1218           (- error))
1219       (comm-unpack (S) yomi)            ; XXX: reversed string
1220       (comm-unpack (u u) c0 c1) ; ignored
1221       (wnnrpc-receive-word proc yomi))))
1222
1223 (defun wnnrpc-set-comment-on-word (e dic entry comment)
1224   ""
1225   (wnnrpc-call-with-environment e (result)
1226     (comm-format (u u u u S) (wnn-const JS_WORD_COMMENT_SET)
1227                  env-id dic entry comment)
1228     (comm-unpack (u) result)
1229     (wnnrpc-test-result-and-get-error proc result)))
1230
1231 (defun wnnrpc-get-dictionary-info (e dic)
1232   ""
1233   (wnnrpc-call-with-environment e (result)
1234     (comm-format (u u u) (wnn-const JS_DIC_INFO) env-id dic)
1235     (comm-unpack (u) result)
1236     (if (< result 0)
1237         (let (error)
1238           (comm-unpack (u) error)
1239           (- error))
1240       (wnnrpc-receive-dictionary-list proc 1))))
1241
1242 (defun wnnrpc-set-file-comment (e fid comment)
1243   ""
1244   (wnnrpc-call-with-environment e (result)
1245     (comm-format (u u u S) (wnn-const JS_FILE_COMMENT_SET) env-id fid comment)
1246     (comm-unpack (u) result)
1247     (wnnrpc-test-result-and-get-error proc result)))
1248
1249 (defun wnnrpc-hinshi-name (proc hinshi)
1250   ""
1251   (comm-call-with-proc proc (result)
1252     (comm-format (u u) (wnn-const JS_HINSI_NAME) hinshi)
1253     (comm-unpack (u) result)
1254     (if (< result 0)
1255         (let (error)
1256           (comm-unpack (u) error)
1257           (- error))
1258       (comm-unpack (S) result)
1259       result)))
1260
1261 ;;; WHICH: 1: DIC, 2: HINDO, 3(0): Both
1262 (defun wnnrpc-set-file-password (e fid which old new)
1263   ""
1264   (wnnrpc-call-with-environment e (result)
1265     (comm-format (u u u u s s) (wnn-const JS_FILE_PASSWORD)
1266                  env-id fid which old new)
1267     (comm-unpack (u) result)
1268     (wnnrpc-test-result-and-get-error proc result)))
1269
1270 (defun wnnrpc-set-hinshi-table (e dic hinshi-table)
1271   ""
1272   (wnnrpc-call-with-environment e (result)
1273     (comm-format (u u u S) (wnn-const JS_HINSI_TABLE_SET)
1274                  env-id dic hinshi-table)
1275     (comm-unpack (u) result)
1276     (wnnrpc-test-result-and-get-error proc result)))
1277
1278 (defsubst wnnrpc-receive-dai-bunsetsu-list (proc number-of-bunsetsu)
1279   (let ((i 0)
1280         slist
1281         end start number-of-sho-bunsetsu evaluation v)
1282     (while (< i number-of-bunsetsu)
1283       (comm-unpack (u u u u)
1284                    end start number-of-sho-bunsetsu evaluation)
1285       (setq slist
1286             (cons (vector end start number-of-sho-bunsetsu evaluation nil)
1287                   slist))
1288       (setq i (1+ i)))
1289     (setq slist (reverse slist))
1290     (let ((s slist)
1291           result)
1292       (while s
1293         (setq v (car s))
1294         (setq result (wnnrpc-receive-sho-bunsetsu-list-sub-2 proc (aref v 2)))
1295         (aset v 4 result)
1296         (setq s (cdr s)))
1297       (setq s slist)
1298       (while s
1299         (setq v (car s))
1300         (wnnrpc-receive-sho-bunsetsu-list-sub-2 proc (aref v 4))
1301         (setq s (cdr s)))
1302       slist)))
1303
1304 (defun wnnrpc-daibunsetsu-conversion (e yomi hinshi fuzoku &optional v)
1305   ""
1306   (let (v0 v1)
1307     (if v
1308         (setq v0 v
1309               v1 (wnn-const WNN_VECT_KANTAN))
1310       (setq v0 (wnn-const WNN_VECT_KANTAN)
1311             v1 (wnn-const WNN_VECT_NO)))
1312     (wnnrpc-call-with-environment e (number-of-bunsetsu sho-size kanji-size)
1313       (comm-format (u u S i S i i) (wnn-const JS_KANTAN_DAI)
1314                    env-id yomi hinshi fuzoku v0 v1)
1315       (comm-unpack (u) number-of-bunsetsu)
1316       (if (< number-of-bunsetsu 0)      ; Get error # (XXX: Bad protocol)
1317           (let (error)
1318             (comm-unpack (u) error)
1319             (error "WNN Error on daibunsetsu conversion: %s"
1320                    (wnnrpc-get-error-message error)))
1321         (comm-unpack (u u) sho-size kanji-size)
1322         (wnnrpc-receive-dai-bunsetsu-list proc number-of-bunsetsu)))))
1323
1324 (defun wnnrpc-get-daibunsetsu-candidate (e yomi hinshi fuzoku &optional v)
1325   ""
1326   (let (v0 v1)
1327     (if v
1328         (setq v0 v
1329               v1 (wnn-const WNN_VECT_KANZEN))
1330       (setq v0 (wnn-const WNN_VECT_KANZEN)
1331             v1 (wnn-const WNN_VECT_NO)))
1332     (wnnrpc-call-with-environment e (number-of-bunsetsu sho-size kanji-size)
1333       (comm-format (u u S i S i i) (wnn-const JS_KANZEN_DAI)
1334                    env-id yomi hinshi fuzoku v0 v1)
1335       (comm-unpack (u) number-of-bunsetsu)
1336       (if (< number-of-bunsetsu 0)      ; Get error # (XXX: Bad protocol)
1337           (let (error)
1338             (comm-unpack (u) error)
1339             (error "WNN Error on daibunsetsu conversion: %s"
1340                    (wnnrpc-get-error-message error)))
1341         (comm-unpack (u u) sho-size kanji-size)
1342         (wnnrpc-receive-dai-bunsetsu-list proc number-of-bunsetsu)))))
1343 \f
1344 ;; XXX: NIY: check in the file contents
1345 ;; 16
1346 (defun wnnrpc-local-file-loaded (proc path)
1347   ""
1348   (let ((attr (file-attributes path)))
1349     (let ((time (cons (car (nth 6 attr)) (car (cdr (nth 6 attr)))))
1350           (inode (nth 10 attr))
1351           (dev (nth 11 attr))
1352           (padded-hostname
1353            (substring 
1354             (concat (system-name)
1355                     "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0") 0 16)))
1356       (comm-call-with-proc proc (result)
1357         (comm-format (u U U U s) (wnn-const JS_FILE_LOADED_LOCAL)
1358                      time dev inode padded-hostname)
1359         (comm-unpack (u) result)
1360         result))))
1361
1362 (defun wnnrpc-file-receive (e fid local-filename)
1363   ""
1364   (wnnrpc-call-with-environment e (filename)
1365     (comm-format (u u u) (wnn-const JS_FILE_RECEIVE)
1366                  env-id fid)
1367     (comm-unpack (s) filename)
1368     (if (null local-filename)
1369         (setq local-filename (substring filename
1370                                         (1+ (string-match "!" filename)))))
1371     (wnnrpc-file-receive-sub proc local-filename)))
1372
1373 (defun wnnrpc-file-receive-sub (proc local-filename)
1374   ;; XXX check file header
1375   (let ((attr (file-attributes local-filename)))
1376     (let ((time (cons (car (nth 6 attr)) (car (cdr (nth 6 attr)))))
1377           (inode (nth 10 attr))
1378           (dev (nth 11 attr))
1379           (padded-hostname
1380            (substring 
1381             (concat (system-name)
1382                     "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0") 0 16)))
1383     (comm-call-with-proc-1 proc (result)
1384       (comm-format (u U U U s) 0 ; ACK
1385                    time dev inode padded-hostname)
1386       (comm-unpack (s) result)
1387       (cond ((< result 0)
1388              (let (error)
1389                (comm-unpack (u) error)
1390                (- error)))
1391             ((= result 0)
1392              )          ; done
1393             ((or (= result 1) (= result 3) (= result 2))
1394               ;; XXX distingush creation...
1395              (comm-call-with-proc-1 proc (contents result)
1396                (comm-format (u) 0)      ; ACK
1397                (comm-unpack (B u) contents result)
1398                ;; XXX XXXXXXXXXXXXXXXXX save the contents...
1399                (wnnrpc-test-result-and-get-error proc result))))))))
1400
1401 (defun wnnrpc-file-send (e filename)
1402   ""
1403   (wnnrpc-call-with-environment e (result)
1404     (comm-format (u u U U U s) (wnn-const JS_FILE_SEND)
1405                  env-id time dev inode padded-hostname)
1406     (comm-unpack (u) result)
1407     (if (/= result -1)
1408         (progn
1409           (comm-unpack (u) result)
1410           (if (< result 0)
1411               (let (error)
1412                 (comm-unpack (u) error)
1413                 (- error))
1414             result))
1415       (comm-unpack (u) result)
1416       (if (< result 0)
1417           (let (error)
1418             (comm-unpack (u) error)
1419             (- error))
1420         (let ((path (concat (system-name) "!" filename)))
1421           (wnnrpc-send-file-sub proc path))))))
1422
1423 (defun wnnrpc-send-file-sub (proc path)
1424   (comm-call-with-proc-1 proc (result)
1425     (progn
1426       (comm-format (s) path)
1427       ;; XXXXXXXXXXXXXX send the contents of file...
1428       (while xxx
1429         (if (= c 255)
1430             (comm-format (b b) 255 0)
1431           (comm-format (b) c)))
1432       (comm-format (b b) 255 255))
1433     (comm-unpack (u) result)
1434     (wnnrpc-test-result-and-get-error proc result)))
1435
1436 (defun wnnrpc-file-remove-client ()
1437 )
1438
1439 (defun wnnrpc-dic-file-create-client ()
1440 )
1441
1442 (defun wnnrpc-hindo-file-create-client ()
1443 113
1444 )
1445
1446 ;;; egg/wnnrpc.el ends here.