1*4297a3b0SGarrett D'Amore /* 2*4297a3b0SGarrett D'Amore * Copyright (c) 2005 Ruslan Ermilov 3*4297a3b0SGarrett D'Amore * All rights reserved. 4*4297a3b0SGarrett D'Amore * 5*4297a3b0SGarrett D'Amore * Redistribution and use in source and binary forms, with or without 6*4297a3b0SGarrett D'Amore * modification, are permitted provided that the following conditions 7*4297a3b0SGarrett D'Amore * are met: 8*4297a3b0SGarrett D'Amore * 1. Redistributions of source code must retain the above copyright 9*4297a3b0SGarrett D'Amore * notice, this list of conditions and the following disclaimer. 10*4297a3b0SGarrett D'Amore * 2. Redistributions in binary form must reproduce the above copyright 11*4297a3b0SGarrett D'Amore * notice, this list of conditions and the following disclaimer in the 12*4297a3b0SGarrett D'Amore * documentation and/or other materials provided with the distribution. 13*4297a3b0SGarrett D'Amore * 14*4297a3b0SGarrett D'Amore * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15*4297a3b0SGarrett D'Amore * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16*4297a3b0SGarrett D'Amore * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17*4297a3b0SGarrett D'Amore * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18*4297a3b0SGarrett D'Amore * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19*4297a3b0SGarrett D'Amore * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20*4297a3b0SGarrett D'Amore * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21*4297a3b0SGarrett D'Amore * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22*4297a3b0SGarrett D'Amore * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23*4297a3b0SGarrett D'Amore * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24*4297a3b0SGarrett D'Amore * SUCH DAMAGE. 25*4297a3b0SGarrett D'Amore */ 26*4297a3b0SGarrett D'Amore 27*4297a3b0SGarrett D'Amore #ifndef _RUNEFILE_H_ 28*4297a3b0SGarrett D'Amore #define _RUNEFILE_H_ 29*4297a3b0SGarrett D'Amore 30*4297a3b0SGarrett D'Amore #include <sys/types.h> 31*4297a3b0SGarrett D'Amore 32*4297a3b0SGarrett D'Amore #ifndef _CACHED_RUNES 33*4297a3b0SGarrett D'Amore #define _CACHED_RUNES (1 << 8) 34*4297a3b0SGarrett D'Amore #endif 35*4297a3b0SGarrett D'Amore 36*4297a3b0SGarrett D'Amore typedef struct { 37*4297a3b0SGarrett D'Amore int32_t min; 38*4297a3b0SGarrett D'Amore int32_t max; 39*4297a3b0SGarrett D'Amore int32_t map; 40*4297a3b0SGarrett D'Amore } _FileRuneEntry; 41*4297a3b0SGarrett D'Amore 42*4297a3b0SGarrett D'Amore typedef struct { 43*4297a3b0SGarrett D'Amore char magic[8]; 44*4297a3b0SGarrett D'Amore char encoding[32]; 45*4297a3b0SGarrett D'Amore 46*4297a3b0SGarrett D'Amore uint32_t runetype[_CACHED_RUNES]; 47*4297a3b0SGarrett D'Amore int32_t maplower[_CACHED_RUNES]; 48*4297a3b0SGarrett D'Amore int32_t mapupper[_CACHED_RUNES]; 49*4297a3b0SGarrett D'Amore 50*4297a3b0SGarrett D'Amore int32_t runetype_ext_nranges; 51*4297a3b0SGarrett D'Amore int32_t maplower_ext_nranges; 52*4297a3b0SGarrett D'Amore int32_t mapupper_ext_nranges; 53*4297a3b0SGarrett D'Amore 54*4297a3b0SGarrett D'Amore int32_t variable_len; 55*4297a3b0SGarrett D'Amore } _FileRuneLocale; 56*4297a3b0SGarrett D'Amore 57*4297a3b0SGarrett D'Amore #define _FILE_RUNE_MAGIC_1 "RuneMag1" 58*4297a3b0SGarrett D'Amore 59*4297a3b0SGarrett D'Amore #endif /* !_RUNEFILE_H_ */ 60