ccode.h revision da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968
/* : : generated by proto : : */
/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1985-2007 AT&T Knowledge Ventures *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Knowledge Ventures *
* *
* A copy of the License is available at *
* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* David Korn <dgk@research.att.com> *
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
/*
* Glenn Fowler
* AT&T Research
*
* character code map interface
*
* NOTE: used for mapping between 8-bit character encodings
* ISO character sets are handled by sfio
*/
#ifndef _CHARCODE_H
#if !defined(__PROTO__)
#include <prototyped.h>
#endif
#if !defined(__LINKAGE__)
#define __LINKAGE__ /* 2004-08-11 transition */
#endif
#define _CHARCODE_H 1
#include <ast.h>
#include <ast_ccode.h>
typedef struct Ccmap_s
{
const char* name; /* code set name */
const char* match; /* strmatch() pattern */
const char* desc; /* code set description */
const char* canon; /* canonical name format */
const char* index; /* default index */
} Ccmap_t;
#if _BLD_ast && defined(__EXPORT__)
#endif
#define __MANGLE__ __LINKAGE__
#define CCOP(i,o) ((i)==(o)?0:(((o)<<8)|(i)))
#define CCIN(x) ((x)&0xFF)
#define CCCONVERT(x) ((x)&0xFF00)
#define CCMAPCHR(m,c) ((m)?(m)[c]:(c))
#endif