1 /* 2 3 * Copyright (c) 1984, 1985, 1986 AT&T 4 * All Rights Reserved 5 6 * THIS IS UNPUBLISHED PROPRIETARY SOURCE 7 * CODE OF AT&T. 8 * The copyright notice above does not 9 * evidence any actual or intended 10 * publication of such source code. 11 12 */ 13 14 /* @(#)national.h 1.1 */ 15 16 /* 17 * national.h - definitions for international character sets 18 * 19 * David Korn 20 * AT&T Bell Laboratories 21 * Room 5D-112 22 * Murray Hill, N. J. 07974 23 * Tel. x7975 24 * 25 */ 26 27 /* 28 * This data must be defined for each country in defs.c 29 */ 30 31 #ifndef HIGHBIT 32 # define HIGHBIT 0x80 33 #endif /* HIGHBIT */ 34 35 #ifndef ESS_MAXCHAR /* allow multiple includes */ 36 37 /* 38 * This section may change from country to country 39 */ 40 41 #define ESS_MAXCHAR 2 /* Maximum number of non-escape bytes 42 for any and all character sets */ 43 #define CCS1_IN_SIZE 2 44 #define CCS1_OUT_SIZE 2 45 #define CCS2_IN_SIZE 1 46 #define CCS2_OUT_SIZE 1 47 #define CCS3_IN_SIZE 2 48 #define CCS3_OUT_SIZE 2 49 50 /* 51 * This part is generic 52 */ 53 54 #define MARKER 0x100 /* Must be invalid character */ 55 #define ESS2 0x8e /* Escape to char set 2 */ 56 #define ESS3 0x8f /* Escape to char set 3 */ 57 #define ESS_SETMASK (3<<(7*ESS_MAXCHAR)) /* character set bits */ 58 59 #define echarset(c) ((c)==ESS3?3:((c)==ESS2)?2:((c)>>7)&1) 60 #define icharset(i) ((i)>>(7*ESS_MAXCHAR)&3) 61 62 #define in_csize(s) int_charsize[s] 63 #define out_csize(s) int_charsize[s+4] 64 65 extern char int_charsize[8]; 66 67 #endif /* ESS_MAXCHAR */ 68