runefile.h revision 146261
1193323Sed/*-
2193323Sed * Copyright (c) 2005 Ruslan Ermilov
3193323Sed * All rights reserved.
4193323Sed *
5193323Sed * Redistribution and use in source and binary forms, with or without
6193323Sed * modification, are permitted provided that the following conditions
7193323Sed * are met:
8193323Sed * 1. Redistributions of source code must retain the above copyright
9193323Sed *    notice, this list of conditions and the following disclaimer.
10193323Sed * 2. Redistributions in binary form must reproduce the above copyright
11193323Sed *    notice, this list of conditions and the following disclaimer in the
12193323Sed *    documentation and/or other materials provided with the distribution.
13193323Sed *
14193323Sed * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15193323Sed * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16193323Sed * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17193323Sed * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18193323Sed * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19193323Sed * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20193323Sed * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21193323Sed * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22193323Sed * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23193323Sed * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24193323Sed * SUCH DAMAGE.
25193323Sed *
26193323Sed * $FreeBSD: head/lib/libc/locale/runefile.h 146261 2005-05-16 09:32:41Z ru $
27193323Sed */
28193323Sed
29193323Sed#ifndef _RUNEFILE_H_
30193323Sed#define	_RUNEFILE_H_
31193323Sed
32193323Sed#include <sys/types.h>
33193323Sed
34193323Sed#ifndef _CACHED_RUNES
35193323Sed#define	_CACHED_RUNES	(1 << 8)
36193323Sed#endif
37193323Sed
38193323Sedtypedef struct {
39193323Sed	int32_t		min;
40193323Sed	int32_t		max;
41193323Sed	int32_t		map;
42193323Sed} _FileRuneEntry;
43193323Sed
44193323Sedtypedef struct {
45193323Sed	char		magic[8];
46193323Sed	char		encoding[32];
47193323Sed
48193323Sed	uint32_t	runetype[_CACHED_RUNES];
49193323Sed	int32_t		maplower[_CACHED_RUNES];
50193323Sed	int32_t		mapupper[_CACHED_RUNES];
51193323Sed
52198090Srdivacky	int32_t		runetype_ext_nranges;
53198090Srdivacky	int32_t		maplower_ext_nranges;
54198090Srdivacky	int32_t		mapupper_ext_nranges;
55198090Srdivacky
56198090Srdivacky	int32_t		variable_len;
57198090Srdivacky} _FileRuneLocale;
58198090Srdivacky
59198090Srdivacky#define	_FILE_RUNE_MAGIC_1	"RuneMag1"
60193323Sed
61193323Sed#endif	/* !_RUNEFILE_H_ */
62193323Sed