changeset 90594:a965377e6761

(detect_coding_system): Fix for handling off inhibit_iso_escape_detection. Fix for the case that no coding system is defined for a specific coding category.
author Kenichi Handa <handa@m17n.org>
date Mon, 28 Aug 2006 04:09:02 +0000
parents d6ffdba10de5
children fd59c4164a14
files src/coding.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/coding.c	Mon Aug 28 02:37:18 2006 +0000
+++ b/src/coding.c	Mon Aug 28 04:09:02 2006 +0000
@@ -7243,7 +7243,7 @@
 	    break;
 	  if (c < 0x20
 	      && (c == ISO_CODE_ESC || c == ISO_CODE_SI || c == ISO_CODE_SO)
-	      && inhibit_iso_escape_detection)
+	      && ! inhibit_iso_escape_detection)
 	    {
 	      coding.head_ascii = src - coding.source;
 	      if (detect_coding_iso_2022 (&coding, &detect_info))
@@ -7266,6 +7266,7 @@
 	    for (i = 0; i < coding_category_raw_text; i++)
 	      {
 		category = coding_priorities[i];
+		this = coding_categories + category;
 		if (detect_info.found & (1 << category))
 		  break;
 	      }
@@ -7349,7 +7350,8 @@
 		{
 		  found |= 1 << category;
 		  id = coding_categories[category].id;
-		  val = Fcons (make_number (id), val);
+		  if (id >= 0)
+		    val = Fcons (make_number (id), val);
 		}
 	    }
 	  for (i = coding_category_raw_text - 1; i >= 0; i--)