diff options
| author | Kenichi Handa | 1997-08-28 10:51:12 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1997-08-28 10:51:12 +0000 |
| commit | e80de6b18fbc4102b28a86d0169c6f06ce12e9da (patch) | |
| tree | 983dacca9cc7e83cf013b2f268e4272a2d6bc165 /src | |
| parent | 93f4fb59647a66591fd556f93c905f00fb30b63a (diff) | |
| download | emacs-e80de6b18fbc4102b28a86d0169c6f06ce12e9da.tar.gz emacs-e80de6b18fbc4102b28a86d0169c6f06ce12e9da.zip | |
(coding_type): New member coding_type_raw_text.
(CODING_EOL_INCONSISTENT): New macro.
(CODING_REQUIRE_NO_CONVERSION): Check also coding_type_raw_text.
(CODING_MAY_REQUIRE_NO_CONVERSION): Likewise.
(CODING_CATEGORY_IDX_RAW_TEXT): New macro.
(CODING_CATEGORY_MASK_RAW_TEXT): New macro.
Diffstat (limited to 'src')
| -rw-r--r-- | src/coding.h | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/src/coding.h b/src/coding.h index 6aa9a45e714..5f851be9b52 100644 --- a/src/coding.h +++ b/src/coding.h | |||
| @@ -234,8 +234,12 @@ enum coding_type | |||
| 234 | coding_type_iso2022, /* Any coding system of ISO2022 | 234 | coding_type_iso2022, /* Any coding system of ISO2022 |
| 235 | variants. */ | 235 | variants. */ |
| 236 | coding_type_big5, /* BIG5 coding system for Chinese. */ | 236 | coding_type_big5, /* BIG5 coding system for Chinese. */ |
| 237 | coding_type_ccl /* The coding system of which decoder | 237 | coding_type_ccl, /* The coding system of which decoder |
| 238 | and encoder are written in CCL. */ | 238 | and encoder are written in CCL. */ |
| 239 | coding_type_raw_text /* A coding system for a text | ||
| 240 | containing ramdom 8-bit code which | ||
| 241 | does not require code conversion | ||
| 242 | except for end-of-line format. */ | ||
| 239 | }; | 243 | }; |
| 240 | 244 | ||
| 241 | /* Formats of end-of-line. */ | 245 | /* Formats of end-of-line. */ |
| @@ -246,6 +250,9 @@ enum coding_type | |||
| 246 | #define CODING_EOL_CR 2 /* Carriage-return only. */ | 250 | #define CODING_EOL_CR 2 /* Carriage-return only. */ |
| 247 | #define CODING_EOL_UNDECIDED 3 /* This value is used to denote the | 251 | #define CODING_EOL_UNDECIDED 3 /* This value is used to denote the |
| 248 | eol-type is not yet decided. */ | 252 | eol-type is not yet decided. */ |
| 253 | #define CODING_EOL_INCONSISTENT 4 /* This value is used to denote the | ||
| 254 | eol-type is not consistent | ||
| 255 | through the file. */ | ||
| 249 | 256 | ||
| 250 | /* Character composition status while encoding/decoding. */ | 257 | /* Character composition status while encoding/decoding. */ |
| 251 | #define COMPOSING_NO 0 /* not composing */ | 258 | #define COMPOSING_NO 0 /* not composing */ |
| @@ -330,17 +337,19 @@ struct coding_system | |||
| 330 | 337 | ||
| 331 | /* Return 1 if coding system CODING never requires any code conversion. */ | 338 | /* Return 1 if coding system CODING never requires any code conversion. */ |
| 332 | #define CODING_REQUIRE_NO_CONVERSION(coding) \ | 339 | #define CODING_REQUIRE_NO_CONVERSION(coding) \ |
| 333 | (((coding)->type == coding_type_no_conversion \ | 340 | ((coding)->type == coding_type_no_conversion \ |
| 334 | || (coding)->type == coding_type_emacs_mule) \ | 341 | || (((coding)->type == coding_type_emacs_mule \ |
| 335 | && (coding)->eol_type == CODING_EOL_LF) | 342 | || (coding)->type == coding_type_raw_text) \ |
| 343 | && (coding)->eol_type == CODING_EOL_LF)) | ||
| 336 | 344 | ||
| 337 | /* Return 1 if coding system CODING may not require code conversion. */ | 345 | /* Return 1 if coding system CODING may not require code conversion. */ |
| 338 | #define CODING_MAY_REQUIRE_NO_CONVERSION(coding) \ | 346 | #define CODING_MAY_REQUIRE_NO_CONVERSION(coding) \ |
| 339 | (((coding)->type == coding_type_no_conversion \ | 347 | ((coding)->type == coding_type_no_conversion \ |
| 340 | || (coding)->type == coding_type_emacs_mule \ | 348 | || (((coding)->type == coding_type_emacs_mule \ |
| 341 | || (coding)->type == coding_type_undecided) \ | 349 | || (coding)->type == coding_type_undecided \ |
| 342 | && ((coding)->eol_type == CODING_EOL_LF \ | 350 | || (coding)->type == coding_type_raw_text) \ |
| 343 | || (coding)->eol_type == CODING_EOL_UNDECIDED)) | 351 | && ((coding)->eol_type == CODING_EOL_LF \ |
| 352 | || (coding)->eol_type == CODING_EOL_UNDECIDED))) | ||
| 344 | 353 | ||
| 345 | /* Index for each coding category in `coding_category_table' */ | 354 | /* Index for each coding category in `coding_category_table' */ |
| 346 | #define CODING_CATEGORY_IDX_EMACS_MULE 0 | 355 | #define CODING_CATEGORY_IDX_EMACS_MULE 0 |
| @@ -351,8 +360,9 @@ struct coding_system | |||
| 351 | #define CODING_CATEGORY_IDX_ISO_7_ELSE 5 | 360 | #define CODING_CATEGORY_IDX_ISO_7_ELSE 5 |
| 352 | #define CODING_CATEGORY_IDX_ISO_8_ELSE 6 | 361 | #define CODING_CATEGORY_IDX_ISO_8_ELSE 6 |
| 353 | #define CODING_CATEGORY_IDX_BIG5 7 | 362 | #define CODING_CATEGORY_IDX_BIG5 7 |
| 354 | #define CODING_CATEGORY_IDX_BINARY 8 | 363 | #define CODING_CATEGORY_IDX_RAW_TEXT 8 |
| 355 | #define CODING_CATEGORY_IDX_MAX 9 | 364 | #define CODING_CATEGORY_IDX_BINARY 9 |
| 365 | #define CODING_CATEGORY_IDX_MAX 10 | ||
| 356 | 366 | ||
| 357 | /* Definitions of flag bits returned by the function | 367 | /* Definitions of flag bits returned by the function |
| 358 | detect_coding_mask (). */ | 368 | detect_coding_mask (). */ |
| @@ -363,6 +373,7 @@ struct coding_system | |||
| 363 | #define CODING_CATEGORY_MASK_ISO_8_2 (1 << CODING_CATEGORY_IDX_ISO_8_2) | 373 | #define CODING_CATEGORY_MASK_ISO_8_2 (1 << CODING_CATEGORY_IDX_ISO_8_2) |
| 364 | #define CODING_CATEGORY_MASK_ISO_7_ELSE (1 << CODING_CATEGORY_IDX_ISO_7_ELSE) | 374 | #define CODING_CATEGORY_MASK_ISO_7_ELSE (1 << CODING_CATEGORY_IDX_ISO_7_ELSE) |
| 365 | #define CODING_CATEGORY_MASK_ISO_8_ELSE (1 << CODING_CATEGORY_IDX_ISO_8_ELSE) | 375 | #define CODING_CATEGORY_MASK_ISO_8_ELSE (1 << CODING_CATEGORY_IDX_ISO_8_ELSE) |
| 376 | #define CODING_CATEGORY_MASK_RAW_TEXT (1 << CODING_CATEGORY_IDX_RAW_TEXT) | ||
| 366 | #define CODING_CATEGORY_MASK_BIG5 (1 << CODING_CATEGORY_IDX_BIG5) | 377 | #define CODING_CATEGORY_MASK_BIG5 (1 << CODING_CATEGORY_IDX_BIG5) |
| 367 | #define CODING_CATEGORY_MASK_BINARY (1 << CODING_CATEGORY_IDX_BINARY) | 378 | #define CODING_CATEGORY_MASK_BINARY (1 << CODING_CATEGORY_IDX_BINARY) |
| 368 | 379 | ||