c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe/***********************************************************************
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe* *
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe* This software is part of the ast package *
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe* Copyright (c) 1985-2010 AT&T Intellectual Property *
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe* and is licensed under the *
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe* Common Public License, Version 1.0 *
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe* by AT&T Intellectual Property *
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe* *
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe* A copy of the License is available at *
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe* http://www.opensource.org/licenses/cpl1.0.txt *
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov* *
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe* Information and Software Systems Research *
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov* AT&T Research *
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov* Florham Park NJ *
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe* *
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov* Glenn Fowler <gsf@research.att.com> *
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe* David Korn <dgk@research.att.com> *
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov* Phong Vo <kpv@research.att.com> *
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe* *
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov***********************************************************************/
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe/* : : generated by proto : : */
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe/* : : generated by ./lcgen : : */
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#ifndef _LC_H
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#if !defined(__PROTO__)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#include <prototyped.h>
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#endif
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#if !defined(__LINKAGE__)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#define __LINKAGE__ /* 2004-08-11 transition */
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#endif
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#define _LC_H 1
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#include <ast.h>
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov#define LC_abbreviated 0x00001
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#define LC_checked 0x00002
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#define LC_debug 0x00004
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#define LC_default 0x00008
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#define LC_defined 0x00010
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov#define LC_local 0x00020
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#define LC_primary 0x00040
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov#define LC_qualified 0x00080
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#define LC_undefined 0x00100
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov#define LC_utf8 0x00200
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov#define LC_verbose 0x00400
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#define LC_setlocale 0x10000
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#define LC_setenv 0x20000
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#define LC_user 0x40000
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov#define LC_language_attribute_max 2
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#define LC_territory_language_max 4
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov
struct Lc_s;
typedef struct Lc_info_s
{
const struct Lc_s* lc;
unsigned long number;
__V_* data;
} Lc_info_t;
typedef struct Lc_attribute_s
{
const char* name;
unsigned long flags;
unsigned long index;
} Lc_attribute_t;
typedef struct Lc_charset_s
{
const char* code;
const char* alternates;
const char* ms;
unsigned long index;
} Lc_charset_t;
typedef struct Lc_language_s
{
const char* code;
const char* name;
const char* alternates;
const Lc_charset_t* charset;
unsigned long flags;
unsigned long index;
const Lc_attribute_t* attributes[LC_language_attribute_max];
} Lc_language_t;
typedef struct Lc_territory_s
{
const char* code;
const char* name;
unsigned long flags;
unsigned long index;
const Lc_language_t* languages[LC_territory_language_max];
#ifdef _LC_TERRITORY_PRIVATE_
_LC_TERRITORY_PRIVATE_
#endif
} Lc_territory_t;
typedef struct Lc_map_s
{
const char* code;
const Lc_language_t* language;
const Lc_territory_t* territory;
const Lc_charset_t* charset;
const Lc_attribute_t* attribute;
} Lc_map_t;
typedef struct Lc_attribute_list_s
{
struct Lc_attribute_list_s* next;
const Lc_attribute_t* attribute;
} Lc_attribute_list_t;
typedef struct Lc_s
{
const char* name;
const char* code;
const Lc_language_t* language;
const Lc_territory_t* territory;
const Lc_charset_t* charset;
const Lc_attribute_list_t* attributes;
unsigned long flags;
unsigned long index;
#ifdef _LC_PRIVATE_
_LC_PRIVATE_
#endif
} Lc_t;
struct Lc_category_s;
typedef int (*Lc_category_set_f) __PROTO__((struct Lc_category_s*));
typedef struct Lc_category_s
{
const char* name;
int external;
int internal;
Lc_category_set_f setf;
Lc_t* prev;
unsigned int flags;
} Lc_category_t;
#if _BLD_ast && defined(__EXPORT__)
#undef __MANGLE__
#define __MANGLE__ __LINKAGE__ __EXPORT__
#endif
extern __MANGLE__ size_t lccanon __PROTO__((Lc_t*, unsigned long flags, char*, size_t));
extern __MANGLE__ Lc_category_t* lccategories __PROTO__((void));
extern __MANGLE__ int lcindex __PROTO__((int, int));
extern __MANGLE__ Lc_info_t* lcinfo __PROTO__((int));
extern __MANGLE__ Lc_t* lcmake __PROTO__((const char*));
extern __MANGLE__ Lc_t* lcscan __PROTO__((Lc_t*));
#undef __MANGLE__
#define __MANGLE__ __LINKAGE__
#endif