1228f8c4fSRuslan Ermilov /*- 2*4d846d26SWarner Losh * SPDX-License-Identifier: BSD-2-Clause 3d915a14eSPedro F. Giffuni * 4228f8c4fSRuslan Ermilov * Copyright (c) 2005 Ruslan Ermilov 5228f8c4fSRuslan Ermilov * All rights reserved. 6228f8c4fSRuslan Ermilov * 7228f8c4fSRuslan Ermilov * Redistribution and use in source and binary forms, with or without 8228f8c4fSRuslan Ermilov * modification, are permitted provided that the following conditions 9228f8c4fSRuslan Ermilov * are met: 10228f8c4fSRuslan Ermilov * 1. Redistributions of source code must retain the above copyright 11228f8c4fSRuslan Ermilov * notice, this list of conditions and the following disclaimer. 12228f8c4fSRuslan Ermilov * 2. Redistributions in binary form must reproduce the above copyright 13228f8c4fSRuslan Ermilov * notice, this list of conditions and the following disclaimer in the 14228f8c4fSRuslan Ermilov * documentation and/or other materials provided with the distribution. 15228f8c4fSRuslan Ermilov * 16228f8c4fSRuslan Ermilov * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17228f8c4fSRuslan Ermilov * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18228f8c4fSRuslan Ermilov * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19228f8c4fSRuslan Ermilov * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20228f8c4fSRuslan Ermilov * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21228f8c4fSRuslan Ermilov * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22228f8c4fSRuslan Ermilov * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23228f8c4fSRuslan Ermilov * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24228f8c4fSRuslan Ermilov * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25228f8c4fSRuslan Ermilov * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26228f8c4fSRuslan Ermilov * SUCH DAMAGE. 27228f8c4fSRuslan Ermilov */ 28228f8c4fSRuslan Ermilov 29228f8c4fSRuslan Ermilov #ifndef _RUNEFILE_H_ 30228f8c4fSRuslan Ermilov #define _RUNEFILE_H_ 31228f8c4fSRuslan Ermilov 32228f8c4fSRuslan Ermilov #include <sys/types.h> 33228f8c4fSRuslan Ermilov 34228f8c4fSRuslan Ermilov #ifndef _CACHED_RUNES 35228f8c4fSRuslan Ermilov #define _CACHED_RUNES (1 << 8) 36228f8c4fSRuslan Ermilov #endif 37228f8c4fSRuslan Ermilov 38228f8c4fSRuslan Ermilov typedef struct { 39228f8c4fSRuslan Ermilov int32_t min; 40228f8c4fSRuslan Ermilov int32_t max; 41228f8c4fSRuslan Ermilov int32_t map; 42228f8c4fSRuslan Ermilov } _FileRuneEntry; 43228f8c4fSRuslan Ermilov 44228f8c4fSRuslan Ermilov typedef struct { 45228f8c4fSRuslan Ermilov char magic[8]; 46228f8c4fSRuslan Ermilov char encoding[32]; 47228f8c4fSRuslan Ermilov 48228f8c4fSRuslan Ermilov uint32_t runetype[_CACHED_RUNES]; 49228f8c4fSRuslan Ermilov int32_t maplower[_CACHED_RUNES]; 50228f8c4fSRuslan Ermilov int32_t mapupper[_CACHED_RUNES]; 51228f8c4fSRuslan Ermilov 52228f8c4fSRuslan Ermilov int32_t runetype_ext_nranges; 53228f8c4fSRuslan Ermilov int32_t maplower_ext_nranges; 54228f8c4fSRuslan Ermilov int32_t mapupper_ext_nranges; 55228f8c4fSRuslan Ermilov 56228f8c4fSRuslan Ermilov int32_t variable_len; 57228f8c4fSRuslan Ermilov } _FileRuneLocale; 58228f8c4fSRuslan Ermilov 59228f8c4fSRuslan Ermilov #define _FILE_RUNE_MAGIC_1 "RuneMag1" 60228f8c4fSRuslan Ermilov 61228f8c4fSRuslan Ermilov #endif /* !_RUNEFILE_H_ */ 62