1da2e3ebdSchin /*********************************************************************** 2da2e3ebdSchin * * 3da2e3ebdSchin * This software is part of the ast package * 4*3e14f97fSRoger A. Faulkner * Copyright (c) 1985-2010 AT&T Intellectual Property * 5da2e3ebdSchin * and is licensed under the * 6da2e3ebdSchin * Common Public License, Version 1.0 * 77c2fbfb3SApril Chin * by AT&T Intellectual Property * 8da2e3ebdSchin * * 9da2e3ebdSchin * A copy of the License is available at * 10da2e3ebdSchin * http://www.opensource.org/licenses/cpl1.0.txt * 11da2e3ebdSchin * (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) * 12da2e3ebdSchin * * 13da2e3ebdSchin * Information and Software Systems Research * 14da2e3ebdSchin * AT&T Research * 15da2e3ebdSchin * Florham Park NJ * 16da2e3ebdSchin * * 17da2e3ebdSchin * Glenn Fowler <gsf@research.att.com> * 18da2e3ebdSchin * David Korn <dgk@research.att.com> * 19da2e3ebdSchin * Phong Vo <kpv@research.att.com> * 20da2e3ebdSchin * * 21da2e3ebdSchin ***********************************************************************/ 22da2e3ebdSchin 23da2e3ebdSchin /* : : generated by proto : : */ 24da2e3ebdSchin /* : : generated by ./lcgen : : */ 25da2e3ebdSchin 26da2e3ebdSchin 27da2e3ebdSchin #ifndef _LC_H 28da2e3ebdSchin #if !defined(__PROTO__) 29da2e3ebdSchin #include <prototyped.h> 30da2e3ebdSchin #endif 31da2e3ebdSchin #if !defined(__LINKAGE__) 32da2e3ebdSchin #define __LINKAGE__ /* 2004-08-11 transition */ 33da2e3ebdSchin #endif 34da2e3ebdSchin 35da2e3ebdSchin #define _LC_H 1 36da2e3ebdSchin 37da2e3ebdSchin #include <ast.h> 38da2e3ebdSchin 39da2e3ebdSchin #define LC_abbreviated 0x00001 40da2e3ebdSchin #define LC_checked 0x00002 4134f9b3eeSRoland Mainz #define LC_debug 0x00004 4234f9b3eeSRoland Mainz #define LC_default 0x00008 4334f9b3eeSRoland Mainz #define LC_defined 0x00010 44da2e3ebdSchin #define LC_local 0x00020 45da2e3ebdSchin #define LC_primary 0x00040 46da2e3ebdSchin #define LC_qualified 0x00080 47da2e3ebdSchin #define LC_undefined 0x00100 4834f9b3eeSRoland Mainz #define LC_utf8 0x00200 4934f9b3eeSRoland Mainz #define LC_verbose 0x00400 50*3e14f97fSRoger A. Faulkner #define LC_setlocale 0x10000 51*3e14f97fSRoger A. Faulkner #define LC_setenv 0x20000 52*3e14f97fSRoger A. Faulkner #define LC_user 0x40000 53da2e3ebdSchin #define LC_language_attribute_max 2 54da2e3ebdSchin #define LC_territory_language_max 4 55da2e3ebdSchin 56da2e3ebdSchin struct Lc_s; 57da2e3ebdSchin 58da2e3ebdSchin typedef struct Lc_info_s 59da2e3ebdSchin { 60da2e3ebdSchin const struct Lc_s* lc; 61da2e3ebdSchin unsigned long number; 62da2e3ebdSchin __V_* data; 63da2e3ebdSchin } Lc_info_t; 64da2e3ebdSchin 65da2e3ebdSchin typedef struct Lc_attribute_s 66da2e3ebdSchin { 67da2e3ebdSchin const char* name; 68da2e3ebdSchin unsigned long flags; 69da2e3ebdSchin unsigned long index; 70da2e3ebdSchin } Lc_attribute_t; 71da2e3ebdSchin 72da2e3ebdSchin typedef struct Lc_charset_s 73da2e3ebdSchin { 74da2e3ebdSchin const char* code; 75da2e3ebdSchin const char* alternates; 76da2e3ebdSchin const char* ms; 77da2e3ebdSchin unsigned long index; 78da2e3ebdSchin } Lc_charset_t; 79da2e3ebdSchin 80da2e3ebdSchin typedef struct Lc_language_s 81da2e3ebdSchin { 82da2e3ebdSchin const char* code; 83da2e3ebdSchin const char* name; 84da2e3ebdSchin const char* alternates; 85da2e3ebdSchin const Lc_charset_t* charset; 86da2e3ebdSchin unsigned long flags; 87da2e3ebdSchin unsigned long index; 88da2e3ebdSchin const Lc_attribute_t* attributes[LC_language_attribute_max]; 89da2e3ebdSchin } Lc_language_t; 90da2e3ebdSchin 91da2e3ebdSchin typedef struct Lc_territory_s 92da2e3ebdSchin { 93da2e3ebdSchin const char* code; 94da2e3ebdSchin const char* name; 95da2e3ebdSchin unsigned long flags; 96da2e3ebdSchin unsigned long index; 97da2e3ebdSchin const Lc_language_t* languages[LC_territory_language_max]; 98da2e3ebdSchin #ifdef _LC_TERRITORY_PRIVATE_ 99da2e3ebdSchin _LC_TERRITORY_PRIVATE_ 100da2e3ebdSchin #endif 101da2e3ebdSchin } Lc_territory_t; 102da2e3ebdSchin 103da2e3ebdSchin typedef struct Lc_map_s 104da2e3ebdSchin { 105da2e3ebdSchin const char* code; 106da2e3ebdSchin const Lc_language_t* language; 107da2e3ebdSchin const Lc_territory_t* territory; 108da2e3ebdSchin const Lc_charset_t* charset; 109da2e3ebdSchin const Lc_attribute_t* attribute; 110da2e3ebdSchin } Lc_map_t; 111da2e3ebdSchin 112da2e3ebdSchin typedef struct Lc_attribute_list_s 113da2e3ebdSchin { 114da2e3ebdSchin struct Lc_attribute_list_s* next; 115da2e3ebdSchin const Lc_attribute_t* attribute; 116da2e3ebdSchin } Lc_attribute_list_t; 117da2e3ebdSchin 118da2e3ebdSchin typedef struct Lc_s 119da2e3ebdSchin { 120da2e3ebdSchin const char* name; 121da2e3ebdSchin const char* code; 122da2e3ebdSchin const Lc_language_t* language; 123da2e3ebdSchin const Lc_territory_t* territory; 124da2e3ebdSchin const Lc_charset_t* charset; 125da2e3ebdSchin const Lc_attribute_list_t* attributes; 126da2e3ebdSchin unsigned long flags; 127da2e3ebdSchin unsigned long index; 128da2e3ebdSchin #ifdef _LC_PRIVATE_ 129da2e3ebdSchin _LC_PRIVATE_ 130da2e3ebdSchin #endif 131da2e3ebdSchin } Lc_t; 132da2e3ebdSchin 133da2e3ebdSchin struct Lc_category_s; 134da2e3ebdSchin 135da2e3ebdSchin typedef int (*Lc_category_set_f) __PROTO__((struct Lc_category_s*)); 136da2e3ebdSchin 137da2e3ebdSchin typedef struct Lc_category_s 138da2e3ebdSchin { 139da2e3ebdSchin const char* name; 140da2e3ebdSchin int external; 141da2e3ebdSchin int internal; 142da2e3ebdSchin Lc_category_set_f setf; 143da2e3ebdSchin Lc_t* prev; 144*3e14f97fSRoger A. Faulkner unsigned int flags; 145da2e3ebdSchin } Lc_category_t; 146da2e3ebdSchin 147da2e3ebdSchin #if _BLD_ast && defined(__EXPORT__) 148da2e3ebdSchin #undef __MANGLE__ 149da2e3ebdSchin #define __MANGLE__ __LINKAGE__ __EXPORT__ 150da2e3ebdSchin #endif 151da2e3ebdSchin 152da2e3ebdSchin extern __MANGLE__ size_t lccanon __PROTO__((Lc_t*, unsigned long flags, char*, size_t)); 153da2e3ebdSchin extern __MANGLE__ Lc_category_t* lccategories __PROTO__((void)); 154da2e3ebdSchin extern __MANGLE__ int lcindex __PROTO__((int, int)); 155da2e3ebdSchin extern __MANGLE__ Lc_info_t* lcinfo __PROTO__((int)); 156da2e3ebdSchin extern __MANGLE__ Lc_t* lcmake __PROTO__((const char*)); 157da2e3ebdSchin extern __MANGLE__ Lc_t* lcscan __PROTO__((Lc_t*)); 158da2e3ebdSchin 159da2e3ebdSchin #undef __MANGLE__ 160da2e3ebdSchin #define __MANGLE__ __LINKAGE__ 161da2e3ebdSchin 162da2e3ebdSchin #endif 163