]> git.proxmox.com Git - mirror_edk2.git/blame - StdLib/Include/nl_types.h
Fix GCC build errors.
[mirror_edk2.git] / StdLib / Include / nl_types.h
CommitLineData
2aa62f2b 1/* $NetBSD: nl_types.h,v 1.11 2005/02/03 04:39:32 perry Exp $ */\r
2\r
3/*-\r
4 * Copyright (c) 1996 The NetBSD Foundation, Inc.\r
5 * All rights reserved.\r
6 *\r
7 * This code is derived from software contributed to The NetBSD Foundation\r
8 * by J.T. Conklin.\r
9 *\r
10 * Redistribution and use in source and binary forms, with or without\r
11 * modification, are permitted provided that the following conditions\r
12 * are met:\r
13 * 1. Redistributions of source code must retain the above copyright\r
14 * notice, this list of conditions and the following disclaimer.\r
15 * 2. Redistributions in binary form must reproduce the above copyright\r
16 * notice, this list of conditions and the following disclaimer in the\r
17 * documentation and/or other materials provided with the distribution.\r
18 * 3. All advertising materials mentioning features or use of this software\r
19 * must display the following acknowledgement:\r
20 * This product includes software developed by the NetBSD\r
21 * Foundation, Inc. and its contributors.\r
22 * 4. Neither the name of The NetBSD Foundation nor the names of its\r
23 * contributors may be used to endorse or promote products derived\r
24 * from this software without specific prior written permission.\r
25 *\r
26 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS\r
27 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED\r
28 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
29 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS\r
30 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r
31 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r
32 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r
33 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r
34 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r
35 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r
36 * POSSIBILITY OF SUCH DAMAGE.\r
37 */\r
38\r
39#ifndef _NL_TYPES_H_\r
40#define _NL_TYPES_H_\r
41#include <sys/EfiCdefs.h>\r
42\r
43#ifdef _NLS_PRIVATE\r
44/*\r
45 * MESSAGE CATALOG FILE FORMAT.\r
46 *\r
47 * The NetBSD message catalog format is similar to the format used by\r
48 * Svr4 systems. The differences are:\r
49 * * fixed byte order (big endian)\r
50 * * fixed data field sizes\r
51 *\r
52 * A message catalog contains four data types: a catalog header, one\r
53 * or more set headers, one or more message headers, and one or more\r
54 * text strings.\r
55 */\r
56\r
57#define _NLS_MAGIC 0xff88ff89\r
58\r
59struct _nls_cat_hdr {\r
60 int32_t __magic;\r
61 int32_t __nsets;\r
62 int32_t __mem;\r
63 int32_t __msg_hdr_offset;\r
64 int32_t __msg_txt_offset;\r
65} ;\r
66\r
67struct _nls_set_hdr {\r
68 int32_t __setno; /* set number: 0 < x <= NL_SETMAX */\r
69 int32_t __nmsgs; /* number of messages in the set */\r
70 int32_t __index; /* index of first msg_hdr in msg_hdr table */\r
71} ;\r
72\r
73struct _nls_msg_hdr {\r
74 int32_t __msgno; /* msg number: 0 < x <= NL_MSGMAX */\r
75 int32_t __msglen;\r
76 int32_t __offset;\r
77} ;\r
78\r
79#endif\r
80\r
81#define NL_SETD 1\r
82#define NL_CAT_LOCALE 1\r
83\r
84typedef struct __nl_cat_d {\r
85 void *__data;\r
86 int __size;\r
87} *nl_catd;\r
88\r
89typedef LONG32 nl_item;\r
90\r
91__BEGIN_DECLS\r
92nl_catd catopen(const char *, int);\r
93char *catgets(nl_catd, int, int, const char *)\r
94 __attribute__((__format_arg__(4)));\r
95int catclose(nl_catd);\r
96__END_DECLS\r
97\r
98#endif /* _NL_TYPES_H_ */\r