xref: /freebsd/lib/libiconv_modules/mapper_std/citrus_mapper_std_file.h (revision f7c32ed617858bcd22f8d1b03199099d50125721)
1 /* $FreeBSD$ */
2 /*	$NetBSD: citrus_mapper_std_file.h,v 1.3 2006/09/09 14:35:17 tnozaki Exp $	*/
3 
4 /*-
5  * SPDX-License-Identifier: BSD-2-Clause
6  *
7  * Copyright (c)2003, 2006 Citrus Project,
8  * All rights reserved.
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  *
19  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
20  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
23  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29  * SUCH DAMAGE.
30  */
31 
32 #ifndef _CITRUS_MAPPER_STD_FILE_H_
33 #define _CITRUS_MAPPER_STD_FILE_H_
34 
35 #define _CITRUS_MAPPER_STD_MAGIC		"MAPPER\0\0"
36 
37 #define _CITRUS_MAPPER_STD_SYM_TYPE		"type"
38 #define _CITRUS_MAPPER_STD_SYM_INFO		"info"
39 #define _CITRUS_MAPPER_STD_SYM_TABLE		"table"
40 
41 #define _CITRUS_MAPPER_STD_TYPE_ROWCOL		"rowcol"
42 struct _citrus_mapper_std_rowcol_info_x {
43 	uint32_t		rcx_src_rowcol_bits;
44 	uint32_t		rcx_dst_invalid;
45 #define _CITRUS_MAPPER_STD_ROWCOL_MAX			4
46 	struct {
47 		uint32_t		begin;
48 		uint32_t		end;
49 	} __packed		rcx_src_rowcol[_CITRUS_MAPPER_STD_ROWCOL_MAX];
50 	uint32_t		rcx_dst_unit_bits;
51 	uint32_t		rcx_src_rowcol_len;
52 } __packed;
53 #define _CITRUS_MAPPER_STD_ROWCOL_INFO_SIZE		48
54 
55 /* old file layout */
56 struct _citrus_mapper_std_rowcol_info_compat_x {
57 	uint32_t		rcx_src_col_bits;
58 	uint32_t		rcx_dst_invalid;
59 	uint32_t		rcx_src_row_begin;
60 	uint32_t		rcx_src_row_end;
61 	uint32_t		rcx_src_col_begin;
62 	uint32_t		rcx_src_col_end;
63 	uint32_t		rcx_dst_unit_bits;
64 	uint32_t		rcx_pad;
65 } __packed;
66 #define _CITRUS_MAPPER_STD_ROWCOL_INFO_COMPAT_SIZE	32
67 
68 /* rowcol oob extension info */
69 #define _CITRUS_MAPPER_STD_SYM_ROWCOL_EXT_ILSEQ		"rowcol_ext_ilseq"
70 struct _citrus_mapper_std_rowcol_ext_ilseq_info_x {
71 #define _CITRUS_MAPPER_STD_OOB_NONIDENTICAL	0
72 #define _CITRUS_MAPPER_STD_OOB_ILSEQ		1
73 	uint32_t		eix_oob_mode;
74 	uint32_t		eix_dst_ilseq;
75 } __packed;
76 #define _CITRUS_MAPPER_STD_ROWCOL_EXT_ILSEQ_SIZE	8
77 
78 #endif
79