1 /* $NetBSD: rune.h,v 1.11 2006/02/16 19:19:49 tnozaki Exp $ */ 2 3 /*- 4 * Copyright (c) 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * Paul Borman at Krystal Technologies. 9 * 10 * Redistribution and use in source and binary forms, with or without 11 * modification, are permitted provided that the following conditions 12 * are met: 13 * 1. Redistributions of source code must retain the above copyright 14 * notice, this list of conditions and the following disclaimer. 15 * 2. Redistributions in binary form must reproduce the above copyright 16 * notice, this list of conditions and the following disclaimer in the 17 * documentation and/or other materials provided with the distribution. 18 * 3. Neither the name of the University nor the names of its contributors 19 * may be used to endorse or promote products derived from this software 20 * without specific prior written permission. 21 * 22 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * 34 * @(#)rune.h 8.1 (Berkeley) 6/27/93 35 */ 36 #ifndef _RUNE_H_ 37 #define _RUNE_H_ 38 39 #include <LibConfig.h> 40 41 #include <stdio.h> 42 #include <wchar.h> 43 #include "runetype.h" 44 45 /* 46 * map _RTYPE_x to _CTYPE_x 47 * 48 * XXX: these should be defined in ctype.h and used in isxxx macros. 49 * (note: current isxxx macros use "old" NetBSD masks and 50 * _CTYPE_x are not public.) 51 */ 52 #define _CTYPE_A _RUNETYPE_A 53 #define _CTYPE_C _RUNETYPE_C 54 #define _CTYPE_D _RUNETYPE_D 55 #define _CTYPE_G _RUNETYPE_G 56 #define _CTYPE_L _RUNETYPE_L 57 #define _CTYPE_P _RUNETYPE_P 58 #define _CTYPE_S _RUNETYPE_S 59 #define _CTYPE_U _RUNETYPE_U 60 #define _CTYPE_X _RUNETYPE_X 61 #define _CTYPE_B _RUNETYPE_B 62 #define _CTYPE_R _RUNETYPE_R 63 #define _CTYPE_I _RUNETYPE_I 64 #define _CTYPE_T _RUNETYPE_T 65 #define _CTYPE_Q _RUNETYPE_Q 66 #define _CTYPE_SWM _RUNETYPE_SWM 67 #define _CTYPE_SWS _RUNETYPE_SWS 68 #define _CTYPE_SW0 _RUNETYPE_SW0 69 #define _CTYPE_SW1 _RUNETYPE_SW1 70 #define _CTYPE_SW2 _RUNETYPE_SW2 71 #define _CTYPE_SW3 _RUNETYPE_SW3 72 73 /* 74 * Other namespace conversion. 75 */ 76 77 #define rune_t __nbrune_t 78 #define _RUNE_ISCACHED _NB_RUNE_ISCACHED 79 #define _CACHED_RUNES _NB_CACHED_RUNES 80 #define _DEFAULT_INVALID_RUNE _NB_DEFAULT_INVALID_RUNE 81 #define _RuneEntry _NBRuneEntry 82 #define _RuneRange _NBRuneRange 83 #define _RuneLocale _NBRuneLocale 84 #define _RUNE_MAGIC_1 _NB_RUNE_MAGIC_1 85 #define _RUNE_MODULE_1 _NB_RUNE_MODULE_1 86 #define _RUNE_CODESET _NB_RUNE_CODESET 87 88 /* 89 * global variables 90 */ 91 extern size_t __mb_len_max_runtime; 92 #define __MB_LEN_MAX_RUNTIME __mb_len_max_runtime 93 94 extern _RuneLocale _DefaultRuneLocale; 95 extern _RuneLocale *_CurrentRuneLocale; 96 extern const char *_PathLocale; 97 98 #define _LOCALE_ALIAS_NAME "locale.alias" 99 100 #endif /*! _RUNE_H_ */ 101