Mercurial > hg > xemacs-beta
comparison src/charset.h @ 3439:d1754e7f0cea
[xemacs-hg @ 2006-06-03 17:50:39 by aidan]
Just-in-time Unicode code point support.
author | aidan |
---|---|
date | Sat, 03 Jun 2006 17:51:06 +0000 |
parents | 1e7cc382eb16 |
children | d08f0a2c8722 |
comparison
equal
deleted
inserted
replaced
3438:14fbcab7c67b | 3439:d1754e7f0cea |
---|---|
227 int chars; | 227 int chars; |
228 | 228 |
229 /* Which half of font to be used to display this character set */ | 229 /* Which half of font to be used to display this character set */ |
230 int graphic; | 230 int graphic; |
231 | 231 |
232 /* If set, this charset should be written out in ISO-2022-based coding | |
233 systems using the escape sequence for UTF-8, not using our internal | |
234 representation and the associated real ISO 2022 designation. */ | |
235 unsigned int encode_as_utf_8 :1; | |
236 | |
232 /* If set, this is a "temporary" charset created when we encounter | 237 /* If set, this is a "temporary" charset created when we encounter |
233 an unknown final. This is so that we can successfully compile | 238 an unknown final. This is so that we can successfully compile |
234 and load such files. We allow a real charset to be created on top | 239 and load such files. We allow a real charset to be created on top |
235 of this temporary charset. */ | 240 of this temporary charset. */ |
236 unsigned int temporary :1; | 241 unsigned int temporary :1; |
259 #define CHARSET_SHORT_NAME(cs) ((cs)->short_name) | 264 #define CHARSET_SHORT_NAME(cs) ((cs)->short_name) |
260 #define CHARSET_LONG_NAME(cs) ((cs)->long_name) | 265 #define CHARSET_LONG_NAME(cs) ((cs)->long_name) |
261 #define CHARSET_REP_BYTES(cs) ((cs)->rep_bytes) | 266 #define CHARSET_REP_BYTES(cs) ((cs)->rep_bytes) |
262 #define CHARSET_COLUMNS(cs) ((cs)->columns) | 267 #define CHARSET_COLUMNS(cs) ((cs)->columns) |
263 #define CHARSET_GRAPHIC(cs) ((cs)->graphic) | 268 #define CHARSET_GRAPHIC(cs) ((cs)->graphic) |
269 #define CHARSET_ENCODE_AS_UTF_8(cs) ((cs)->encode_as_utf_8) | |
264 #define CHARSET_TYPE(cs) ((cs)->type) | 270 #define CHARSET_TYPE(cs) ((cs)->type) |
265 #define CHARSET_DIRECTION(cs) ((cs)->direction) | 271 #define CHARSET_DIRECTION(cs) ((cs)->direction) |
266 #define CHARSET_FINAL(cs) ((cs)->final) | 272 #define CHARSET_FINAL(cs) ((cs)->final) |
267 #define CHARSET_DOC_STRING(cs) ((cs)->doc_string) | 273 #define CHARSET_DOC_STRING(cs) ((cs)->doc_string) |
268 #define CHARSET_REGISTRY(cs) ((cs)->registry) | 274 #define CHARSET_REGISTRY(cs) ((cs)->registry) |
282 #define XCHARSET_SHORT_NAME(cs) CHARSET_SHORT_NAME (XCHARSET (cs)) | 288 #define XCHARSET_SHORT_NAME(cs) CHARSET_SHORT_NAME (XCHARSET (cs)) |
283 #define XCHARSET_LONG_NAME(cs) CHARSET_LONG_NAME (XCHARSET (cs)) | 289 #define XCHARSET_LONG_NAME(cs) CHARSET_LONG_NAME (XCHARSET (cs)) |
284 #define XCHARSET_REP_BYTES(cs) CHARSET_REP_BYTES (XCHARSET (cs)) | 290 #define XCHARSET_REP_BYTES(cs) CHARSET_REP_BYTES (XCHARSET (cs)) |
285 #define XCHARSET_COLUMNS(cs) CHARSET_COLUMNS (XCHARSET (cs)) | 291 #define XCHARSET_COLUMNS(cs) CHARSET_COLUMNS (XCHARSET (cs)) |
286 #define XCHARSET_GRAPHIC(cs) CHARSET_GRAPHIC (XCHARSET (cs)) | 292 #define XCHARSET_GRAPHIC(cs) CHARSET_GRAPHIC (XCHARSET (cs)) |
293 #define XCHARSET_ENCODE_AS_UTF_8(cs) CHARSET_ENCODE_AS_UTF_8 (XCHARSET (cs)) | |
287 #define XCHARSET_TYPE(cs) CHARSET_TYPE (XCHARSET (cs)) | 294 #define XCHARSET_TYPE(cs) CHARSET_TYPE (XCHARSET (cs)) |
288 #define XCHARSET_DIRECTION(cs) CHARSET_DIRECTION (XCHARSET (cs)) | 295 #define XCHARSET_DIRECTION(cs) CHARSET_DIRECTION (XCHARSET (cs)) |
289 #define XCHARSET_FINAL(cs) CHARSET_FINAL (XCHARSET (cs)) | 296 #define XCHARSET_FINAL(cs) CHARSET_FINAL (XCHARSET (cs)) |
290 #define XCHARSET_DOC_STRING(cs) CHARSET_DOC_STRING (XCHARSET (cs)) | 297 #define XCHARSET_DOC_STRING(cs) CHARSET_DOC_STRING (XCHARSET (cs)) |
291 #define XCHARSET_REGISTRY(cs) CHARSET_REGISTRY (XCHARSET (cs)) | 298 #define XCHARSET_REGISTRY(cs) CHARSET_REGISTRY (XCHARSET (cs)) |
545 breakup_ichar_1 (c, &(charset), &(c1), &(c2)) | 552 breakup_ichar_1 (c, &(charset), &(c1), &(c2)) |
546 | 553 |
547 void get_charset_limits (Lisp_Object charset, int *low, int *high); | 554 void get_charset_limits (Lisp_Object charset, int *low, int *high); |
548 int ichar_to_unicode (Ichar chr); | 555 int ichar_to_unicode (Ichar chr); |
549 | 556 |
557 EXFUN (Fcharset_name, 1); | |
558 | |
550 #endif /* MULE */ | 559 #endif /* MULE */ |
551 | 560 |
561 /* ISO 10646 UTF-16, UCS-4, UTF-8, UTF-7, etc. */ | |
562 | |
563 enum unicode_type | |
564 { | |
565 UNICODE_UTF_16, | |
566 UNICODE_UTF_8, | |
567 UNICODE_UTF_7, | |
568 UNICODE_UCS_4 | |
569 }; | |
570 | |
571 void encode_unicode_char (Lisp_Object USED_IF_MULE (charset), int h, | |
572 int USED_IF_MULE (l), unsigned_char_dynarr *dst, | |
573 enum unicode_type type, unsigned int little_endian); | |
574 | |
575 EXFUN (Funicode_to_char, 2); | |
576 EXFUN (Fchar_to_unicode, 1); | |
577 | |
552 #endif /* INCLUDED_charset_h_ */ | 578 #endif /* INCLUDED_charset_h_ */ |