diff options
| author | Kenichi Handa | 2004-03-11 11:21:39 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2004-03-11 11:21:39 +0000 |
| commit | f6cbaf43e3de88034648c83e2eebf4ec3c7341d9 (patch) | |
| tree | e88a59833ccc103244c6a19f1bc92dc47dfb595a /src/coding.c | |
| parent | d83bf7cc686fd37f7f715f8d2911c441d23ca6b8 (diff) | |
| download | emacs-f6cbaf43e3de88034648c83e2eebf4ec3c7341d9.tar.gz emacs-f6cbaf43e3de88034648c83e2eebf4ec3c7341d9.zip | |
Add many prototypes for static functions.
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 129 |
1 files changed, 84 insertions, 45 deletions
diff --git a/src/coding.c b/src/coding.c index 5b6955e77ce..f50bfa8d85b 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -411,47 +411,6 @@ Lisp_Object Vtranslation_table_for_input; | |||
| 411 | Lisp_Object Vsjis_coding_system; | 411 | Lisp_Object Vsjis_coding_system; |
| 412 | Lisp_Object Vbig5_coding_system; | 412 | Lisp_Object Vbig5_coding_system; |
| 413 | 413 | ||
| 414 | static void record_conversion_result (struct coding_system *coding, | ||
| 415 | enum coding_result_code result); | ||
| 416 | static int detect_coding_utf_8 P_ ((struct coding_system *, | ||
| 417 | struct coding_detection_info *info)); | ||
| 418 | static void decode_coding_utf_8 P_ ((struct coding_system *)); | ||
| 419 | static int encode_coding_utf_8 P_ ((struct coding_system *)); | ||
| 420 | |||
| 421 | static int detect_coding_utf_16 P_ ((struct coding_system *, | ||
| 422 | struct coding_detection_info *info)); | ||
| 423 | static void decode_coding_utf_16 P_ ((struct coding_system *)); | ||
| 424 | static int encode_coding_utf_16 P_ ((struct coding_system *)); | ||
| 425 | |||
| 426 | static int detect_coding_iso_2022 P_ ((struct coding_system *, | ||
| 427 | struct coding_detection_info *info)); | ||
| 428 | static void decode_coding_iso_2022 P_ ((struct coding_system *)); | ||
| 429 | static int encode_coding_iso_2022 P_ ((struct coding_system *)); | ||
| 430 | |||
| 431 | static int detect_coding_emacs_mule P_ ((struct coding_system *, | ||
| 432 | struct coding_detection_info *info)); | ||
| 433 | static void decode_coding_emacs_mule P_ ((struct coding_system *)); | ||
| 434 | static int encode_coding_emacs_mule P_ ((struct coding_system *)); | ||
| 435 | |||
| 436 | static int detect_coding_sjis P_ ((struct coding_system *, | ||
| 437 | struct coding_detection_info *info)); | ||
| 438 | static void decode_coding_sjis P_ ((struct coding_system *)); | ||
| 439 | static int encode_coding_sjis P_ ((struct coding_system *)); | ||
| 440 | |||
| 441 | static int detect_coding_big5 P_ ((struct coding_system *, | ||
| 442 | struct coding_detection_info *info)); | ||
| 443 | static void decode_coding_big5 P_ ((struct coding_system *)); | ||
| 444 | static int encode_coding_big5 P_ ((struct coding_system *)); | ||
| 445 | |||
| 446 | static int detect_coding_ccl P_ ((struct coding_system *, | ||
| 447 | struct coding_detection_info *info)); | ||
| 448 | static void decode_coding_ccl P_ ((struct coding_system *)); | ||
| 449 | static int encode_coding_ccl P_ ((struct coding_system *)); | ||
| 450 | |||
| 451 | static void decode_coding_raw_text P_ ((struct coding_system *)); | ||
| 452 | static int encode_coding_raw_text P_ ((struct coding_system *)); | ||
| 453 | |||
| 454 | |||
| 455 | /* ISO2022 section */ | 414 | /* ISO2022 section */ |
| 456 | 415 | ||
| 457 | #define CODING_ISO_INITIAL(coding, reg) \ | 416 | #define CODING_ISO_INITIAL(coding, reg) \ |
| @@ -858,6 +817,85 @@ static struct coding_system coding_categories[coding_category_max]; | |||
| 858 | } while (0) | 817 | } while (0) |
| 859 | 818 | ||
| 860 | 819 | ||
| 820 | /* Prototypes for static functions. */ | ||
| 821 | static void record_conversion_result P_ ((struct coding_system *coding, | ||
| 822 | enum coding_result_code result)); | ||
| 823 | static int detect_coding_utf_8 P_ ((struct coding_system *, | ||
| 824 | struct coding_detection_info *info)); | ||
| 825 | static void decode_coding_utf_8 P_ ((struct coding_system *)); | ||
| 826 | static int encode_coding_utf_8 P_ ((struct coding_system *)); | ||
| 827 | |||
| 828 | static int detect_coding_utf_16 P_ ((struct coding_system *, | ||
| 829 | struct coding_detection_info *info)); | ||
| 830 | static void decode_coding_utf_16 P_ ((struct coding_system *)); | ||
| 831 | static int encode_coding_utf_16 P_ ((struct coding_system *)); | ||
| 832 | |||
| 833 | static int detect_coding_iso_2022 P_ ((struct coding_system *, | ||
| 834 | struct coding_detection_info *info)); | ||
| 835 | static void decode_coding_iso_2022 P_ ((struct coding_system *)); | ||
| 836 | static int encode_coding_iso_2022 P_ ((struct coding_system *)); | ||
| 837 | |||
| 838 | static int detect_coding_emacs_mule P_ ((struct coding_system *, | ||
| 839 | struct coding_detection_info *info)); | ||
| 840 | static void decode_coding_emacs_mule P_ ((struct coding_system *)); | ||
| 841 | static int encode_coding_emacs_mule P_ ((struct coding_system *)); | ||
| 842 | |||
| 843 | static int detect_coding_sjis P_ ((struct coding_system *, | ||
| 844 | struct coding_detection_info *info)); | ||
| 845 | static void decode_coding_sjis P_ ((struct coding_system *)); | ||
| 846 | static int encode_coding_sjis P_ ((struct coding_system *)); | ||
| 847 | |||
| 848 | static int detect_coding_big5 P_ ((struct coding_system *, | ||
| 849 | struct coding_detection_info *info)); | ||
| 850 | static void decode_coding_big5 P_ ((struct coding_system *)); | ||
| 851 | static int encode_coding_big5 P_ ((struct coding_system *)); | ||
| 852 | |||
| 853 | static int detect_coding_ccl P_ ((struct coding_system *, | ||
| 854 | struct coding_detection_info *info)); | ||
| 855 | static void decode_coding_ccl P_ ((struct coding_system *)); | ||
| 856 | static int encode_coding_ccl P_ ((struct coding_system *)); | ||
| 857 | |||
| 858 | static void decode_coding_raw_text P_ ((struct coding_system *)); | ||
| 859 | static int encode_coding_raw_text P_ ((struct coding_system *)); | ||
| 860 | |||
| 861 | static void coding_set_source P_ ((struct coding_system *)); | ||
| 862 | static void coding_set_destination P_ ((struct coding_system *)); | ||
| 863 | static void coding_alloc_by_realloc P_ ((struct coding_system *, EMACS_INT)); | ||
| 864 | static void coding_alloc_by_making_gap P_ ((struct coding_system *, | ||
| 865 | EMACS_INT)); | ||
| 866 | static unsigned char *alloc_destination P_ ((struct coding_system *, | ||
| 867 | EMACS_INT, unsigned char *)); | ||
| 868 | static void setup_iso_safe_charsets P_ ((Lisp_Object)); | ||
| 869 | static unsigned char *encode_designation_at_bol P_ ((struct coding_system *, | ||
| 870 | int *, int *, | ||
| 871 | unsigned char *)); | ||
| 872 | static int detect_eol P_ ((const unsigned char *, | ||
| 873 | EMACS_INT, enum coding_category)); | ||
| 874 | static Lisp_Object adjust_coding_eol_type P_ ((struct coding_system *, int)); | ||
| 875 | static void decode_eol P_ ((struct coding_system *)); | ||
| 876 | static Lisp_Object get_translation_table P_ ((Lisp_Object, int, int *)); | ||
| 877 | static Lisp_Object get_translation P_ ((Lisp_Object, int *, int *, | ||
| 878 | int, int *, int *)); | ||
| 879 | static int produce_chars P_ ((struct coding_system *, Lisp_Object, int)); | ||
| 880 | static INLINE void produce_composition P_ ((struct coding_system *, int *, | ||
| 881 | EMACS_INT)); | ||
| 882 | static INLINE void produce_charset P_ ((struct coding_system *, int *, | ||
| 883 | EMACS_INT)); | ||
| 884 | static void produce_annotation P_ ((struct coding_system *, EMACS_INT)); | ||
| 885 | static int decode_coding P_ ((struct coding_system *)); | ||
| 886 | static INLINE int *handle_composition_annotation P_ ((EMACS_INT, EMACS_INT, | ||
| 887 | struct coding_system *, | ||
| 888 | int *, EMACS_INT *)); | ||
| 889 | static INLINE int *handle_charset_annotation P_ ((EMACS_INT, EMACS_INT, | ||
| 890 | struct coding_system *, | ||
| 891 | int *, EMACS_INT *)); | ||
| 892 | static void consume_chars P_ ((struct coding_system *, Lisp_Object, int)); | ||
| 893 | static int encode_coding P_ ((struct coding_system *)); | ||
| 894 | static Lisp_Object make_conversion_work_buffer P_ ((int)); | ||
| 895 | static Lisp_Object code_conversion_restore P_ ((Lisp_Object)); | ||
| 896 | static INLINE int char_encodable_p P_ ((int, Lisp_Object)); | ||
| 897 | static Lisp_Object make_subsidiaries P_ ((Lisp_Object)); | ||
| 898 | |||
| 861 | static void | 899 | static void |
| 862 | record_conversion_result (struct coding_system *coding, | 900 | record_conversion_result (struct coding_system *coding, |
| 863 | enum coding_result_code result) | 901 | enum coding_result_code result) |
| @@ -5209,11 +5247,11 @@ coding_inherit_eol_type (coding_system, parent) | |||
| 5209 | 5247 | ||
| 5210 | static int | 5248 | static int |
| 5211 | detect_eol (source, src_bytes, category) | 5249 | detect_eol (source, src_bytes, category) |
| 5212 | unsigned char *source; | 5250 | const unsigned char *source; |
| 5213 | EMACS_INT src_bytes; | 5251 | EMACS_INT src_bytes; |
| 5214 | enum coding_category category; | 5252 | enum coding_category category; |
| 5215 | { | 5253 | { |
| 5216 | unsigned char *src = source, *src_end = src + src_bytes; | 5254 | const unsigned char *src = source, *src_end = src + src_bytes; |
| 5217 | unsigned char c; | 5255 | unsigned char c; |
| 5218 | int total = 0; | 5256 | int total = 0; |
| 5219 | int eol_seen = EOL_SEEN_NONE; | 5257 | int eol_seen = EOL_SEEN_NONE; |
| @@ -6085,7 +6123,7 @@ decode_coding (coding) | |||
| 6085 | 6123 | ||
| 6086 | coding->charbuf[coding->charbuf_used++] = (c & 0x80 ? - c : c); | 6124 | coding->charbuf[coding->charbuf_used++] = (c & 0x80 ? - c : c); |
| 6087 | } | 6125 | } |
| 6088 | produce_chars (coding); | 6126 | produce_chars (coding, Qnil, 1); |
| 6089 | } | 6127 | } |
| 6090 | else | 6128 | else |
| 6091 | { | 6129 | { |
| @@ -6430,8 +6468,9 @@ static int reused_workbuf_in_use; | |||
| 6430 | /* Return a working buffer of code convesion. MULTIBYTE specifies the | 6468 | /* Return a working buffer of code convesion. MULTIBYTE specifies the |
| 6431 | multibyteness of returning buffer. */ | 6469 | multibyteness of returning buffer. */ |
| 6432 | 6470 | ||
| 6433 | Lisp_Object | 6471 | static Lisp_Object |
| 6434 | make_conversion_work_buffer (multibyte) | 6472 | make_conversion_work_buffer (multibyte) |
| 6473 | int multibyte; | ||
| 6435 | { | 6474 | { |
| 6436 | Lisp_Object name, workbuf; | 6475 | Lisp_Object name, workbuf; |
| 6437 | struct buffer *current; | 6476 | struct buffer *current; |