1 /* $XConsortium: national.h /main/3 1995/11/01 17:38:14 rswiston $ */
2 /***************************************************************
6 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF *
7 * AT&T BELL LABORATORIES *
8 * AND IS NOT TO BE DISCLOSED OR USED EXCEPT IN *
9 * ACCORDANCE WITH APPLICABLE AGREEMENTS *
11 * Copyright (c) 1993 AT&T Bell Laboratories *
12 * Unpublished & Not for Publication *
13 * All Rights Reserved *
15 * The copyright notice above does not evidence any *
16 * actual or intended publication of such source code *
18 * This software was created by the *
19 * Advanced Software Technology Department *
20 * AT&T Bell Laboratories *
22 * For further information contact *
23 * {ulysses,attmail}!dgk *
24 * dgk@ulysses.att.com *
25 * David Korn 908-582-7975 *
27 ***************************************************************/
34 * national.h - definitions for international character sets
37 * AT&T Bell Laboratories
39 * Murray Hill, N. J. 07974
45 * This data must be defined for each country in defs.c
49 # define HIGHBIT (1<<(CHAR_BIT-1))
52 #ifndef ESS_MAXCHAR /* allow multiple includes */
55 * This section may change from country to country
58 #define ESS_MAXCHAR 2 /* Maximum number of non-escape bytes
59 for any and all character sets */
60 #define CCS1_IN_SIZE 2
61 #define CCS1_OUT_SIZE 2
62 #define CCS2_IN_SIZE 1
63 #define CCS2_OUT_SIZE 1
64 #define CCS3_IN_SIZE 2
65 #define CCS3_OUT_SIZE 2
68 * This part is generic
71 #define MARKER 0x100 /* Must be invalid character */
72 #define ESS2 0x8e /* Escape to char set 2 */
73 #define ESS3 0x8f /* Escape to char set 3 */
74 #define ESS_SETMASK (3<<(7*ESS_MAXCHAR)) /* character set bits */
76 #define echarset(c) ((c)==ESS3?3:((c)==ESS2)?2:((c)>>7)&1)
77 #define icharset(i) ((i)>>(7*ESS_MAXCHAR)&3)
79 #define in_csize(s) int_charsize[s]
80 #define out_csize(s) int_charsize[s+4]
82 extern char int_charsize[8];
84 #endif /* ESS_MAXCHAR */