/* * $Id: rk_spclval.h,v 2.3.2.1 2000/08/04 05:37:16 kaneda Exp $ */ /* WNN6 CLIENT LIBRARY--SOFTWARE LICENSE TERMS AND CONDITIONS Wnn6 Client Library : (C) Copyright OMRON Corporation. 1995,1998,2000 all rights reserved. (C) Copyright OMRON Software Co., Ltd. 1995,1998,2000 all rights reserved. Wnn Software : (C) Copyright Kyoto University Research Institute for Mathematical Sciences 1987, 1988, 1989, 1990, 1991, 1992, 1993 (C) Copyright OMRON Corporation. 1987, 1988, 1989, 1990, 1991, 1992, 1993 (C) Copyright ASCTEC, Inc. 1987, 1988, 1989, 1990, 1991, 1992, 1993 Preamble These Wnn6 Client Library--Software License Terms and Conditions (the "License Agreement") shall state the conditions under which you are permitted to copy, distribute or modify the software which can be used to create Wnn6 Client Library (the "Wnn6 Client Library"). The License Agreement can be freely copied and distributed verbatim, however, you shall NOT add, delete or change anything on the License Agreement. OMRON Corporation and OMRON Software Co., Ltd. (collectively referred to as "OMRON") jointly developed the Wnn6 Software (development code name is FI-Wnn), based on the Wnn Software. Starting from November, 1st, 1998, OMRON publishes the source code of the Wnn6 Client Library, and OMRON permits anyone to copy, distribute or change the Wnn6 Client Library under the License Agreement. Wnn6 Client Library is based on the original version of Wnn developed by Kyoto University Research Institute for Mathematical Sciences (KURIMS), OMRON Corporation and ASTEC Inc. Article 1. Definition. "Source Code" means the embodiment of the computer code, readable and understandable by a programmer of ordinary skills. It includes related source code level system documentation, comments and procedural code. "Object File" means a file, in substantially binary form, which is directly executable by a computer after linking applicable files. "Library" means a file, composed of several Object Files, which is directly executable by a computer after linking applicable files. "Software" means a set of Source Code including information on its use. "Wnn6 Client Library" the computer program, originally supplied by OMRON, which can be used to create Wnn6 Client Library. "Executable Module" means a file, created after linking Object Files or Library, which is directly executable by a computer. "User" means anyone who uses the Wnn6 Client Library under the License Agreement. Article 2. Copyright 2.1 OMRON Corporation and OMRON Software Co., Ltd. jointly own the Wnn6 Client Library, including, without limitation, its copyright. 2.2 Following words followed by the above copyright notices appear in all supporting documentation of software based on Wnn6 Client Library: This software is based on the original version of Wnn6 Client Library developed by OMRON Corporation and OMRON Software Co., Ltd. and also based on the original version of Wnn developed by Kyoto University Research Institute for Mathematical Sciences (KURIMS), OMRON Corporation and ASTEC Inc. Article 3. Grant 3.1 A User is permitted to make and distribute verbatim copies of the Wnn6 Client Library, including verbatim of copies of the License Agreement, under the License Agreement. 3.2 A User is permitted to modify the Wnn6 Client Library to create Software ("Modified Software") under the License Agreement. A User is also permitted to make or distribute copies of Modified Software, including verbatim copies of the License Agreement with the following information. Upon modifying the Wnn6 Client Library, a User MUST insert comments--stating the name of the User, the reason for the modifications, the date of the modifications, additional terms and conditions on the part of the modifications if there is any, and potential risks of using the Modified Software if they are known--right after the end of the License Agreement (or the last comment, if comments are inserted already). 3.3 A User is permitted to create Library or Executable Modules by modifying the Wnn6 Client Library in whole or in part under the License Agreement. A User is also permitted to make or distribute copies of Library or Executable Modules with verbatim copies of the License Agreement under the License Agreement. Upon modifying the Wnn6 Client Library for creating Library or Executable Modules, except for porting a computer, a User MUST add a text file to a package of the Wnn6 Client Library, providing information on the name of the User, the reason for the modifications, the date of the modifications, additional terms and conditions on the part of the modifications if there is any, and potential risks associated with using the modified Wnn6 Client Library, Library or Executable Modules if they are known. 3.4 A User is permitted to incorporate the Wnn6 Client Library in whole or in part into another Software, although its license terms and conditions may be different from the License Agreement, if such incorporation or use associated with the incorporation does NOT violate the License Agreement. Article 4. Warranty THE WNN6 CLIENT LIBRARY IS PROVIDED BY OMRON ON AN "AS IS" BAISIS. OMRON EXPRESSLY DISLCIAMS ANY AND ALL WRRANTIES, EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, IN CONNECTION WITH THE WNN6 CLIENT LIBRARY OR THE USE OR OTHER DEALING IN THE WNN6 CLIENT LIBRARY. IN NO EVENT SHALL OMRON BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL DAMAGES OF ANY KIND WHATSOEVER IN CONNECTION WITH THE WNN6 CLIENT LIBRARY OR THE USE OR OTHER DEALING IN THE WNN6 CLIENT LIBRARY. *************************************************************************** Wnn6 Client Library : (C) Copyright OMRON Corporation. 1995,1998,2000 all rights reserved. (C) Copyright OMRON Software Co., Ltd. 1995,1998,2000 all rights reserved. Wnn Software : (C) Copyright Kyoto University Research Institute for Mathematical Sciences 1987, 1988, 1989, 1990, 1991, 1992, 1993 (C) Copyright OMRON Corporation. 1987, 1988, 1989, 1990, 1991, 1992, 1993 (C) Copyright ASCTEC, Inc. 1987, 1988, 1989, 1990, 1991, 1992, 1993 *************************************************************************** Comments on Modifications: */ /*********************************************************************** rk_spclval.h 87.12. 3 ²þ Àµ ËÜÊÑ´¹¤Ç»È¤Ã¤Æ¤¤¤ëÆüì¤ÊÃͤÎÄêµÁ¡Ê³°Éô¤Ë¤â½Ð¤¹¡Ë¡£¥Þ¥¯¥í ´Ø¿ô¤â¡¢ctype.h¤ò»È¤¦¤â¤Î°Ê³°¤Ï¤³¤Á¤é¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£ rk_macros.h ¤Ëinclude¤µ¤ì¤Æ¤¤¤ë¡£ ***********************************************************************/ /* Version 3.0 */ #ifndef _RK_SPCLVAL_H_ #define _RK_SPCLVAL_H_ #ifndef EOLTTR typedef unsigned int letter; /* ʸ»ú¤Ï°ìÈ̤ˤ³¤Î·¿¤Çɽ¤¹ */ typedef unsigned char uns_chr; #define LTRHUG (~(0xff000000)) /* ÆâÉôɽ¸½ µÚ¤Óµ¶Ê¸»ú¤ò½ü¤¯¡¢letter¤Î¼è¤êÆÀ¤ëºÇÂçÃÍ */ /* °Ê²¼¤ËÄêµÁ¤¹¤ëÃͤϡ¢ºÇ¾å°Ì¥Ð¥¤¥È¤¬255¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£ ¤³¤ì¤é¤Î¤¦¤Á¡¢³°¤Ë½Ð¤ë¤Î¤Ï EOLTTR¡¢CHMSIG¡¢NISEBP¡¢LTREOF¤È REDRAW¡Êµ¶¥Ç¥ê¡¼¥È¤È¤·¤ÆNISEDL¤ò»È¤¦¾ì¹ç¤ÏNISEDL¤â¡Ë¡£*/ #define EOLTTR ((letter)-1) /* ʸ»úÎó¤Î½ªÃ¼¤òɽ¤¹¥³¡¼¥É */ /* ¥¡¼ÆþÎϤ¬¤¢¤Ã¤¿¤éɬ¤º²¿¤«¥³¡¼¥É¤òÊÖ¤¹¾õÂ֤ˤ·¤Æ ¤ª¤¯¤È¡¢ÆäËÊÖ¤¹¤Ù¤¤â¤Î¤¬¤Ê¤¤»þ¤Ï¤³¤ì¤òÊÖ¤¹¡£*/ #define ERRCOD ((letter)-2) /* (error)¤òɽ¤¹ÆâÉô¥³¡¼¥É */ #define CHMSIG ((letter)-3) /* ¥â¡¼¥É¥Á¥§¥ó¥¸¤òɽ¤¹¥³¡¼¥É */ #define NISEBP ((letter)-4) /* ¥¨¥é¡¼·Ù¹ðÍѤε¶BEL¥³¡¼¥É */ #define VARRNG ((letter)-5) /* ÊѰ褬Æó¤Ä¤Îʸ»ú¤Î´Ö¤Ç¤¢¤ë¤Î¤ò¼¨¤¹ÆâÉô¥³¡¼¥É*/ #define UNUSDC ((letter)-6) /* ¥Þ¥Ã¥Á¤ò¼ºÇÔ¤µ¤»¤ë¤¿¤á¤ÎÆâÉô¥³¡¼¥É */ #define REASIG ((letter)-7) /* ɽ¤ÎºÆÀßÄê¤òÍ׵᤹¤ë¤¿¤á¤ÎÆâÉô¥³¡¼¥É */ #define URBFCL ((letter)-8) /* ΢¥Ð¥Ã¥Õ¥¡¤ÎÌÀ¼¨Åª¥¯¥ê¥¢¤òÍ׵᤹¤ëÆâÉô¥³¡¼¥É*/ #define LTREOF ((letter)-9) /* romkan_next()¡¢Æ±getc()¤¬EOF¤ÎÂå¤ï¤ê¤ËÊÖ¤¹¤â¤Î ¡Ê¤Ç¤¤ì¤ÐEOF¤ÈƱ¤¸¤Ë¤·¤¿¤¤¤¬¡Ä¡Ë*/ #define REDRAW ((letter)-10)/* Wnn¤ËÊÑ´¹¹Ô¤Îredraw¤òÍ׵᤹¤ëÆü쥳¡¼¥É */ #define NISEDL ((letter)-11)/* µ¶¥Ç¥ê¡¼¥È¤È¤·¤ÆÄê¿ô¤ò»È¤¤¤¿¤¤¿Í¤Î¤¿¤á¤Ë½àÈ÷ ¤µ¤ì¤¿Äê¿ô¡Ê⤷¡¢»È¤¤¤¿¤¯¤Ê¤±¤ì¤Ð»È¤ï¤Ê¤¯¤Æ¤â ¤¤¤¤¡Ë¡£ÊÑ¿ônisedl¤Ë¥»¥Ã¥È¤·¤Æ»È¤¦ */ /* romkan_init3()¤Î°ú¿ô¤Î¥Õ¥é¥°¤Ë»È¤¦ÃÍ */ #define RK_CHMOUT 01 /* ¥â¡¼¥É¥Á¥§¥ó¥¸¤òÃΤ餻¤ë¥³¡¼¥É¤òÊÖ¤¹¤«¡© */ #define RK_KEYACK 02 /* ¥¡¼¥¤¥ó¤ËÂФ·É¬¤º²¿¤«¤òÊÖ¤¹¤« */ #define RK_DSPNIL 04 /* ¥â¡¼¥Éɽ¼¨Ê¸»úÎó̵»ØÄê¤Î»þ¤Ë¶õʸ»úÎó¤òÊÖ¤¹¤«¡Ê¥Ç¥Õ ¥©¥ë¥È¤ÏNULL¡Ë¡£¸ß´¹ÀÊÝ»ý¤Î¤¿¤á */ #define RK_NONISE 010 /* µ¶¥³¡¼¥É¤ò½Ð¤µ¤Ê¤¤¤è¤¦¤Ë¤¹¤ë¤« */ #define RK_REDRAW 020 /* WnnÍÑÆüì¥Õ¥é¥°¡ÊredrawÍѤΥե饰¤ò½Ð¤¹¤«¤É¤¦¤«¡Ë*/ #define RK_SIMPLD 040 /* delete¤ÎÆ°ºî¤òñ½ã¤Ë¤¹¤ë¤« */ #define RK_VERBOS 0100 /* »ÈÍѤ¹¤ëɽ¤Î°ìÍ÷¤ò¥ê¥Ý¡¼¥È¤¹¤ë¤« */ /* ¥³¡¼¥É¤Î¶èÊ̤˻Ȥ¦¥Þ¥¯¥í */ #define HG1BIT (0x80000000) /* ºÇ¾å°Ì¥Ó¥Ã¥È¤À¤è */ #define SHUBET(X) ((letter)(X) >> (int)24) /* ÆâÉôɽ¸½¤Ç¡¢¾å£±¥Ð¥¤¥È¤ò¼ïÊÌɽ¸½¤Ë»È¤Ã¤Æ¤ë */ #define LWRMSK(X) ((X) & ~(0xff000000)) /* ¾å£±¥Ð¥¤¥È¤ò¼è¤ê½ü¤¯ */ #define LWRCUT(X) ((X) &= ~(0xff000000)) /* ¾å£±¥Ð¥¤¥È¤ò¼è¤ê½ü¤¯ */ #define is_HON(X) (SHUBET(X) == 0) /* ËÜʪ¤Îʸ»ú¤« */ #define NAIBEX(X) (0 < SHUBET(X) && SHUBET(X) < 0x80) /* ÆâÉôɽ¸½¤ò¼¨¤¹Ãͤ« */ #define isNISE(X) (SHUBET(X) == 0x80) /* µ¶Êª¤Îʸ»ú¤«¡ÊºÇ¾å°Ì¥Ó¥Ã¥È¤¬Î©¤Ä¡Ë */ #define isSPCL(X) (SHUBET(X) == 0xff) /* rk_spclval.h¤ÇÄêµÁ¤µ¤ì¤ëÃͤ«¤É¤¦¤«*/ /* NISEDL¤Ê¤É¤ò´Þ¤á¤¿µ¶¤Îʸ»ú¤Ç¤¢¤ë¤«¤É¤¦¤«¤òȽÄꤹ¤ë¤Ë¤Ï¡¢~is_HON(X) ¤«¡¢ isNISE(X) || isSPCL(X) ¤È¤·¤ÆȽÄꤷ¤Ê¤¤¤È¤¤¤±¤Ê¤¤¡£*/ #define toNISE(X) ((X) | HG1BIT) #define to_HON(X) ((X) & ~HG1BIT) /* ¸ß´¹À¤Î¤¿¤áÍÑ°Õ¤·¤Æ¤¢¤ëÊÌ̾ */ #define REALCD(X) is_HON(X) #define NISECD(X) isNISE(X) #define SPCLCD(X) isSPCL(X) /** Ⱦ³Ñʸ»ú¤Î¥³¡¼¥É¤Îdefine */ #ifndef HNKAK1 # ifdef IKIS # define HNKAK1 0xA8 # else # define HNKAK1 0x8E # endif #endif /** rk_bltinfn.c ¤ÎÊä´°¤Î¤¿¤á¤Î¥Þ¥¯¥í ¡Ê°ú¿ô¤òÊ£¿ô²óɾ²Á¤¹¤ë¤â¤Î¤â¿¤¤¤Î¤ÇÃí°Õ¡Ë*/ #define HKKBGN (HNKAK1 * 0x100 + 0xA1) /* Ⱦ³Ñ¥«¥Ê¤Î¶çÅÀ */ #define HKKEND (HNKAK1 * 0x100 + 0xDF) /* ¡· ȾÂùÅÀ */ #define HIRBGN (0xA4A1) /* ¤¡ */ #define HIREND (0xA4F3) /* ¤ó */ /* ¤Ò¤é¤¬¤Ê¡§"¤¡"¡Á"¤ó" */ #define KATBGN (0xA5A1) /* ¥¡ */ #define KATEND (0xA5F6) /* ¥ö */ /* ¥«¥¿¥«¥Ê¡§"¥¡"¡Á"¥ó"¡Á"¥ö" */ #define _to_kata(l) ((l) + (KATBGN - HIRBGN)) /** ¥«¥¿¥«¥Ê¤Ø¡ÊÄêµÁ°èÀ©¸Â¡Ë*/ #define _to_hira(l) ((l) - (KATBGN - HIRBGN)) /** ¤Ò¤é¤¬¤Ê¤Ø¡ÊÄêµÁ°èÀ©¸Â¡Ë*/ #define is_hira(l) (HIRBGN <= (l) && (l) <= HIREND) /** ¤Ò¤é¤¬¤Ê¤«¡© */ #define is_kata(l) (KATBGN <= (l) && (l) <= KATEND) /** ¥«¥¿¥«¥Ê¤«¡© */ #define is_kata2(l) (_to_kata(HIRBGN) <= (l) && (l) <= _to_kata(HIREND)) /** Âбþ¤¹¤ë¤Ò¤é¤¬¤Ê¤Î¤¢¤ë¥«¥¿¥«¥Ê¤«¡© */ #define to_kata(l) (is_hira(l) ? _to_kata(l) : (l)) /** ¥«¥¿¥«¥Ê¤Ø */ #define to_hira(l) (is_kata2(l) ? _to_hira(l) : (l)) /** ¤Ò¤é¤¬¤Ê¤Ø¡£¡Ö¥ô¥õ¥ö¡×¤Ï¥«¥¿¥«¥Ê¤Î¤Þ¤Þ»Ä¤ë¡£*/ #define is_hankata(l) (HKKBGN <= (l) && (l) <= HKKEND) /** Ⱦ³Ñ¥«¥Ê¡Ê¶çÅÀ¤Ê¤É¤ò´Þ¤à¡Ë¤«¡© */ /* ¤½¤Î¾¤Î¥Þ¥¯¥í´Ø¿ô·²¡Ê°ú¿ô¤òÊ£¿ô²óɾ²Á¤¹¤ë¤â¤Î¤â¿¤¤¤Î¤ÇÃí°Õ¡Ë*/ #define numberof(array) (sizeof(array) / sizeof(*array)) /* ¥Ý¥¤¥ó¥¿¤òletter¤ÎÎó¤ÎËöÈø¤Ø¤â¤Ã¤Æ¤¤¤¯¡£letter *lp */ #define totail(lp) {while(*(lp) != EOLTTR) (lp)++;} /* ʸ»úÎó¤Ø¤Î¥Ý¥¤¥ó¥¿¤ò¤½¤Îʸ»úÎó¤ÎºÇ¸åÈø¤Ø¡£totail¤ÎcharÈÇ¡£char *sp */ #define strtail(sp) {while(*(sp)) (sp)++;} /* ¸ÂÄêÈÇromkan_init3 */ #define romkan_init4(pathname, delchr, nisedl, keyin, bytecount, flg) \ romkan_init3(pathname, delchr, nisedl, EOLTTR, \ keyin, bytecount, bytecount, 0, flg) #define romkan_init5(pathname, delchr, keyin, bytecount, flg) \ romkan_init4(pathname, delchr, toNISE(delchr), keyin, bytecount, flg) /* romkan_init3 for Multi-threaded */ #define romkan_init4_mt(pathname, delchr, nisedl, keyin, bytecount, flg) \ romkan_init3_mt(pathname, delchr, nisedl, EOLTTR, \ keyin, bytecount, bytecount, 0, flg) #define romkan_init5_mt(pathname, delchr, keyin, bytecount, flg) \ romkan_init4_mt(pathname, delchr, toNISE(delchr), keyin, bytecount, flg) #endif /* of ifndef EOLTTR */ #endif /* _RK_SPCLVAL_H_ */