# HG changeset patch # User Aidan Kehoe # Date 1389902166 0 # Node ID ccaa851ae712e870ceb65d19226426d40d8de48c # Parent 65d65b52d608ca1f17365a96fc3cf710a3af625c Rework description of no_conversion coding system, avoiding pdump confusion. src/ChangeLog addition: 2014-01-16 Aidan Kehoe * 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. diff -r 65d65b52d608 -r ccaa851ae712 src/ChangeLog --- a/src/ChangeLog Thu Jan 16 16:27:52 2014 +0000 +++ b/src/ChangeLog Thu Jan 16 19:56:06 2014 +0000 @@ -1,3 +1,14 @@ +2014-01-16 Aidan Kehoe + + * 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. + 2014-01-16 Aidan Kehoe Pass character count information from the no-conversion and diff -r 65d65b52d608 -r ccaa851ae712 src/file-coding.c --- a/src/file-coding.c Thu Jan 16 16:27:52 2014 +0000 +++ b/src/file-coding.c Thu Jan 16 19:56:06 2014 +0000 @@ -2832,31 +2832,13 @@ #### Shouldn't we _call_ it that, then? And while we're at it, separate it into "to_internal" and "to_external"? */ - -struct no_conversion_coding_system -{ -}; - struct no_conversion_coding_stream { /* Number of characters seen when decoding. */ Charcount characters_seen; }; -static const struct memory_description no_conversion_coding_system_description[] = { - { XD_END } -}; - -static const struct memory_description no_conversion_coding_stream_description_1 [] = { - { XD_INT, offsetof (struct no_conversion_coding_stream, characters_seen) }, - { XD_END } -}; - -const struct sized_memory_description no_conversion_coding_stream_description = { - sizeof (struct no_conversion_coding_stream), no_conversion_coding_stream_description_1 -}; - -DEFINE_CODING_SYSTEM_TYPE_WITH_DATA (no_conversion); +DEFINE_CODING_SYSTEM_TYPE (no_conversion); /* This is used when reading in "binary" files -- i.e. files that may contain all 256 possible byte values and that are not to be @@ -4740,8 +4722,14 @@ dump_add_opaque_int (&coding_detector_count); dump_add_opaque_int (&coding_detector_category_count); - INITIALIZE_CODING_SYSTEM_TYPE_WITH_DATA (no_conversion, - "no-conversion-coding-system-p"); + INITIALIZE_CODING_SYSTEM_TYPE (no_conversion, + "no-conversion-coding-system-p"); + /* This is the only coding system type that has coding_stream info but no + coding_system info, which is why we're not using + INITIALIZE_CODING_SYSTEM_TYPE_WITH_DATA. */ + no_conversion_coding_system_methods->coding_data_size = + sizeof (struct no_conversion_coding_stream); + CODING_SYSTEM_HAS_METHOD (no_conversion, convert); CODING_SYSTEM_HAS_METHOD (no_conversion, character_tell);