comparison src/file-coding.h @ 367:a4f53d9b3154 r21-1-13

Import from CVS: tag r21-1-13
author cvs
date Mon, 13 Aug 2007 11:01:07 +0200
parents fbbf69b4e8a7
children cc15677e0335
comparison
equal deleted inserted replaced
366:83d76f480a59 367:a4f53d9b3154
415 (str)->ch = ch; \ 415 (str)->ch = ch; \
416 } while (0) 416 } while (0)
417 417
418 418
419 /* For detecting the encoding of text */ 419 /* For detecting the encoding of text */
420 /* The order is chosen so that by default only ISO 2022 7-bit encodings
421 are auto-detected. These are needed for Mule files. */
420 enum coding_category_type 422 enum coding_category_type
421 { 423 {
422 #ifdef MULE 424 #ifdef MULE
423 CODING_CATEGORY_SHIFT_JIS,
424 CODING_CATEGORY_ISO_7, /* ISO2022 system using only seven-bit bytes, 425 CODING_CATEGORY_ISO_7, /* ISO2022 system using only seven-bit bytes,
425 no locking shift */ 426 no locking shift */
426 CODING_CATEGORY_ISO_8_DESIGNATE, /* ISO2022 system using eight-bit bytes, 427 CODING_CATEGORY_NO_CONVERSION,
427 no locking shift, no single shift,
428 using designation to switch charsets */
429 CODING_CATEGORY_ISO_8_1, /* ISO2022 system using eight-bit bytes, 428 CODING_CATEGORY_ISO_8_1, /* ISO2022 system using eight-bit bytes,
430 no locking shift, no designation sequences, 429 no locking shift, no designation sequences,
431 one-dimension characters in the upper half. */ 430 one-dimension characters in the upper half. */
432 CODING_CATEGORY_ISO_8_2, /* ISO2022 system using eight-bit bytes, 431 CODING_CATEGORY_ISO_8_2, /* ISO2022 system using eight-bit bytes,
433 no locking shift, no designation sequences, 432 no locking shift, no designation sequences,
434 two-dimension characters in the upper half. */ 433 two-dimension characters in the upper half. */
434 CODING_CATEGORY_ISO_8_DESIGNATE, /* ISO2022 system using eight-bit bytes,
435 no locking shift, no single shift,
436 using designation to switch charsets */
435 CODING_CATEGORY_ISO_LOCK_SHIFT, /* ISO2022 system using locking shift */ 437 CODING_CATEGORY_ISO_LOCK_SHIFT, /* ISO2022 system using locking shift */
436 CODING_CATEGORY_BIG5, 438 CODING_CATEGORY_BIG5,
437 #endif /* MULE */ 439 CODING_CATEGORY_SHIFT_JIS
440 #else /* MULE */
438 CODING_CATEGORY_NO_CONVERSION 441 CODING_CATEGORY_NO_CONVERSION
442 #endif /* not MULE */
439 }; 443 };
440 444
445 #ifdef MULE
446 #define CODING_CATEGORY_LAST CODING_CATEGORY_SHIFT_JIS
447 #else
441 #define CODING_CATEGORY_LAST CODING_CATEGORY_NO_CONVERSION 448 #define CODING_CATEGORY_LAST CODING_CATEGORY_NO_CONVERSION
449 #endif
442 450
443 #ifdef MULE 451 #ifdef MULE
444 #define CODING_CATEGORY_SHIFT_JIS_MASK \ 452 #define CODING_CATEGORY_SHIFT_JIS_MASK \
445 (1 << CODING_CATEGORY_SHIFT_JIS) 453 (1 << CODING_CATEGORY_SHIFT_JIS)
446 #define CODING_CATEGORY_ISO_7_MASK \ 454 #define CODING_CATEGORY_ISO_7_MASK \