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: sj2.h,v $ 32 * $SonyRevision: 1.2 $ 33 * $SonyDate: 1997/01/23 11:09:39 $ 34 */ 35 36 #ifndef SJ2_H 37 #define SJ2_H 38 39 #include "wchar16.h" 40 #include "sj.h" 41 42 43 #define MODE_ZEN 0x10 44 #define MODE_CONV 0x04 45 #define MODE_ALPHA 0x02 46 #define MODE_KATA 0x01 47 #define MODE_CODE 0x08 + MODE_ZEN 48 #define CODE_SJIS 0 49 #define CODE_JIS 1 50 #define CODE_JIS2 2 51 #define CODE_EUC 3 52 #define CODE_EUC2 4 53 #define CODE_KUTEN 5 54 #define CODE_KUTEN2 6 55 #define OMODE_ZEN 0x80 56 #define OMODE_MASK 0x1f 57 58 #define MODE_HALPHA MODE_ALPHA 59 #define MODE_ZALPHA MODE_ZEN + MODE_ALPHA 60 #define MODE_HKATA MODE_CONV 61 #define MODE_ZHIRA MODE_ZEN + MODE_CONV 62 #define MODE_ZKATA MODE_ZHIRA + MODE_KATA 63 64 65 66 #ifdef NOTDEF 67 #define OTHER 0 68 #define NEWS 1 69 #define ONEWS 2 70 #define JTERM 3 71 #define OJTERM 4 72 #define NWP511 5 73 #define NWP517 6 74 #endif 75 76 #define OTHER_KB 0 77 #define NEWS_KB 1 78 79 #define MINCOL 72 80 81 82 83 #define STDIN 0 84 #define STDOUT 1 85 86 87 #ifndef BS 88 #define BS '\010' 89 #endif 90 #ifndef ESC 91 #define ESC '\033' 92 #endif 93 #ifndef DEL 94 #define DEL '\177' 95 #endif 96 97 98 #define UNBUFF 0 99 #define BUFF 1 100 101 102 103 /* 104 * Remove warning. 105 * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp) 1996/8/10 106 */ 107 #if defined(TRUE) && defined(FALSE) 108 #if (TRUE != 0) || (TRUE != -1) 109 #undef TRUE 110 #undef FALSE 111 #define TRUE 0 112 #define FALSE -1 113 #endif 114 #else 115 #define TRUE 0 116 #define FALSE -1 117 #endif 118 119 120 struct wordent { 121 wchar16_t word_str[MAXWORD]; 122 }; 123 124 125 struct valtbl { 126 wchar16_t *keyword; 127 int ivalue; 128 }; 129 130 #define aprintf printf 131 132 #endif /* SJ2_H */ 133 134