]> git.eshelyaron.com Git - emacs.git/commitdiff
coding.h (define_coding_undecided_arg_index): New enum.
authorKenichi Handa <handa@gnu.org>
Fri, 28 Jun 2013 14:59:50 +0000 (23:59 +0900)
committerKenichi Handa <handa@gnu.org>
Fri, 28 Jun 2013 14:59:50 +0000 (23:59 +0900)
(coding_attr_index): New members
coding_attr_undecided_inhibit_null_byte_detection,
coding_attr_undecided_inhibit_iso_escape_detection,
coding_attr_undecided_prefer_utf_8.
(undecided_spec): New struct.
(struct coding_system): New member `undecied' of the member
`spec'.

src/ChangeLog
src/coding.h

index 202331dac53e4032152e150a4d8e635b1d361759..9c5bb381bfe403f759f1a096363dacf7e1e4977f 100644 (file)
@@ -1,3 +1,22 @@
+2013-06-28  Kenichi Handa  <handa@gnu.org>
+
+       * coding.h (define_coding_undecided_arg_index): New enum.
+       (coding_attr_index): New members
+       coding_attr_undecided_inhibit_null_byte_detection,
+       coding_attr_undecided_inhibit_iso_escape_detection,
+       coding_attr_undecided_prefer_utf_8.
+       (undecided_spec): New struct.
+       (struct coding_system): New member `undecied' of the member
+       `spec'.
+
+       * coding.c (setup_coding_system): Handle CODING->spec.undecided.
+       (detect_coding): Likewise.
+       (detect_coding_system): Likewise.
+       (Fdefine_coding_system_internal): New coding system properties
+       :inhibit-null-byte-detection, :inhibit-iso-escape-detection, and
+       :prefer-utf-8.
+       (syms_of_coding): Adjusted for coding_arg_undecided_max.
+
 2013-06-22  Paul Eggert  <eggert@cs.ucla.edu>
 
        Clean up SIGCHLD handling a bit (Bug#14569).
index d13fd42fe4ff392daf689b0aebe414ceb0985a89..453805e233afb8e4dd44b21bcbf7ace3ae86d8bb 100644 (file)
@@ -76,6 +76,14 @@ enum define_coding_ccl_arg_index
     coding_arg_ccl_max
   };
 
+enum define_coding_undecided_arg_index
+  {
+    coding_arg_undecided_inhibit_null_byte_detection = coding_arg_max,
+    coding_arg_undecided_inhibit_iso_escape_detection,
+    coding_arg_undecided_prefer_utf_8,
+    coding_arg_undecided_max
+  };
+
 /* Hash table for all coding systems.  Keys are coding system symbols
    and values are spec vectors of the corresponding coding system.  A
    spec vector has the form [ ATTRS ALIASES EOL-TYPE ].  ATTRS is a
@@ -158,6 +166,10 @@ enum coding_attr_index
 
     coding_attr_emacs_mule_full,
 
+    coding_attr_undecided_inhibit_null_byte_detection,
+    coding_attr_undecided_inhibit_iso_escape_detection,
+    coding_attr_undecided_prefer_utf_8,
+
     coding_attr_last_index
   };
 
@@ -368,6 +380,13 @@ struct emacs_mule_spec
 
 struct ccl_spec;
 
+struct undecided_spec
+{
+  int inhibit_nbd;             /* nbd: null byte detection */
+  int inhibit_ied;             /* ied: iso escape detection */
+  int prefer_utf_8;
+};
+
 enum utf_bom_type
   {
     utf_detect_bom,
@@ -425,6 +444,7 @@ struct coding_system
       struct utf_16_spec utf_16;
       enum utf_bom_type utf_8_bom;
       struct emacs_mule_spec emacs_mule;
+      struct undecided_spec undecided;
     } spec;
 
   int max_charset_id;