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]
23 * Copyright 1988 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
30 #pragma ident "%Z%%M% %I% %E% SMI"
56 /* The maximum number of characters in the locale name */
58 #define MAXLOCALENAME 14
60 /* The maximum number of substitute mappings in LC_COLLATE table */
64 /* Max width of domain name */
68 /* Max width of format string for message domains */
72 /* Max width of the message string */
76 /* The directory where category components are kept */
78 #define LOCALE_DIR "/usr/share/lib/locale/"
80 /* The directory that is private to an individual workstation user */
82 #define PRIVATE_LOCALE_DIR "/etc/locale/"
84 /* The name of the file that contains default locale */
86 #define DEFAULT_LOC ".default"
91 #define CTYPE_SIZE 514
92 #endif /* _POSIX_SOURCE */
94 extern char * setlocale(/* int category, const char *locale */);
95 extern struct lconv
* localeconv(/* void */);
97 extern struct dtconv
* localdtconv();
101 * Numeric and monetary conversion information.
104 char *decimal_point
; /* decimal point character */
105 char *thousands_sep
; /* thousands separator character */
106 char *grouping
; /* grouping of digits */
107 char *int_curr_symbol
; /* international currency symbol */
108 char *currency_symbol
; /* local currency symbol */
109 char *mon_decimal_point
; /* monetary decimal point character */
110 char *mon_thousands_sep
; /* monetary thousands separator */
111 char *mon_grouping
; /* monetary grouping of digits */
112 char *positive_sign
; /* monetary credit symbol */
113 char *negative_sign
; /* monetary debit symbol */
114 char int_frac_digits
; /* intl monetary number of fractional digits */
115 char frac_digits
; /* monetary number of fractional digits */
116 char p_cs_precedes
; /* true if currency symbol precedes credit */
117 char p_sep_by_space
; /* true if space separates c.s. from credit */
118 char n_cs_precedes
; /* true if currency symbol precedes debit */
119 char n_sep_by_space
; /* true if space separates c.s. from debit */
120 char p_sign_posn
; /* position of sign for credit */
121 char n_sign_posn
; /* position of sign for debit */
124 #ifndef _POSIX_SOURCE
126 * Date and time conversion information.
129 char *abbrev_month_names
[12]; /* abbreviated month names */
130 char *month_names
[12]; /* full month names */
131 char *abbrev_weekday_names
[7]; /* abbreviated weekday names */
132 char *weekday_names
[7]; /* full weekday names */
133 char *time_format
; /* time format */
134 char *sdate_format
; /* short date format */
135 char *dtime_format
; /* date/time format */
136 char *am_string
; /* AM string */
137 char *pm_string
; /* PM string */
138 char *ldate_format
; /* long date format */
145 char *yesstr
; /* yes string */
146 char *nostr
; /* nostr */
152 #define valid(ptr) (ptr != (char *) NULL)
153 #define nl_init(lang) ((valid(lang) && *lang) ? \
154 (valid(setlocale (LC_ALL, lang) ) ? 0 : -1) \
156 #endif /* _POSIX_SOURCE */
158 #endif /* !__locale_h */