Print this page
remove support for non-ANSI compilation
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/head/nl_types.h
+++ new/usr/src/head/nl_types.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License, Version 1.0 only
6 6 * (the "License"). You may not use this file except in compliance
7 7 * with the License.
8 8 *
9 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 10 * or http://www.opensolaris.org/os/licensing.
11 11 * See the License for the specific language governing permissions
12 12 * and limitations under the License.
13 13 *
14 14 * When distributing Covered Code, include this CDDL HEADER in each
↓ open down ↓ |
14 lines elided |
↑ open up ↑ |
15 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 16 * If applicable, add the following below this CDDL HEADER, with the
17 17 * fields enclosed by brackets "[]" replaced with your own identifying
18 18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 19 *
20 20 * CDDL HEADER END
21 21 */
22 22 /*
23 23 * nl_types.h
24 24 *
25 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
26 + *
25 27 * Copyright (c) 1991,1997,2000 by Sun Microsystems, Inc.
26 28 * All rights reserved.
27 29 */
28 30
29 31 /* Copyright (c) 1988 AT&T */
30 32 /* All Rights Reserved */
31 33
32 34 #ifndef _NL_TYPES_H
33 35 #define _NL_TYPES_H
34 36
35 -#pragma ident "%Z%%M% %I% %E% SMI"
36 -
37 37 #include <sys/isa_defs.h>
38 38
39 39 #ifdef __cplusplus
40 40 extern "C" {
41 41 #endif
42 42
43 43 #define NL_SETD 1 /* XPG3 Conformant Default set number. */
44 44 #define NL_CAT_LOCALE (-1) /* XPG4 requirement */
45 45
46 46 #define _CAT_MAGIC 0xFF88FF89
47 47 #define _CAT_HDR_SIZE sizeof (struct _cat_hdr)
48 48 #define _CAT_SET_HDR_SIZE sizeof (struct _cat_set_hdr)
49 49 #define _CAT_MSG_HDR_SIZE sizeof (struct _cat_msg_hdr)
50 50
51 51 struct _cat_hdr
52 52 {
53 53 #if !defined(_LP64)
54 54 long __hdr_magic; /* must contain CAT_MAGIC */
55 55 #else
56 56 int __hdr_magic; /* must contain CAT_MAGIC */
57 57 #endif
58 58 int __nsets; /* the number of sets in the catalogue */
59 59 int __mem; /* the size of the catalogue; the size */
60 60 /* does not include the size of the header */
61 61 #if !defined(_LP64)
62 62 long __msg_hdr_offset; /* the byte offset of the first message */
63 63 /* header */
64 64 long __msg_text_offset; /* the byte offset of the message text area */
65 65 #else
66 66 int __msg_hdr_offset; /* the byte offset of the first message */
67 67 /* header */
68 68 int __msg_text_offset; /* the byte offset of the message text area */
69 69 #endif
70 70 };
71 71
72 72 struct _cat_set_hdr
73 73 {
74 74 int __set_no; /* the set number; must be greater than 0; */
75 75 /* should be less than or equal to NL_SETMAX */
76 76 int __nmsgs; /* the number of msgs in the set */
77 77 int __first_msg_hdr; /* the index of the first message header in */
78 78 /* the set; the value is not a byte offset, */
79 79 /* it is a 0-based index */
80 80 };
81 81
82 82 struct _cat_msg_hdr
83 83 {
84 84 int __msg_no; /* the message number; must be greater than 0; */
85 85 /* should be less than or equal to NL_MSGMAX */
86 86 int __msg_len; /* the length of the message; must be greater */
87 87 /* than or equal to zero; should be less than */
88 88 /* or equal to NL_TEXTMAX */
89 89 int __msg_offset; /* the byte offset of the message in the message */
90 90 /* area; the offset is relative to the start of */
91 91 /* the message area, not to the start of the */
92 92 /* catalogue. */
93 93 };
94 94
95 95 struct _nl_catd_struct {
96 96 void *__content; /* mmaped catalogue contents */
97 97 int __size; /* Size of catalogue file */
↓ open down ↓ |
51 lines elided |
↑ open up ↑ |
98 98 int __trust; /* File is from a trusted location */
99 99 };
100 100
101 101 typedef struct _nl_catd_struct *nl_catd;
102 102 typedef int nl_item; /* XPG3 Conformant for nl_langinfo(). */
103 103
104 104 /* The following is just for the compatibility between OSF and Solaris */
105 105 /* Need to be removed later */
106 106 typedef nl_item __nl_item;
107 107
108 -#ifdef __STDC__
109 108 int catclose(nl_catd);
110 109 char *catgets(nl_catd, int, int, const char *);
111 110 nl_catd catopen(const char *, int);
112 -#else
113 -int catclose();
114 -char *catgets();
115 -nl_catd catopen();
116 -#endif /* __STDC__ */
117 111
118 112 #ifdef __cplusplus
119 113 }
120 114 #endif
121 115
122 116 #endif /* _NL_TYPES_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX