home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / archives / ckc190.zip / ckcxla.h < prev    next >
C/C++ Source or Header  |  1994-06-01  |  7KB  |  233 lines

  1. /*
  2.   File CKCXLA.H
  3.  
  4.   System-independent character-set translation header file for C-Kermit.
  5. */
  6.  
  7. /*
  8.   Author: Frank da Cruz (fdc@columbia.edu, FDCCU@CUVMA.BITNET),
  9.   Columbia University Academic Information Systems, New York City.
  10.  
  11.   Copyright (C) 1985, 1993, Trustees of Columbia University in the City of New
  12.   York.  The C-Kermit software may not be, in whole or in part, licensed or
  13.   sold for profit as a software product itself, nor may it be included in or
  14.   distributed with commercial products or otherwise distributed by commercial
  15.   concerns to their clients or customers without written permission of the
  16.   Office of Kermit Development and Distribution, Columbia University.  This
  17.   copyright notice must not be removed, altered, or obscured.
  18. */
  19. #ifndef CKCXLA_H            /* Guard against multiple inclusion */
  20. #define CKCXLA_H
  21.  
  22. #ifndef KANJI        /* Systems including Kanji support by default */
  23. #ifdef OS2        /* OS/2... */
  24. #define KANJI
  25. #endif /* OS2 */
  26. #endif /* KANJI */
  27.  
  28. #ifdef NOKANJI        /* Except if NOKANJI is defined. */
  29. #ifdef KANJI
  30. #undef KANJI
  31. #endif /* KANJI */
  32. #endif /* NOKANJI */
  33.  
  34. /*
  35.    Disable all support for all classes of character sets
  36.    if NOCSETS is defined.
  37. */
  38. #ifdef NOCSETS
  39. #ifdef KANJI
  40. #undef KANJI
  41. #endif /* KANJI */
  42. #ifdef CYRILLIC
  43. #undef CYRILLIC
  44. #endif /* CYRILLIC */
  45. #ifdef LATIN2
  46. #undef LATIN2
  47. #endif /* LATIN2 */
  48. #ifdef HEBREW
  49. #undef HEBREW
  50. #endif /* HEBREW */
  51.  
  52. #else /* Rest of this file... */
  53.  
  54. #ifndef NOLATIN2            /* If they didn't say "no Latin-2" */
  55. #ifndef LATIN2                /* Then if LATIN2 isn't already */
  56. #define LATIN2                /* defined, define it. */
  57. #endif /* LATIN2 */
  58. #endif /* NOLATIN2 */
  59.  
  60. #ifndef NOCYRIL                /* If they didn't say "no Cyrillic" */
  61. #ifndef CYRILLIC            /* Then if CYRILLIC isn't already */
  62. #define CYRILLIC            /* defined, define it. */
  63. #endif /* CYRILLIC */
  64. #endif /* NOCYRIL */
  65.  
  66. #ifndef NOHEBREW            /* If they didn't say "no Hebrew" */
  67. #ifndef HEBREW                /* Then if HEBREW isn't already */
  68. #define HEBREW                /* defined, define it. */
  69. #endif /* HEBREW */
  70. #endif /* NOHEBREW */
  71.  
  72. /* File ckcxla.h -- Character-set-related definitions, system independent */
  73.  
  74. /* Codes for Kermit Transfer Syntax Level (obsolete) */
  75.  
  76. #define TS_L0 0         /* Level 0 (Transparent) */
  77. #define TS_L1 1         /* Level 1 (one standard character set) */
  78. #define TS_L2 2         /* Level 2 (multiple character sets in same file) */
  79.  
  80. #define UNK 63         /* Symbol to use for unknown character (63 = ?) */
  81.  
  82. /*
  83.   Codes for the base alphabet of a given character set.
  84.   These are assigned in roughly ISO 8859 order.
  85.   (Each is assumed to include ASCII/Roman.)
  86. */
  87. #define AL_UNIV    0            /* Universal (like ISO 10646) */
  88. #define AL_ROMAN   1            /* Roman (Latin) alphabet */
  89. #define AL_CYRIL   2            /* Cyrillic alphabet */
  90. #define AL_ARABIC  3            /* Arabic */
  91. #define AL_GREEK   4            /* Greek */
  92. #define AL_HEBREW  5            /* Hebrew */
  93. #define AL_KANA    6            /* Japanese Katakana */
  94. #define AL_JAPAN   7            /* Japanese Katakana+Kanji ideograms */
  95. #define AL_HAN     8            /* Chinese/Japanese/Korean ideograms */
  96. #define AL_INDIA   9            /* Indian scripts (ISCII) */
  97. #define AL_VIET   10            /* Vietnamese (VISCII) */
  98.                     /* Add more here... */
  99. #define AL_UNK   999            /* Unknown (transparent) */
  100.  
  101. /* Codes for languages */
  102. /*
  103.   NOTE: It would perhaps be better to use ISO 639-1988 2-letter "Codes for 
  104.   Representation of Names of Languages" here, shown in the comments below.
  105. */
  106. #define L_ASCII       0  /* EN ASCII, English */
  107. #define L_USASCII     0  /* EN ASCII, English */
  108. #define L_DUTCH       1  /* NL Dutch */
  109. #define L_FINNISH     2  /* FI Finnish */
  110. #define L_FRENCH      3  /* FR French */
  111. #define L_GERMAN      4  /* DE German */
  112. #define L_HUNGARIAN   5     /* HU Hungarian */
  113. #define L_ITALIAN     6  /* IT Italian */
  114. #define L_NORWEGIAN   7  /* NO Norwegian */
  115. #define L_PORTUGUESE  8  /* PT Portuguese */
  116. #define L_SPANISH     9  /* ES Spanish */
  117. #define L_SWEDISH    10  /* SV Swedish */
  118. #define L_SWISS      11  /* RM Swiss (Rhaeto-Romance) */
  119. #define L_DANISH     12  /* DA Danish */
  120. #define L_ICELANDIC  13  /* IS Icelandic */
  121. #define L_RUSSIAN    14  /* RU Russian */
  122. #define L_JAPANESE   15  /* JA Japanese */
  123. #define L_HEBREW     16  /* IW Hebrew */
  124.  
  125. #define MAXLANG      16  /* Number of languages */
  126.  
  127. /*
  128.   File character-sets are defined in the system-specific ck?xla.h file,
  129.   except for the following one, which must be available to all versions:
  130. */
  131. #define FC_TRANSP  254            /* Transparent */
  132.  
  133. /*
  134.   Designators for Kermit's transfer character sets.  These are all standard
  135.   sets, or based on them.  Symbols must be unique in the first 8 characters,
  136.   because some C preprocessors have this limit.
  137. */
  138. /* LIST1 */
  139. #define TC_TRANSP  0   /* Transparent, no character translation */
  140. #define TC_USASCII 1   /* US 7-bit ASCII */
  141. #define TC_1LATIN  2   /* ISO 8859-1, Latin-1 */
  142. #define TC_2LATIN  3   /* ISO 8859-2, Latin-2 */
  143. #define TC_CYRILL  4   /* ISO 8859-5, Latin/Cyrillic */
  144. #define TC_JEUC    5   /* Japanese EUC */
  145. #define TC_HEBREW  6   /* ISO 8859-8, Latin/Hebrew */
  146.  
  147. #define MAXTCSETS  6   /* Highest Transfer Character Set Number */
  148.  
  149. #ifdef COMMENT
  150. /*
  151.   Not used yet.
  152. */
  153. #define TC_3LATIN  7  /* ISO 8859-3, Latin-3 */
  154. #define TC_4LATIN  8  /* ISO 8859-4, Latin-4 */
  155. #define TC_5LATIN  9  /* ISO 8859-9, Latin-5 */
  156. #define TC_ARABIC 10  /* ISO-8859-6, Latin/Arabic */
  157. #define TC_GREEK  11  /* ISO-8859-7, Latin/Greek */
  158. #define TC_JIS208 12  /* Japanese JIS X 0208 multibyte set */
  159. #define TC_CHINES 13  /* Chinese Standard GB 2312-80 */
  160. #define TC_KOREAN 14  /* Korean KS C 5601-1987 */
  161. #define TC_I10646 15  /* ISO DIS 10646 (not defined yet) */
  162. /* etc... */
  163. #endif /* COMMENT */
  164.  
  165. /* Structure for character-set information */
  166.  
  167. struct csinfo {
  168.     char *name;                /* Descriptive name of character set */
  169.     int size;                /* Size (e.g. 128, 256, 16384) */
  170.     int code;                /* Like TC_1LATIN, etc.  */
  171.     char *designator;            /* Designator, like I2/100 = Latin-1 */
  172.     int alphabet;            /* Base alphabet */
  173.     char *keyword;            /* Keyword for this character-set */
  174. };
  175.  
  176. /* Structure for language information */
  177.  
  178. struct langinfo {
  179.     int id;                /* Language ID code (L_whatever) */
  180.     int fc;                /* File character set to use */
  181.     int tc;                /* Transfer character set to use */
  182.     char *description;            /* Description of language */
  183. };
  184.  
  185. /* Now take in the system-specific definitions */
  186.  
  187. #ifdef UNIX
  188. #include "ckuxla.h"
  189. #endif /* UNIX */
  190.  
  191. #ifdef OSK                /* OS-9 */
  192. #include "ckuxla.h"
  193. #endif /* OS-9 */
  194.  
  195. #ifdef VMS                /* VAX/VMS */
  196. #include "ckuxla.h"
  197. #endif /* VMS */
  198.  
  199. #ifdef GEMDOS                /* Atari ST */
  200. #include "ckuxla.h"
  201. #endif /* GEMDOS */
  202.  
  203. #ifdef MAC                /* Macintosh */
  204. #include "ckmxla.h"
  205. #endif /* MAC */
  206.  
  207. #ifdef OS2                /* OS/2 */
  208. #include "ckuxla.h"            /* Uses big UNIX version */
  209. #endif /* OS2 */
  210.  
  211. #ifdef AMIGA                /* Commodore Amiga */
  212. #include "ckuxla.h"
  213. #endif /* AMIGA */
  214.  
  215. #ifdef datageneral            /* Data General MV AOS/VS */
  216. #include "ckuxla.h"
  217. #endif /* datageneral */
  218. #ifdef STRATUS                /* Stratus Computer, Inc. VOS */
  219. #include "ckuxla.h"
  220. #endif /* STRATUS */
  221.  
  222. #endif /* NOCSETS */
  223.  
  224. #endif /* CKCXLA_H */
  225.  
  226. #ifdef KANJI
  227. _PROTOTYP( int xkanjf, (void) );
  228. _PROTOTYP( int xkanjz, (int (*)(char)) );
  229. _PROTOTYP( int xkanji, (int, int (*)(char)) );
  230. #endif /* KANJI */
  231.  
  232. /* End of ckcxla.h */
  233.