4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
25 * Copyright 2014 Garrett D'Amore <garrett@damore.org>
27 * Copyright (c) 1991,1997,2000 by Sun Microsystems, Inc.
28 * All rights reserved.
31 /* Copyright (c) 1988 AT&T */
32 /* All Rights Reserved */
37 #include <sys/isa_defs.h>
43 #define NL_SETD 1 /* XPG3 Conformant Default set number. */
44 #define NL_CAT_LOCALE (-1) /* XPG4 requirement */
46 #define _CAT_MAGIC 0xFF88FF89
47 #define _CAT_HDR_SIZE sizeof (struct _cat_hdr)
48 #define _CAT_SET_HDR_SIZE sizeof (struct _cat_set_hdr)
49 #define _CAT_MSG_HDR_SIZE sizeof (struct _cat_msg_hdr)
54 long __hdr_magic
; /* must contain CAT_MAGIC */
56 int __hdr_magic
; /* must contain CAT_MAGIC */
58 int __nsets
; /* the number of sets in the catalogue */
59 int __mem
; /* the size of the catalogue; the size */
60 /* does not include the size of the header */
62 long __msg_hdr_offset
; /* the byte offset of the first message */
64 long __msg_text_offset
; /* the byte offset of the message text area */
66 int __msg_hdr_offset
; /* the byte offset of the first message */
68 int __msg_text_offset
; /* the byte offset of the message text area */
74 int __set_no
; /* the set number; must be greater than 0; */
75 /* should be less than or equal to NL_SETMAX */
76 int __nmsgs
; /* the number of msgs in the set */
77 int __first_msg_hdr
; /* the index of the first message header in */
78 /* the set; the value is not a byte offset, */
79 /* it is a 0-based index */
84 int __msg_no
; /* the message number; must be greater than 0; */
85 /* should be less than or equal to NL_MSGMAX */
86 int __msg_len
; /* the length of the message; must be greater */
87 /* than or equal to zero; should be less than */
88 /* or equal to NL_TEXTMAX */
89 int __msg_offset
; /* the byte offset of the message in the message */
90 /* area; the offset is relative to the start of */
91 /* the message area, not to the start of the */
95 struct _nl_catd_struct
{
96 void *__content
; /* mmaped catalogue contents */
97 int __size
; /* Size of catalogue file */
98 int __trust
; /* File is from a trusted location */
101 typedef struct _nl_catd_struct
*nl_catd
;
102 typedef int nl_item
; /* XPG3 Conformant for nl_langinfo(). */
104 /* The following is just for the compatibility between OSF and Solaris */
105 /* Need to be removed later */
106 typedef nl_item __nl_item
;
108 int catclose(nl_catd
);
109 char *catgets(nl_catd
, int, int, const char *);
110 nl_catd
catopen(const char *, int);
116 #endif /* _NL_TYPES_H */