1 /**************************************************************************
4 * Index (.xjdx) generator program fron XJDIC
6 * V2.3 - indexes JIS X 0212 (3-byte EUC) kanji
7 ***************************************************************************/
8 /* This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 1, or (at your option)
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
23 #define MAXLINES 24 /* default lines per display */
24 #define MAXCOLS 80 /* default cols per display */
25 #define NRKANA 250*2 /* size of the romaji to kana tables*/
26 #define NOFILT 10 /* maximum number of general filters */
27 #define VMAX 350 /* maximum entries in the verb table */
28 #define DEFAULT_DICDIR "" /* could be: "/usr/local/lib/xjdic" */
29 #define NOHITS 1000 /* size of hittab */
30 #define SPTAG '@' /* character that flags priority entries */
31 #define KFBUFFSIZE 2000 /* size of the KFlush buffer */
32 #define KANJARRAYSIZE 600 /* size of the kanji sorting array */
37 #define VBUFFSIZE 4096 /* size in bytes for each virtual buffer */
38 #define NOVB 1000 /* maximum number of virtual buffers */
39 #define RADPERLINE 20 /* No of radicals to display per line */
40 #define RADLOOKLIM 2*20 /*threshold for displaying results of radical
41 lookup (default 20) */
42 #define MAXITER 40 /*maximum binary search iterations*/
44 /* The following is for Solarises */
53 #define INADDR_NONE -1
57 /* type fields for PDUs and server calls */
59 #define XJ_FIND 1 /* find entry */
60 #define XJ_ENTRY 2 /* get this entry according to index */
61 #define XJ_OK 3 /* find/entry_get succeeded */
62 #define XJ_NBG 4 /* find/entry_get failed */
63 #define XJ_PROTERR 5 /* protocol error - server only */
64 #define XJ_HULLO 6 /* just send back an XJ_OK and # dics */
65 #define XJ_GET 7 /* get this entry, wo checking any match*/
67 #define XJ_PORTNO 47512 /* server's "well-known" port no */
72 int32_t xjdreq_checksum
;
76 int32_t xjdreq_indexpos
;
78 unsigned char xjdreq_schstr
[21];
82 int32_t xjdrsp_checksum
;
85 int32_t xjdrsp_resindex
;
88 int32_t xjdrsp_dicloc
;
89 unsigned char xjdrsp_resstr
[512];