diff options
| author | Kenichi Handa | 2003-01-06 11:36:42 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2003-01-06 11:36:42 +0000 |
| commit | 4fecac5ca41267ef635418564928b76be385d786 (patch) | |
| tree | 8873aba1060e706f476834fff113cbd0197a6d6a /src/coding.h | |
| parent | 350f35e72fe18db3ba4c3a42aee9407a54ab4011 (diff) | |
| download | emacs-4fecac5ca41267ef635418564928b76be385d786.tar.gz emacs-4fecac5ca41267ef635418564928b76be385d786.zip | |
(struct coding_detection_info): New structure.
(struct coding_system): Prototype of the member `detector'
adjusted.
(CODING_ANNOTATE_CHARSET_MASK): New macro.
Diffstat (limited to 'src/coding.h')
| -rw-r--r-- | src/coding.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/coding.h b/src/coding.h index 17b111118ef..8c2b51cdeec 100644 --- a/src/coding.h +++ b/src/coding.h | |||
| @@ -291,6 +291,18 @@ struct utf_16_spec | |||
| 291 | int surrogate; | 291 | int surrogate; |
| 292 | }; | 292 | }; |
| 293 | 293 | ||
| 294 | struct coding_detection_info | ||
| 295 | { | ||
| 296 | /* Values of these members are bitwise-OR of CATEGORY_MASK_XXXs. */ | ||
| 297 | /* Which categories are already checked. */ | ||
| 298 | int checked; | ||
| 299 | /* Which categories are strongly found. */ | ||
| 300 | int found; | ||
| 301 | /* Which categories are rejected. */ | ||
| 302 | int rejected; | ||
| 303 | }; | ||
| 304 | |||
| 305 | |||
| 294 | struct coding_system | 306 | struct coding_system |
| 295 | { | 307 | { |
| 296 | /* ID number of the coding system. This is an index to | 308 | /* ID number of the coding system. This is an index to |
| @@ -383,7 +395,8 @@ struct coding_system | |||
| 383 | 395 | ||
| 384 | int default_char; | 396 | int default_char; |
| 385 | 397 | ||
| 386 | int (*detector) P_ ((struct coding_system *, int *)); | 398 | int (*detector) P_ ((struct coding_system *, |
| 399 | struct coding_detection_info *)); | ||
| 387 | void (*decoder) P_ ((struct coding_system *)); | 400 | void (*decoder) P_ ((struct coding_system *)); |
| 388 | int (*encoder) P_ ((struct coding_system *)); | 401 | int (*encoder) P_ ((struct coding_system *)); |
| 389 | }; | 402 | }; |
| @@ -394,6 +407,7 @@ struct coding_system | |||
| 394 | #define CODING_ANNOTATION_MASK 0x00FF | 407 | #define CODING_ANNOTATION_MASK 0x00FF |
| 395 | #define CODING_ANNOTATE_COMPOSITION_MASK 0x0001 | 408 | #define CODING_ANNOTATE_COMPOSITION_MASK 0x0001 |
| 396 | #define CODING_ANNOTATE_DIRECTION_MASK 0x0002 | 409 | #define CODING_ANNOTATE_DIRECTION_MASK 0x0002 |
| 410 | #define CODING_ANNOTATE_CHARSET_MASK 0x0003 | ||
| 397 | #define CODING_FOR_UNIBYTE_MASK 0x0100 | 411 | #define CODING_FOR_UNIBYTE_MASK 0x0100 |
| 398 | #define CODING_REQUIRE_FLUSHING_MASK 0x0200 | 412 | #define CODING_REQUIRE_FLUSHING_MASK 0x0200 |
| 399 | #define CODING_REQUIRE_DECODING_MASK 0x0400 | 413 | #define CODING_REQUIRE_DECODING_MASK 0x0400 |