comparison src/file-coding.c @ 5777:ccaa851ae712

Rework description of no_conversion coding system, avoiding pdump confusion. src/ChangeLog addition: 2014-01-16 Aidan Kehoe <kehoea@parhasard.net> * file-coding.c: * file-coding.c (struct no_conversion_coding_stream): * file-coding.c (const struct sized_memory_description no_conversion_coding_stream_description): Removed. * file-coding.c (coding_system_type_create): Remove structure and description for struct no_conversion_coding_system, which confused pdump on some builds after the last change.
author Aidan Kehoe <kehoea@parhasard.net>
date Thu, 16 Jan 2014 19:56:06 +0000
parents 65d65b52d608
children 0cb4f494a548
comparison
equal deleted inserted replaced
5776:65d65b52d608 5777:ccaa851ae712
2830 without conversion. 2830 without conversion.
2831 2831
2832 #### Shouldn't we _call_ it that, then? And while we're at it, 2832 #### Shouldn't we _call_ it that, then? And while we're at it,
2833 separate it into "to_internal" and "to_external"? */ 2833 separate it into "to_internal" and "to_external"? */
2834 2834
2835
2836 struct no_conversion_coding_system
2837 {
2838 };
2839
2840 struct no_conversion_coding_stream 2835 struct no_conversion_coding_stream
2841 { 2836 {
2842 /* Number of characters seen when decoding. */ 2837 /* Number of characters seen when decoding. */
2843 Charcount characters_seen; 2838 Charcount characters_seen;
2844 }; 2839 };
2845 2840
2846 static const struct memory_description no_conversion_coding_system_description[] = { 2841 DEFINE_CODING_SYSTEM_TYPE (no_conversion);
2847 { XD_END }
2848 };
2849
2850 static const struct memory_description no_conversion_coding_stream_description_1 [] = {
2851 { XD_INT, offsetof (struct no_conversion_coding_stream, characters_seen) },
2852 { XD_END }
2853 };
2854
2855 const struct sized_memory_description no_conversion_coding_stream_description = {
2856 sizeof (struct no_conversion_coding_stream), no_conversion_coding_stream_description_1
2857 };
2858
2859 DEFINE_CODING_SYSTEM_TYPE_WITH_DATA (no_conversion);
2860 2842
2861 /* This is used when reading in "binary" files -- i.e. files that may 2843 /* This is used when reading in "binary" files -- i.e. files that may
2862 contain all 256 possible byte values and that are not to be 2844 contain all 256 possible byte values and that are not to be
2863 interpreted as being in any particular encoding. */ 2845 interpreted as being in any particular encoding. */
2864 static Bytecount 2846 static Bytecount
4738 4720
4739 dump_add_opaque_int (&coding_system_tick); 4721 dump_add_opaque_int (&coding_system_tick);
4740 dump_add_opaque_int (&coding_detector_count); 4722 dump_add_opaque_int (&coding_detector_count);
4741 dump_add_opaque_int (&coding_detector_category_count); 4723 dump_add_opaque_int (&coding_detector_category_count);
4742 4724
4743 INITIALIZE_CODING_SYSTEM_TYPE_WITH_DATA (no_conversion, 4725 INITIALIZE_CODING_SYSTEM_TYPE (no_conversion,
4744 "no-conversion-coding-system-p"); 4726 "no-conversion-coding-system-p");
4727 /* This is the only coding system type that has coding_stream info but no
4728 coding_system info, which is why we're not using
4729 INITIALIZE_CODING_SYSTEM_TYPE_WITH_DATA. */
4730 no_conversion_coding_system_methods->coding_data_size =
4731 sizeof (struct no_conversion_coding_stream);
4732
4745 CODING_SYSTEM_HAS_METHOD (no_conversion, convert); 4733 CODING_SYSTEM_HAS_METHOD (no_conversion, convert);
4746 CODING_SYSTEM_HAS_METHOD (no_conversion, character_tell); 4734 CODING_SYSTEM_HAS_METHOD (no_conversion, character_tell);
4747 4735
4748 INITIALIZE_DETECTOR (no_conversion); 4736 INITIALIZE_DETECTOR (no_conversion);
4749 DETECTOR_HAS_METHOD (no_conversion, detect); 4737 DETECTOR_HAS_METHOD (no_conversion, detect);