changeset 22009:8a2d45cadd66

(detect_coding_mask): Check also coding-category-binary.
author Richard M. Stallman <rms@gnu.org>
date Sat, 09 May 1998 21:47:17 +0000
parents 6182deb2d814
children 547e4c0a42c0
files src/coding.c
diffstat 1 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/coding.c	Sat May 09 21:10:30 1998 +0000
+++ b/src/coding.c	Sat May 09 21:47:17 1998 +0000
@@ -3256,15 +3256,18 @@
 	{
 	  for (i = 0; i < CODING_CATEGORY_IDX_MAX; i++)
 	    {
-	      priorities[i] &= try;
-	      if (priorities[i] & CODING_CATEGORY_MASK_ISO)
+	      if (priorities[i] & try & CODING_CATEGORY_MASK_ISO)
 		mask = detect_coding_iso2022 (src, src_end);
-	      else if (priorities[i] & CODING_CATEGORY_MASK_SJIS)
+	      else if (priorities[i] & try & CODING_CATEGORY_MASK_SJIS)
 		mask = detect_coding_sjis (src, src_end);
-	      else if (priorities[i] & CODING_CATEGORY_MASK_BIG5)
+	      else if (priorities[i] & try & CODING_CATEGORY_MASK_BIG5)
 		mask = detect_coding_big5 (src, src_end);      
-	      else if (priorities[i] & CODING_CATEGORY_MASK_EMACS_MULE)
+	      else if (priorities[i] & try & CODING_CATEGORY_MASK_EMACS_MULE)
 		mask = detect_coding_emacs_mule (src, src_end);      
+	      else if (priorities[i] & CODING_CATEGORY_MASK_RAW_TEXT)
+		mask = CODING_CATEGORY_MASK_RAW_TEXT;
+	      else if (priorities[i] & CODING_CATEGORY_MASK_BINARY)
+		mask = CODING_CATEGORY_MASK_BINARY;
 	      if (mask)
 		goto label_return_highest_only;
 	    }
@@ -3279,7 +3282,7 @@
       if (try & CODING_CATEGORY_MASK_EMACS_MULE)
 	mask |= detect_coding_emacs_mule (src, src_end);      
     }
-  return (mask | CODING_CATEGORY_MASK_RAW_TEXT);
+  return (mask | CODING_CATEGORY_MASK_RAW_TEXT | CODING_CATEGORY_MASK_BINARY);
 
  label_return_highest_only:
   for (i = 0; i < CODING_CATEGORY_IDX_MAX; i++)