1 /* 2 * Copyright (c) 1994 Sony Corporation 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining 5 * a copy of this software and associated documentation files (the 6 * "Software"), to deal in the Software without restriction, including 7 * without limitation the rights to use, copy, modify, merge, publish, 8 * distribute, sublicense, and/or sell copies of the Software, and to 9 * permit persons to whom the Software is furnished to do so, subject to 10 * the following conditions: 11 * 12 * The above copyright notice and this permission notice shall be 13 * included in all copies or substantial portions of the Software. 14 * 15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 * IN NO EVENT SHALL SONY CORPORATION BE LIABLE FOR ANY CLAIM, 19 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 20 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR 21 * THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 * 23 * Except as contained in this notice, the name of Sony Corporation 24 * shall not be used in advertising or otherwise to promote the sale, use 25 * or other dealings in this Software without prior written authorization 26 * from Sony Corporation. 27 * 28 */ 29 30 /* 31 * $SonyRCSfile: rk.h,v $ 32 * $SonyRevision: 1.1 $ 33 * $SonyDate: 1994/06/03 08:03:48 $ 34 */ 35 36 #ifndef RK_H 37 #define RK_H 38 39 #include <sys/types.h> 40 #include "wchar16.h" 41 42 #define SPACE 0x20 43 #define TAB 0x09 44 #define EOL 0x0a 45 #define NSTR '\0' 46 #ifndef ESC 47 #define ESC 0x1b 48 #endif 49 #define QUOTA '\'' 50 #define BSL '\\' 51 #define MASK 0xff 52 53 #define MAXLEN 256 54 #define MAXWLEN 16 55 #define MAXLLEN 64 56 #define MAXCODE 256 57 58 #define CONTINUE 0 59 #define NOMACH -1 60 #define FAIL -1 61 #define RKEND 0xffffffff 62 #define ERRBEL 0xfffffffc 63 #define ERRCODE 0x80000000 64 #define RKMASK 0x0000ffff 65 #define RKZEN 0xff00 66 67 #define SetMojilen(c) ((c << 16) & 0x00ff0000) 68 #define GetMojilen(c) ((c & ERRCODE) ? (1) : ((c >> 16) & 0xff)) 69 70 typedef struct rktable_w16 { 71 wchar16_t *r_key; 72 u_short *k_yomi; 73 wchar16_t *r_str; 74 struct rktable_w16 *next; 75 } RkTablW16; 76 77 typedef struct rktable { 78 u_char *r_key; 79 u_short *k_yomi; 80 u_char *r_str; 81 struct rktable *next; 82 } RkTabl; 83 84 #endif /* RK_H */ 85 86