diff options
| author | Kenichi Handa | 2009-03-06 07:52:40 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2009-03-06 07:52:40 +0000 |
| commit | 825d08758787822e136ea21224f684c8620ff1dd (patch) | |
| tree | 4bff31b0120c60ec235c00a20374cf995d5b3d36 /src/coding.h | |
| parent | e951386e3862e77b38b96e00652b8ce4ba788aff (diff) | |
| download | emacs-825d08758787822e136ea21224f684c8620ff1dd.tar.gz emacs-825d08758787822e136ea21224f684c8620ff1dd.zip | |
Include "composite.h".
(enum compisition_state): New enum.
(struct compisition_status): New struct.
(struct iso_2022_spec): New member cmp_status.
(struct emacs_mule_spec): New struct.
(struct coding_system): New members ctext_extended_segment_len and
embedded_utf_8. Change the union member
spec.emacs_mule_full_support to spec.emacs_mule.
Diffstat (limited to 'src/coding.h')
| -rw-r--r-- | src/coding.h | 48 |
1 files changed, 47 insertions, 1 deletions
diff --git a/src/coding.h b/src/coding.h index 3daf4a725f2..153ec952093 100644 --- a/src/coding.h +++ b/src/coding.h | |||
| @@ -306,6 +306,37 @@ enum coding_result_code | |||
| 306 | ASCII characters (usually '?') for unsupported characters. */ | 306 | ASCII characters (usually '?') for unsupported characters. */ |
| 307 | #define CODING_MODE_SAFE_ENCODING 0x20 | 307 | #define CODING_MODE_SAFE_ENCODING 0x20 |
| 308 | 308 | ||
| 309 | /* For handling composition sequence. */ | ||
| 310 | #include "composite.h" | ||
| 311 | |||
| 312 | enum composition_state | ||
| 313 | { | ||
| 314 | COMPOSING_NO, | ||
| 315 | COMPOSING_CHAR, | ||
| 316 | COMPOSING_RULE, | ||
| 317 | COMPOSING_COMPONENT_CHAR, | ||
| 318 | COMPOSING_COMPONENT_RULE | ||
| 319 | }; | ||
| 320 | |||
| 321 | /* Structure for the current composition status. */ | ||
| 322 | struct composition_status | ||
| 323 | { | ||
| 324 | enum composition_state state; | ||
| 325 | enum composition_method method; | ||
| 326 | int old_form; /* 0:pre-21 form, 1:post-21 form */ | ||
| 327 | int length; /* number of elements produced in charbuf */ | ||
| 328 | int nchars; /* number of characters composed */ | ||
| 329 | int ncomps; /* number of composition components */ | ||
| 330 | /* Maximum carryover is for the case of COMPOSITION_WITH_RULE_ALTCHARS. | ||
| 331 | See the comment in coding.c. */ | ||
| 332 | int carryover[4 /* annotation header */ | ||
| 333 | + MAX_COMPOSITION_COMPONENTS * 3 - 2 /* ALTs and RULEs */ | ||
| 334 | + 2 /* intermediate -1 -1 */ | ||
| 335 | + MAX_COMPOSITION_COMPONENTS /* CHARs */ | ||
| 336 | ]; | ||
| 337 | }; | ||
| 338 | |||
| 339 | |||
| 309 | /* Structure of the field `spec.iso_2022' in the structure | 340 | /* Structure of the field `spec.iso_2022' in the structure |
| 310 | `coding_system'. */ | 341 | `coding_system'. */ |
| 311 | struct iso_2022_spec | 342 | struct iso_2022_spec |
| @@ -327,6 +358,21 @@ struct iso_2022_spec | |||
| 327 | 358 | ||
| 328 | /* Set to 1 temporarily only when processing at beginning of line. */ | 359 | /* Set to 1 temporarily only when processing at beginning of line. */ |
| 329 | int bol; | 360 | int bol; |
| 361 | |||
| 362 | /* If positive, we are now scanning CTEXT extended segment. */ | ||
| 363 | int ctext_extended_segment_len; | ||
| 364 | |||
| 365 | /* If nonzero, we are now scanning embedded UTF-8 sequence. */ | ||
| 366 | int embedded_utf_8; | ||
| 367 | |||
| 368 | /* The current composition. */ | ||
| 369 | struct composition_status cmp_status; | ||
| 370 | }; | ||
| 371 | |||
| 372 | struct emacs_mule_spec | ||
| 373 | { | ||
| 374 | int full_support; | ||
| 375 | struct composition_status cmp_status; | ||
| 330 | }; | 376 | }; |
| 331 | 377 | ||
| 332 | struct ccl_spec; | 378 | struct ccl_spec; |
| @@ -387,7 +433,7 @@ struct coding_system | |||
| 387 | struct ccl_spec *ccl; /* Defined in ccl.h. */ | 433 | struct ccl_spec *ccl; /* Defined in ccl.h. */ |
| 388 | struct utf_16_spec utf_16; | 434 | struct utf_16_spec utf_16; |
| 389 | enum utf_bom_type utf_8_bom; | 435 | enum utf_bom_type utf_8_bom; |
| 390 | int emacs_mule_full_support; | 436 | struct emacs_mule_spec emacs_mule; |
| 391 | } spec; | 437 | } spec; |
| 392 | 438 | ||
| 393 | int max_charset_id; | 439 | int max_charset_id; |