# HG changeset patch # User Koji Uno # Date 1271156820 -32400 # Node ID d2a803ab280b37a4bc8d7f1938ee95eb93dcc12d # Parent e6287d1755bae7951db02da2b5d75a1d89197b09 move localedef.h and lc_core.h into closed binary. diff -r e6287d1755ba -r d2a803ab280b usr/src/uts/arm/sys/Makefile --- a/usr/src/uts/arm/sys/Makefile Mon Apr 12 13:22:44 2010 +0900 +++ b/usr/src/uts/arm/sys/Makefile Tue Apr 13 20:07:00 2010 +0900 @@ -29,9 +29,6 @@ include ../../../Makefile.master -# Remarks: -# localedef.h and lc_core.h was imported from i386 OpenSolaris. - HDRS = \ archsystm.h \ asm_linkage.h \ @@ -50,8 +47,6 @@ inline.h \ kd.h \ kdi_machimpl.h \ - lc_core.h \ - localedef.h \ machelf.h \ machlock.h \ machsig.h \ diff -r e6287d1755ba -r d2a803ab280b usr/src/uts/arm/sys/lc_core.h --- a/usr/src/uts/arm/sys/lc_core.h Mon Apr 12 13:22:44 2010 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,443 +0,0 @@ -/* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _SYS_LC_CORE_H -#define _SYS_LC_CORE_H - -#pragma ident "@(#)lc_core.h 1.28 05/06/07 SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * COPYRIGHT NOTICE - * - * This source code is designated as Restricted Confidential Information - * and is subject to special restrictions in a confidential disclosure - * agreement between HP, IBM, SUN, NOVELL and OSF. Do not distribute - * this source code outside your company without OSF's specific written - * approval. This source code, and all copies and derivative works - * thereof, must be returned or destroyed at request. You must retain - * this notice on any copies which you make. - * - * (c) Copyright 1990, 1991, 1992, 1993 OPEN SOFTWARE FOUNDATION, INC. - * ALL RIGHTS RESERVED - */ -/* - * OSF/1 1.2 - */ - -/* - * @(#)$RCSfile: lc_core.h,v $ $Revision: 1.1.2.9 $ (OSF) $Date: 1992/03/26 - * 23:05:55 $ - */ - -/* - * 1.6 com/inc/sys/lc_core.h, libccnv, bos320, 9132320m 8/11/91 14:14:46 - * - * COMPONENT_NAME: (LIBCLOC) Locale Related Data Structures and API - * - * - * (C) COPYRIGHT International Business Machines Corp. 1985, 1989 - * All Rights Reserved - * Licensed Materials - Property of IBM - * - * US Government Users Restricted Rights - Use, duplication or - * disclosure restricted by GSA ADP Schedule Contract with IBM Corp. - */ - -/* - * WARNING: - * The interfaces defined in this header file are for Sun private use only. - * The contents of this file are subject to change without notice for the - * future releases. - */ - -#include -#include -#include -#include -#include -#include -#include - -#ifndef FALSE -#define FALSE (0) -#endif - -#ifndef TRUE -#define TRUE (1) -#endif - -/* - * In OSF/1, method elements in the structures point to functions - */ - - -/* - * Valid type ids for NLS objects - */ -typedef enum __lc_type_id_t { - _LC_CAR = 1, - _LC_LOCALE = 2, - _LC_CHARMAP = 3, - _LC_CTYPE = 4, - _LC_COLLATE = 5, - _LC_NUMERIC = 6, - _LC_MONETARY = 7, - _LC_TIME = 8, - _LC_MESSAGES = 9 -} __lc_type_id_t; - - -typedef struct { - __lc_type_id_t type_id; - unsigned int magic; - unsigned short major_ver; - unsigned short minor_ver; - size_t size; -} _LC_object_t; - -/* - * Object magic - */ -#define _LC_MAGIC 0x05F1 - -/* - * Version. Anytime the data structures in localedef or lc_core change - * in an incompatible way, this number should change - */ - -#define _LC_VERSION_MAJOR 3 -#define _LC_VERSION_MINOR 0 - -/* - * Methods structure - can be used interchangeably with each - * _LC_methods__t. - */ - -typedef void (*_LC_methods_func_t)(void); - -typedef struct { - short nmethods; /* no of methods array elements */ - short ndefined; /* no of methods defined in this object */ - _LC_methods_func_t methods[1]; -} _LC_methods_t; - -typedef struct { - short nmethods; /* no of methods array elements */ - short ndefined; /* no of methods defined in this object */ - - /* locale info method */ - char *(*nl_langinfo)(_LC_charmap_t *, nl_item); - - /* Process code conversion methods */ - int (*mbtowc)(_LC_charmap_t *, wchar_t *, const char *, - size_t); - size_t (*mbstowcs)(_LC_charmap_t *, wchar_t *, const char *, - size_t); - int (*wctomb)(_LC_charmap_t *, char *, wchar_t); - size_t (*wcstombs)(_LC_charmap_t *, char *, const wchar_t *, - size_t); - - /* Character encoding length method */ - int (*mblen)(_LC_charmap_t *, const char *, size_t); - - /* Character display width methods */ - int (*wcswidth)(_LC_charmap_t *, const wchar_t *, size_t); - int (*wcwidth)(_LC_charmap_t *, wchar_t); - - /* Solaris internal API */ - int (*mbftowc)(_LC_charmap_t *, char *, wchar_t *, - int (*)(void), int *); - - wint_t (*fgetwc)(_LC_charmap_t *, FILE *); - - /* MSE extension */ - wint_t (*btowc)(_LC_charmap_t *, int); - int (*wctob)(_LC_charmap_t *, wint_t); - int (*mbsinit)(_LC_charmap_t *, const mbstate_t *); - size_t (*mbrlen)(_LC_charmap_t *, const char *, size_t, mbstate_t *); - size_t (*mbrtowc)(_LC_charmap_t *, wchar_t *, const char *, - size_t, mbstate_t *); - size_t (*wcrtomb)(_LC_charmap_t *, char *, wchar_t, mbstate_t *); - size_t (*mbsrtowcs)(_LC_charmap_t *, wchar_t *, const char **, - size_t, mbstate_t *); - size_t (*wcsrtombs)(_LC_charmap_t *, char *, const wchar_t **, - size_t, mbstate_t *); - - /* reserved for future extension */ - _LC_methods_func_t placeholders[5]; -} _LC_methods_charmap_t; - -typedef struct { - _LC_object_t hdr; - - _LC_charmap_t *(*init)(_LC_locale_t *); - int (*destructor)(_LC_locale_t *); - - /* pointer to user API methods */ - _LC_methods_charmap_t *user_api; - - /* pointer to native API methods */ - _LC_methods_charmap_t *native_api; - - /* - * process code to process code conversion methods - */ - wchar_t (*__eucpctowc)(_LC_charmap_t *, wchar_t); - wchar_t (*__wctoeucpc)(_LC_charmap_t *, wchar_t); - void *data; -} _LC_core_charmap_t; - -/* - * Process code to process code conversion macros - * Note that `wc' is evalucated twice at run-time. _eucpctowc(*ws++) must - * be avoided. - */ -#define _eucpctowc(h, wc) \ - ((((uint32_t)wc) <= 0x9f) ? (wc) : (*(h->core.__eucpctowc))(h, (wc))) -#define _wctoeucpc(h, wc) \ - ((((uint32_t)wc) <= 0x9f) ? (wc) : (*(h->core.__wctoeucpc))(h, (wc))) - -typedef struct { - short nmethods; /* no of methods array elements */ - short ndefined; /* no of methods defined in this object */ - - /* classification methods */ - wctype_t (*wctype)(_LC_ctype_t *, const char *); - int (*iswctype)(_LC_ctype_t *, wchar_t, wctype_t); - - /* case conversion methods */ - wint_t (*towupper)(_LC_ctype_t *, wint_t); - wint_t (*towlower)(_LC_ctype_t *, wint_t); - wchar_t (*_trwctype)(_LC_ctype_t *, wchar_t, int); - wctrans_t (*wctrans)(_LC_ctype_t *, const char *); - wint_t (*towctrans)(_LC_ctype_t *, wint_t, wctrans_t); - - _LC_methods_func_t placeholders[5]; /* reserved for future extension */ -} _LC_methods_ctype_t; - -typedef struct { - _LC_object_t hdr; - - _LC_ctype_t *(*init)(_LC_locale_t *); - int (*destructor)(_LC_locale_t *); - - /* pointer to user API methods */ - _LC_methods_ctype_t *user_api; - - /* pointer to native API methods */ - _LC_methods_ctype_t *native_api; - void *data; -} _LC_core_ctype_t; - -typedef struct { - short nmethods; /* no of methods array elements */ - short ndefined; /* no of methods defined in this object */ - - /* character collation methods */ - int (*strcoll)(_LC_collate_t *, const char *, - const char *); - size_t (*strxfrm)(_LC_collate_t *, char *, const char *, - size_t); - - /* process code collation methods */ - int (*wcscoll)(_LC_collate_t *, const wchar_t *, - const wchar_t *); - size_t (*wcsxfrm)(_LC_collate_t *, wchar_t *, const wchar_t *, - size_t); - - /* filename matching methods */ - int (*fnmatch)(_LC_collate_t *, const char *, const char *, - const char *, int); - - /* regular expression methods */ - int (*regcomp)(_LC_collate_t *, regex_t *, const char *, - int); - size_t (*regerror)(_LC_collate_t *, int, const regex_t *, - char *, size_t); - int (*regexec)(_LC_collate_t *, const regex_t *, const char *, - size_t, regmatch_t *, int); - void (*regfree)(_LC_collate_t *, regex_t *); - - /* reserved for future extension */ - _LC_methods_func_t placeholders[5]; -} _LC_methods_collate_t; - -typedef struct { - _LC_object_t hdr; - - _LC_collate_t *(*init)(_LC_locale_t *); - int (*destructor)(_LC_locale_t *); - - /* pointer to user API methods */ - _LC_methods_collate_t *user_api; - - /* pointer to native API methods */ - _LC_methods_collate_t *native_api; - void *data; -} _LC_core_collate_t; - - -struct tm; -typedef struct { - short nmethods; /* no of methods array elements */ - short ndefined; /* no of methods defined in this object */ - - /* time info method */ - char *(*nl_langinfo)(_LC_time_t *, nl_item); - - /* time character string formatting methods */ - size_t (*strftime)(_LC_time_t *, char *, size_t, const char *, - const struct tm *); - char *(*strptime)(_LC_time_t *, const char *, const char *, - struct tm *); - struct tm *(*getdate)(_LC_time_t *, const char *); - - /* time process code string formatting methods */ - size_t (*wcsftime)(_LC_time_t *, wchar_t *, size_t, - const char *, const struct tm *); - - /* reserved for future extension */ - _LC_methods_func_t placeholders[5]; -} _LC_methods_time_t; - -typedef struct { - _LC_object_t hdr; - - _LC_time_t *(*init)(_LC_locale_t *); - int (*destructor)(_LC_locale_t *); - - /* pointer to user API methods */ - _LC_methods_time_t *user_api; - - /* pointer to native API methods */ - _LC_methods_time_t *native_api; - void *data; -} _LC_core_time_t; - -typedef struct { - short nmethods; /* no of methods array elements */ - short ndefined; /* no of methods defined in this object */ - - /* monetary info method */ - char *(*nl_langinfo)(_LC_monetary_t *, nl_item); - - /* character string monetary formatting method */ - ssize_t (*strfmon)(_LC_monetary_t *, char *, size_t, - const char *, va_list); - - /* reserved for future extension */ - _LC_methods_func_t placeholders[5]; -} _LC_methods_monetary_t; - -typedef struct { - _LC_object_t hdr; - - _LC_monetary_t *(*init)(_LC_locale_t *); - int (*destructor)(_LC_locale_t *); - - /* pointer to user API methods */ - _LC_methods_monetary_t *user_api; - - /* pointer to native API methods */ - _LC_methods_monetary_t *native_api; - void *data; -} _LC_core_monetary_t; - - -typedef struct { - short nmethods; /* no of methods array elements */ - short ndefined; /* no of methods defined in this object */ - - /* langinfo method */ - char *(*nl_langinfo)(_LC_numeric_t *, nl_item); - - /* reserved for future extension */ - _LC_methods_func_t placeholders[5]; -} _LC_methods_numeric_t; - -typedef struct { - _LC_object_t hdr; - - _LC_numeric_t *(*init)(_LC_locale_t *); - int (*destructor)(_LC_locale_t *); - - /* pointer to user API methods */ - _LC_methods_numeric_t *user_api; - - /* pointer to native API methods */ - _LC_methods_numeric_t *native_api; - void *data; -} _LC_core_numeric_t; - -typedef struct { - short nmethods; /* no of methods array elements */ - short ndefined; /* no of methods defined in this object */ - - /* langinfo method */ - char *(*nl_langinfo)(_LC_messages_t *, nl_item); - - /* reserved for future extension */ - _LC_methods_func_t placeholders[5]; -} _LC_methods_messages_t; - -typedef struct { - _LC_object_t hdr; - - _LC_messages_t *(*init)(_LC_locale_t *); - int (*destructor)(_LC_locale_t *); - - /* pointer to user API methods */ - _LC_methods_messages_t *user_api; - - /* pointer to native API methods */ - _LC_methods_messages_t *native_api; - void *data; -} _LC_core_messages_t; - -typedef struct { - short nmethods; /* no of methods array elements */ - short ndefined; /* no of methods defined in this object */ - - /* langinfo method */ - char *(*nl_langinfo)(_LC_locale_t *, nl_item); - struct lconv *(*localeconv)(_LC_locale_t *); - /* reserved for future extension */ - _LC_methods_func_t placeholders[5]; -} _LC_methods_locale_t; - -typedef struct { - _LC_object_t hdr; - - _LC_locale_t *(*init)(_LC_locale_t *); - int (*destructor)(_LC_locale_t *); - - /* pointer to user API methods */ - _LC_methods_locale_t *user_api; - - /* pointer to native API methods */ - _LC_methods_locale_t *native_api; - void *data; -} _LC_core_locale_t; - - -extern char __mbst_get_nconsumed(const mbstate_t *); -extern void __mbst_set_nconsumed(mbstate_t *, char); -extern int __mbst_get_consumed_array(const mbstate_t *, char *, - size_t, size_t); -extern int __mbst_set_consumed_array(mbstate_t *, const char *, - size_t, size_t); -extern void *__mbst_get_locale(const mbstate_t *); -extern void __mbst_set_locale(mbstate_t *, const void *); -extern void __fseterror_u(FILE *); - -#ifdef __cplusplus -} -#endif - -#endif /* _SYS_LC_CORE_H */ diff -r e6287d1755ba -r d2a803ab280b usr/src/uts/arm/sys/localedef.h --- a/usr/src/uts/arm/sys/localedef.h Mon Apr 12 13:22:44 2010 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,483 +0,0 @@ -/* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _SYS_LOCALEDEF_H -#define _SYS_LOCALEDEF_H - -#pragma ident "@(#)localedef.h 1.29 06/04/11 SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * COPYRIGHT NOTICE - * - * This source code is designated as Restricted Confidential Information - * and is subject to special restrictions in a confidential disclosure - * agreement between HP, IBM, SUN, NOVELL and OSF. Do not distribute - * this source code outside your company without OSF's specific written - * approval. This source code, and all copies and derivative works - * thereof, must be returned or destroyed at request. You must retain - * this notice on any copies which you make. - * - * (c) Copyright 1990, 1991, 1992, 1993 OPEN SOFTWARE FOUNDATION, INC. - * ALL RIGHTS RESERVED - */ -/* - * OSF/1 1.2 - */ -/* - * @(#)$RCSfile: localedef.h,v $ $Revision: 1.1.4.3 $ (OSF) $Date: 1992/09/10 - * 19:00:58 $ - */ -/* - * COMPONENT_NAME: (CMDLOC) Locale Database Commands - * - * - * (C) COPYRIGHT International Business Machines Corp. 1991 - * All Rights Reserved - * - * US Government Users Restricted Rights - Use, duplication or - * disclosure restricted by GSA ADP Schedule Contract with IBM Corp. - * - * 1.13 com/inc/sys/localedef.h, libcnls, bos320, 9132320 7/31/91 09:53:36 - */ -/* - * WARNING: - * The interfaces defined in this header file are for Sun private use only. - * The contents of this file are subject to change without notice for the - * future releases. - */ -/* - * Call the method named 'n' from the handle 'h'. - * - * METHOD() is used to invoke a user mode API method (i.e., either EUC - * Process Code or Dense Process Code mode in 2.6) - * - * METHOD_NATVE() is used to explicitly invoke a native mode API method - * (i.e., Dense Process Code mode in 2.6) - */ -#define METHOD(h, n) (*(h->core.user_api->n)) -#define METHOD_NATIVE(h, n) (*(h->core.native_api->n)) - -/* - * Forward define the major locale class objects before any - * possible references - */ -typedef struct _LC_charmap_t _LC_charmap_t; -typedef struct _LC_monetary_t _LC_monetary_t; -typedef struct _LC_numeric_t _LC_numeric_t; -typedef struct _LC_messages_t _LC_messages_t; -typedef struct _LC_time_t _LC_time_t; -typedef struct _LC_collate_t _LC_collate_t; -typedef struct _LC_ctype_t _LC_ctype_t; -typedef struct _LC_locale_t _LC_locale_t; - -#include - -#ifdef _LOCALEDEF -#define _const /* So localedef can assign into locale objects */ -#else /* _LOCALEDEF */ -#define _const const /* Warn about any assignments */ -#endif /* _LOCALEDEF */ - -/* - * _LC_charmap_t - * - * Structure representing CHARMAP class which maps characters to process code - * and vice-versa. - */ -typedef struct { - char euc_bytelen0, - euc_bytelen1, /* byte length of CS1 (eucw1) */ - euc_bytelen2, /* byte length of CS2 (eucw2) */ - euc_bytelen3; /* byte length of CS3 (eucw3) */ - char euc_scrlen0, - euc_scrlen1, /* screen column len of CS1 (scrw1) */ - euc_scrlen2, /* screen column len of CS2 (scrw2) */ - euc_scrlen3; /* screen column len of CS3 (scrw3) */ - wchar_t cs1_base; /* CS1 dense code base value */ - wchar_t cs2_base; /* CS2 dense code base value */ - wchar_t cs3_base; /* CS3 dense code base value */ - wchar_t dense_end; /* dense code last value */ - wchar_t cs1_adjustment; /* CS1 adjustment value */ - wchar_t cs2_adjustment; /* CS2 adjustment value */ - wchar_t cs3_adjustment; /* CS3 adjustment value */ -} _LC_euc_info_t; - -typedef enum { - _FC_EUC, /* any EUC */ - _FC_UTF8, /* UTF-8 */ - _FC_OTHER /* anything else (SJIS, Big5, etc.) */ -} _LC_fc_type_t; - -typedef enum { - _PC_EUC, /* EUC Process Code */ - _PC_DENSE, /* Dense Process Code */ - _PC_UCS4 /* ISO 10646 UCS4 */ -} _LC_pc_type_t; - -typedef struct { - wchar_t min; /* min wchar of this chunk */ - wchar_t max; /* max wchar of this chunk */ -} _LC_width_range_t; - -typedef struct { - unsigned char width; /* column width for this chunk */ - int entries; /* number of entries in this chunk */ - _const _LC_width_range_t *ranges; /* range table */ -} _LC_widthtabs_t; - -struct _LC_charmap_t { - _LC_core_charmap_t core; - - _const char *cm_csname; /* codeset name */ - - _LC_fc_type_t cm_fc_type; /* file code type */ - _LC_pc_type_t cm_pc_type; /* process code type */ - - size_t cm_mb_cur_max; /* max encoding length for this codeset */ - size_t cm_mb_cur_min; /* min encoding length for this codeset */ - - unsigned char cm_reserved; /* reserved */ - unsigned char cm_def_width; /* default width */ - unsigned char cm_base_max; /* base area size: 0, 127, or 255 */ - unsigned char cm_tbl_ent; /* # of extended table entries */ - - _LC_euc_info_t *cm_eucinfo; /* pointer to EUC info table */ - - _LC_widthtabs_t *cm_tbl; /* width table */ -}; - - -/* - * _LC_monetary_t - * - * Structure representing MONETARY class which defines the formatting - * of monetary quantities for a locale. - */ -struct _LC_monetary_t { - _LC_core_monetary_t core; - - _const char *int_curr_symbol; /* international currency symbol */ - _const char *currency_symbol; /* national currency symbol */ - _const char *mon_decimal_point; /* currency decimal point */ - _const char *mon_thousands_sep; /* currency thousands separator */ - _const char *mon_grouping; /* currency digits grouping */ - _const char *positive_sign; /* currency plus sign */ - _const char *negative_sign; /* currency minus sign */ - char int_frac_digits; /* internat currency fract digits */ - char frac_digits; /* currency fractional digits */ - char p_cs_precedes; /* currency plus location */ - char p_sep_by_space; /* currency plus space ind. */ - char n_cs_precedes; /* currency minus location */ - char n_sep_by_space; /* currency minus space ind. */ - char p_sign_posn; /* currency plus position */ - char n_sign_posn; /* currency minus position */ - - char int_p_cs_precedes; /* int'l currency plus location */ - char int_p_sep_by_space; /* int'l currency plus space ind. */ - char int_n_cs_precedes; /* int'l currency minus location */ - char int_n_sep_by_space; /* int'l currency minus space ind. */ - char int_p_sign_posn; /* int'l currency plus position */ - char int_n_sign_posn; /* int'l currency minus position */ - -}; - - -/* - * _LC_numeric_t - * - * Structure representing NUMERIC class which defines the formatting - * of numeric quantities in a locale. - */ -struct _LC_numeric_t { - _LC_core_numeric_t core; - - /* Types of the following should be clarified later */ - _const char *decimal_point; - _const char *thousands_sep; - _const char *grouping; -}; - - -/* - * _LC_messages_t - * - * Structure representing MESSAGES class which defines the content - * of affirmative versus negative responses in a locale. - */ -struct _LC_messages_t { - _LC_core_messages_t core; - - _const char *yesexpr; /* POSIX: Expression for affirmative. */ - _const char *noexpr; /* POSIX: Expression for negative. */ - _const char *yesstr; /* X/OPEN: colon sep str for affirmative. */ - _const char *nostr; /* X/OPEN: colon sep str for negative. */ -}; - - -/* - * _LC_time_t - * - * Structure representing the TIME class which defines the formatting - * of time and date quantities in this locale. - */ -struct _LC_time_t { - _LC_core_time_t core; - - _const char *d_fmt; - _const char *t_fmt; - _const char *d_t_fmt; - _const char *t_fmt_ampm; - _const char *abday[7]; - _const char *day[7]; - _const char *abmon[12]; - _const char *mon[12]; - _const char *am_pm[2]; - _const char **era; /* NULL terminated array of strings */ - _const char *era_d_fmt; - _const char *alt_digits; - _const char *era_d_t_fmt; - _const char *era_t_fmt; - _const char *date_fmt; /* Solaris specific */ -}; - - -/* - * _LC_weight_t - */ - -typedef wchar_t *_LC_weight_t; - - -/* - * _LC_collel_t - * - * Collation data for a collation symbol - */ -typedef struct { - _const char *ce_sym; /* value of collation symbol */ - _LC_weight_t ce_wgt; /* The weights associated with a */ - /* collating symbol matching ce_sym */ -} _LC_collel_t; - - -/* - * _LC_subs_t - * - * Substring source and target pair - */ -typedef struct { - _LC_weight_t ss_act; - /* indicates for which orders this */ - /* susbstitution string is active. */ - _const char *ss_src; /* source string to match */ - _const char *ss_tgt; /* target string to replace */ -} _LC_subs_t; - -/* - * _LC_collate_t - * - * Structure representing COLLATE class defining the collation rules - * for a locale. - */ -struct _LC_collate_t { - _LC_core_collate_t core; - - _LC_charmap_t *cmapp; /* pointer to charmap object */ - unsigned char co_nord; /* number of collation orders */ - /* supported in this locale */ - unsigned char co_r_order; /* relative weight flag */ - -#ifdef _LP64 - unsigned char _filler[6]; -#else - unsigned char _filler[2]; -#endif - - _LC_weight_t co_sort; /* sort order */ - /* processing flags */ - - wchar_t co_wc_min; /* min process code */ - wchar_t co_wc_max; /* max process code */ - wchar_t co_hbound; /* max process code with */ - /* "unique" info */ - - wchar_t co_col_min; /* min unique coll weight */ - wchar_t co_col_max; /* max unique coll weight */ - - _const _LC_weight_t *co_coltbl; - /* array of collation weights */ - _const _LC_collel_t **co_cetbl; - /* array of collating elements */ - - unsigned char co_nsubs; /* number of sub strs */ - _const _LC_subs_t *co_subs; /* substitution strs */ -}; - -/* - * MASKS for the co_colmod[] sort modifier array - */ -#define _COLL_FORWARD_MASK 0x1 -#define _COLL_BACKWARD_MASK 0x2 -#define _COLL_NOSUBS_MASK 0x4 -#define _COLL_POSITION_MASK 0x8 -#define _COLL_SUBS_MASK 0x10 - -/* - * MASKS for the ss_act[] flags - */ -#define _SUBS_ACTIVE 1 -#define _SUBS_REGEXP 2 - -/* - * _LC_classnm_t - * - * Element mapping class name to a bit-unique mask. - */ -typedef struct { - _const char *name; - unsigned int mask; -} _LC_classnm_t; - - -/* - * _LC_ctype_t - * - * Structure representing CTYPE class which defines character - * membership in a character class. - */ - -/* - * User defined transformation name table - */ -typedef struct { - _const char *name; /* name of the transformation */ - unsigned int index; /* index value to transtab table */ - wchar_t tmin; /* minimum code for transformation */ - wchar_t tmax; /* maximum code for transformation */ -} _LC_transnm_t; - -typedef struct __LC_transtabs_t { - _const wchar_t *table; /* transformation table */ - wchar_t tmin; /* minimum code for sub-transformation */ - wchar_t tmax; /* maximum code for sub-transformation */ - struct __LC_transtabs_t *next; /* link to next sub-transformation */ -} _LC_transtabs_t; - - -/* - * LcBind tables to bind a name and a typed value - */ -typedef enum { - _LC_TAG_UNDEF, /* undefined */ - _LC_TAG_TRANS, /* transformation */ - _LC_TAG_CCLASS /* character class */ -} _LC_bind_tag_t; - -typedef void *_LC_bind_value_t; /* data type for any value */ - -typedef struct { - _const char *bindname; /* LCBIND name */ - _LC_bind_tag_t bindtag; /* tag (data type) */ - _LC_bind_value_t bindvalue; /* value */ -} _LC_bind_table_t; - -struct _LC_ctype_t { - _LC_core_ctype_t core; - - _LC_charmap_t *cmapp; /* pointer to charmap object */ - - /* min and max process code */ - wchar_t min_wc; - wchar_t max_wc; - - wchar_t max_upper; /* Last character with */ - /* upper-case equiv */ - wchar_t max_lower; /* Last character with */ - /* lower-case equiv */ - - /* upper, lower translation */ - _const wchar_t *upper; /* [0..max_upper] */ - _const wchar_t *lower; /* [0..max_lower] */ - - /* character class membership */ - _const unsigned int *mask; /* Array of masks for CPs 0..255 */ - _const unsigned int *qmask; /* Array of masks for CPs 255..+ */ - _const unsigned char *qidx; /* index into qmask for */ - /* CPs 255..+ */ - - wchar_t qidx_hbound; /* Last code-point with unique */ - /* qidx value */ - /* class name mapping */ - int nbinds; /* no of lcbind entries */ - _LC_bind_table_t *bindtab; /* pointer to lcbind table */ - - /* trans name mapping */ - int ntrans; /* no. of transtab array elements */ - _LC_transnm_t *transname; /* pointer to trans name tables */ - _const _LC_transtabs_t *transtabs; /* pointer to transtabs array */ - - /* For _ctype[] link */ - /* size of _ctype[] */ - size_t ctypesize; - /* pointer to _ctype[] of this locale */ - _const unsigned char *ctypedata; - /* reserved for future extension */ - void *reserved[8]; -}; - - -/* - * _LC_locale_t - * - * Entry point to locale database. setlocale() receives a pointer to - * this structure from __lc_load(). - */ - -/* - * IF THIS NUMBER CHANGES, IT MUST ALSO BE CHANGED IN - * langinfo.h - */ -#ifndef _NL_NUM_ITEMS -#define _NL_NUM_ITEMS 59 /* 58 + 1 */ -#endif - -struct _LC_locale_t { - _LC_core_locale_t core; - - struct lconv *nl_lconv; - - _LC_charmap_t *lc_charmap; - _LC_collate_t *lc_collate; - _LC_ctype_t *lc_ctype; - _LC_monetary_t *lc_monetary; - _LC_numeric_t *lc_numeric; - _LC_messages_t *lc_messages; - _LC_time_t *lc_time; - - /* to be used for specifying the size of nl_info */ - int no_of_items; - char *nl_info[_NL_NUM_ITEMS]; -}; - -#define _LC_MAX_OBJECTS 256 - -extern _LC_charmap_t *__lc_charmap; -extern _LC_collate_t *__lc_collate; -extern _LC_ctype_t *__lc_ctype; -extern _LC_monetary_t *__lc_monetary; -extern _LC_numeric_t *__lc_numeric; -extern _LC_messages_t *__lc_messages; -extern _LC_time_t *__lc_time; -extern _LC_locale_t *__lc_locale; - -#ifdef __cplusplus -} -#endif - -#endif /* _SYS_LOCALEDEF_H */