moved kdeaccessibility kdeaddons kdeadmin kdeartwork kdebindings kdeedu kdegames...
[kdeedu.git] / kiten / xjdic.h
blobccbc9b52ada31be46c850958739b4d0f72aab2c9
1 /**************************************************************************
2 * X J D X G E N
3 * Author: Jim Breen
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)
11 any later version.
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 */
33 #define SVER "2.3"
34 #define TINITVAL 2
35 #define TMAXVAL 30
36 #define TMAXREP 1
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 */
46 #ifndef SEEK_END
47 #define SEEK_END 2
48 #endif
49 #ifndef SEEK_SET
50 #define SEEK_SET 0
51 #endif
52 #ifndef INADDR_NONE
53 #define INADDR_NONE -1
54 #endif
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 */
69 /* PDU structures */
71 typedef struct {
72 int32_t xjdreq_checksum;
73 short xjdreq_type;
74 short xjdreq_seq;
75 short xjdreq_dicno;
76 int32_t xjdreq_indexpos;
77 short xjdreq_schlen;
78 unsigned char xjdreq_schstr[21];
79 } REQ_PDU;
81 typedef struct {
82 int32_t xjdrsp_checksum;
83 short xjdrsp_type;
84 short xjdrsp_seq;
85 int32_t xjdrsp_resindex;
86 short xjdrsp_hitposn;
87 short xjdrsp_reslen;
88 int32_t xjdrsp_dicloc;
89 unsigned char xjdrsp_resstr[512];
90 } RSP_PDU;