/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
#ifndef _SYS_LDTERM_H
#define _SYS_LDTERM_H
#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 11.5 */
#ifdef __cplusplus
extern "C" {
#endif
#ifndef MIN
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
#endif
/* flow control defines */
/*
* The following for EUC and also other types of codesets.
*/
/*
* One assumption made throughout this module is: EUC characters have
* a display width less than 255. Also, assumed around, is that they
* consist of < 256 bytes, but we don't worry much about that.
*/
/* "ldterm_dispwidth" */
/* The next version will be the current LDTERM_DATA_VERSION + 1. */
/*
* Supported codeset types:
* When you are adding a new codeset type, do not add any new codeset type
* value that is smaller than LDTERM_CS_TYPE_MIN. You will also need to
* add the new codeset type sequentially and also increase LDTERM_CS_TYPE_MAX
* so that the LDTERM_CS_TYPE_MAX will be always equal to the last, new
* codeset type value.
*
* Whenever you increase the LDTERM_CS_TYPE_MAX, you will also need to
* increase the LDTERM_DATA_VERSION and also update the ldterm.c so that
* ldterm will have proper version control.
*/
/*
* The maximum number of bytes in a character of the codeset that
* can be handled by ldterm.
*/
/*
* The maximum number of sub-codesets in a codeset that can be
* handled by ldterm.
*/
/* The maximum and minimum sub-codeset numbers possible in EUC codeset. */
#define LDTERM_CS_TYPE_EUC_MIN_SUBCS 0
/* The maximum and minimum sub-codeset numbers possible in PCCS codeset. */
/* Some UTF-8 related values: */
/* The maximum and minimum UTF-8 character subsequent byte values. */
/* Some maximum and minimum character values in UTF-32. */
/* Bit shift number and mask values for conversion from UTF-8 to UCS-4. */
/*
* The following data structure is to provide codeset-specific
* information for EUC and PC originated codesets (ldterm_eucpc_data_t)
*/
struct _ldterm_eucpc_data {
};
/* ldterm codeset data information for user side. */
struct _ldterm_cs_data_user {
/* width data */
};
/* ldterm codeset data information for ldterm. */
struct _ldterm_cs_data {
char *locale_name;
/* width data */
};
/*
* The following data structure is to handle Unicode codeset.
* To represent a single Unicode plane, it requires to have 16384
* 'ldterm_unicode_data_cell_t' elements.
*/
struct _ldterm_unicode_data_cell {
};
/* The following function pointers point the current codeset methods. */
typedef struct _ldterm_cs_methods {
typedef struct ldterm_mod {
/* built */
/*
* The following are for EUC and also other types of codeset
* processing. Please read 'euc' as 'multi-byte codeset' instead.
*/
/*
* The t_csdata, t_csmethods, t_scratch, and, t_scratch_len data
* fields are to support various non-EUC codesets.
*/
/*
* Internal state bits.
*/
/* sees is literal */
/* is literal */
/* below us */
/* rescan input queue */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_LDTERM_H */