diff options
Diffstat (limited to 'src/coding.h')
| -rw-r--r-- | src/coding.h | 49 |
1 files changed, 22 insertions, 27 deletions
diff --git a/src/coding.h b/src/coding.h index 2987f19607b..c45d2ef86e2 100644 --- a/src/coding.h +++ b/src/coding.h | |||
| @@ -321,7 +321,7 @@ struct composition_status | |||
| 321 | { | 321 | { |
| 322 | enum composition_state state; | 322 | enum composition_state state; |
| 323 | enum composition_method method; | 323 | enum composition_method method; |
| 324 | int old_form; /* 0:pre-21 form, 1:post-21 form */ | 324 | bool old_form; /* true if pre-21 form */ |
| 325 | int length; /* number of elements produced in charbuf */ | 325 | int length; /* number of elements produced in charbuf */ |
| 326 | int nchars; /* number of characters composed */ | 326 | int nchars; /* number of characters composed */ |
| 327 | int ncomps; /* number of composition components */ | 327 | int ncomps; /* number of composition components */ |
| @@ -350,18 +350,18 @@ struct iso_2022_spec | |||
| 350 | there was an invalid designation previously. */ | 350 | there was an invalid designation previously. */ |
| 351 | int current_designation[4]; | 351 | int current_designation[4]; |
| 352 | 352 | ||
| 353 | /* Set to 1 temporarily only when graphic register 2 or 3 is invoked | ||
| 354 | by single-shift while encoding. */ | ||
| 355 | int single_shifting; | ||
| 356 | |||
| 357 | /* Set to 1 temporarily only when processing at beginning of line. */ | ||
| 358 | int bol; | ||
| 359 | |||
| 360 | /* If positive, we are now scanning CTEXT extended segment. */ | 353 | /* If positive, we are now scanning CTEXT extended segment. */ |
| 361 | int ctext_extended_segment_len; | 354 | int ctext_extended_segment_len; |
| 362 | 355 | ||
| 363 | /* If nonzero, we are now scanning embedded UTF-8 sequence. */ | 356 | /* True temporarily only when graphic register 2 or 3 is invoked by |
| 364 | int embedded_utf_8; | 357 | single-shift while encoding. */ |
| 358 | unsigned single_shifting : 1; | ||
| 359 | |||
| 360 | /* True temporarily only when processing at beginning of line. */ | ||
| 361 | unsigned bol : 1; | ||
| 362 | |||
| 363 | /* If true, we are now scanning embedded UTF-8 sequence. */ | ||
| 364 | unsigned embedded_utf_8 : 1; | ||
| 365 | 365 | ||
| 366 | /* The current composition. */ | 366 | /* The current composition. */ |
| 367 | struct composition_status cmp_status; | 367 | struct composition_status cmp_status; |
| @@ -369,7 +369,6 @@ struct iso_2022_spec | |||
| 369 | 369 | ||
| 370 | struct emacs_mule_spec | 370 | struct emacs_mule_spec |
| 371 | { | 371 | { |
| 372 | int full_support; | ||
| 373 | struct composition_status cmp_status; | 372 | struct composition_status cmp_status; |
| 374 | }; | 373 | }; |
| 375 | 374 | ||
| @@ -470,10 +469,6 @@ struct coding_system | |||
| 470 | Lisp_Object dst_object; | 469 | Lisp_Object dst_object; |
| 471 | unsigned char *destination; | 470 | unsigned char *destination; |
| 472 | 471 | ||
| 473 | /* Set to 1 if the source of conversion is not in the member | ||
| 474 | `charbuf', but at `src_object'. */ | ||
| 475 | int chars_at_source; | ||
| 476 | |||
| 477 | /* If an element is non-negative, it is a character code. | 472 | /* If an element is non-negative, it is a character code. |
| 478 | 473 | ||
| 479 | If it is in the range -128..-1, it is a 8-bit character code | 474 | If it is in the range -128..-1, it is a 8-bit character code |
| @@ -489,18 +484,21 @@ struct coding_system | |||
| 489 | int *charbuf; | 484 | int *charbuf; |
| 490 | int charbuf_size, charbuf_used; | 485 | int charbuf_size, charbuf_used; |
| 491 | 486 | ||
| 487 | /* True if the source of conversion is not in the member | ||
| 488 | `charbuf', but at `src_object'. */ | ||
| 489 | unsigned chars_at_source : 1; | ||
| 490 | |||
| 492 | /* Set to 1 if charbuf contains an annotation. */ | 491 | /* Set to 1 if charbuf contains an annotation. */ |
| 493 | int annotated; | 492 | unsigned annotated : 1; |
| 494 | 493 | ||
| 495 | unsigned char carryover[64]; | 494 | unsigned char carryover[64]; |
| 496 | int carryover_bytes; | 495 | int carryover_bytes; |
| 497 | 496 | ||
| 498 | int default_char; | 497 | int default_char; |
| 499 | 498 | ||
| 500 | int (*detector) (struct coding_system *, | 499 | bool (*detector) (struct coding_system *, struct coding_detection_info *); |
| 501 | struct coding_detection_info *); | ||
| 502 | void (*decoder) (struct coding_system *); | 500 | void (*decoder) (struct coding_system *); |
| 503 | int (*encoder) (struct coding_system *); | 501 | bool (*encoder) (struct coding_system *); |
| 504 | }; | 502 | }; |
| 505 | 503 | ||
| 506 | /* Meanings of bits in the member `common_flags' of the structure | 504 | /* Meanings of bits in the member `common_flags' of the structure |
| @@ -688,22 +686,20 @@ struct coding_system | |||
| 688 | #define ENCODE_UTF_8(str) code_convert_string_norecord (str, Qutf_8, 1) | 686 | #define ENCODE_UTF_8(str) code_convert_string_norecord (str, Qutf_8, 1) |
| 689 | 687 | ||
| 690 | /* Extern declarations. */ | 688 | /* Extern declarations. */ |
| 691 | extern Lisp_Object code_conversion_save (int, int); | 689 | extern Lisp_Object code_conversion_save (bool, bool); |
| 692 | extern int decoding_buffer_size (struct coding_system *, int); | ||
| 693 | extern int encoding_buffer_size (struct coding_system *, int); | ||
| 694 | extern void setup_coding_system (Lisp_Object, struct coding_system *); | 690 | extern void setup_coding_system (Lisp_Object, struct coding_system *); |
| 695 | extern Lisp_Object coding_charset_list (struct coding_system *); | 691 | extern Lisp_Object coding_charset_list (struct coding_system *); |
| 696 | extern Lisp_Object coding_system_charset_list (Lisp_Object); | 692 | extern Lisp_Object coding_system_charset_list (Lisp_Object); |
| 697 | extern Lisp_Object code_convert_string (Lisp_Object, Lisp_Object, | 693 | extern Lisp_Object code_convert_string (Lisp_Object, Lisp_Object, |
| 698 | Lisp_Object, int, int, int); | 694 | Lisp_Object, bool, bool, bool); |
| 699 | extern Lisp_Object code_convert_string_norecord (Lisp_Object, Lisp_Object, | 695 | extern Lisp_Object code_convert_string_norecord (Lisp_Object, Lisp_Object, |
| 700 | int); | 696 | bool); |
| 701 | extern Lisp_Object raw_text_coding_system (Lisp_Object); | 697 | extern Lisp_Object raw_text_coding_system (Lisp_Object); |
| 702 | extern Lisp_Object coding_inherit_eol_type (Lisp_Object, Lisp_Object); | 698 | extern Lisp_Object coding_inherit_eol_type (Lisp_Object, Lisp_Object); |
| 703 | extern Lisp_Object complement_process_encoding_system (Lisp_Object); | 699 | extern Lisp_Object complement_process_encoding_system (Lisp_Object); |
| 704 | 700 | ||
| 705 | extern int decode_coding_gap (struct coding_system *, | 701 | extern void decode_coding_gap (struct coding_system *, |
| 706 | ptrdiff_t, ptrdiff_t); | 702 | ptrdiff_t, ptrdiff_t); |
| 707 | extern void decode_coding_object (struct coding_system *, | 703 | extern void decode_coding_object (struct coding_system *, |
| 708 | Lisp_Object, ptrdiff_t, ptrdiff_t, | 704 | Lisp_Object, ptrdiff_t, ptrdiff_t, |
| 709 | ptrdiff_t, ptrdiff_t, Lisp_Object); | 705 | ptrdiff_t, ptrdiff_t, Lisp_Object); |
| @@ -778,6 +774,5 @@ extern struct coding_system safe_terminal_coding; | |||
| 778 | extern Lisp_Object Qcoding_system_error; | 774 | extern Lisp_Object Qcoding_system_error; |
| 779 | 775 | ||
| 780 | extern char emacs_mule_bytes[256]; | 776 | extern char emacs_mule_bytes[256]; |
| 781 | extern int emacs_mule_string_char (unsigned char *); | ||
| 782 | 777 | ||
| 783 | #endif /* EMACS_CODING_H */ | 778 | #endif /* EMACS_CODING_H */ |