(x_set_alpha): Set alpha to -1 if nil given.
[bpt/emacs.git] / src / coding.h
index 134402f..a7196f9 100644 (file)
@@ -1,8 +1,8 @@
 /* Header for coding system handler.
    Copyright (C) 2001, 2002, 2003, 2004, 2005,
-                 2006, 2007  Free Software Foundation, Inc.
+                 2006, 2007, 2008  Free Software Foundation, Inc.
    Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-     2005, 2006, 2007
+     2005, 2006, 2007, 2008
      National Institute of Advanced Industrial Science and Technology (AIST)
      Registration Number H14PRO021
    Copyright (C) 2003
 
 This file is part of GNU Emacs.
 
-GNU Emacs is free software; you can redistribute it and/or modify
+GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3, or (at your option)
-any later version.
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -22,9 +22,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs; see the file COPYING.  If not, write to
-the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-Boston, MA 02110-1301, USA.  */
+along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef EMACS_CODING_H
 #define EMACS_CODING_H
@@ -58,6 +56,12 @@ enum define_coding_iso2022_arg_index
     coding_arg_iso2022_max
   };
 
+enum define_coding_utf8_arg_index
+  {
+    coding_arg_utf8_bom = coding_arg_max,
+    coding_arg_utf8_max
+  };
+
 enum define_coding_utf16_arg_index
   {
     coding_arg_utf16_bom = coding_arg_max,
@@ -150,7 +154,7 @@ enum coding_attr_index
     coding_attr_iso_request,
     coding_attr_iso_flags,
 
-    coding_attr_utf_16_bom,
+    coding_attr_utf_bom,
     coding_attr_utf_16_endian,
 
     coding_attr_emacs_mule_full,
@@ -241,7 +245,7 @@ enum coding_attr_index
        spec = CODING_SYSTEM_SPEC (x);                  \
       }                                                        \
     if (NILP (spec))                                   \
-      x = wrong_type_argument (Qcoding_system_p, (x)); \
+      wrong_type_argument (Qcoding_system_p, (x));     \
   } while (0)
 
 
@@ -258,7 +262,7 @@ enum coding_attr_index
          id = CODING_SYSTEM_ID (x);                            \
        }                                                       \
       if (id < 0)                                              \
-       x = wrong_type_argument (Qcoding_system_p, (x));        \
+       wrong_type_argument (Qcoding_system_p, (x));    \
     } while (0)
 
 
@@ -327,11 +331,11 @@ struct iso_2022_spec
 
 struct ccl_spec;
 
-enum utf_16_bom_type
+enum utf_bom_type
   {
-    utf_16_detect_bom,
-    utf_16_without_bom,
-    utf_16_with_bom
+    utf_detect_bom,
+    utf_without_bom,
+    utf_with_bom
   };
 
 enum utf_16_endian_type
@@ -342,7 +346,7 @@ enum utf_16_endian_type
 
 struct utf_16_spec
 {
-  enum utf_16_bom_type bom;
+  enum utf_bom_type bom;
   enum utf_16_endian_type endian;
   int surrogate;
 };
@@ -382,6 +386,7 @@ struct coding_system
       struct iso_2022_spec iso_2022;
       struct ccl_spec *ccl;    /* Defined in ccl.h.  */
       struct utf_16_spec utf_16;
+      enum utf_bom_type utf_8_bom;
       int emacs_mule_full_support;
     } spec;
 
@@ -742,20 +747,10 @@ extern Lisp_Object Vlocale_coding_system;
    the subprocess output.  */
 extern int inherit_process_coding_system;
 
-/* Coding-system to be used for encoding terminal output.  This
-   structure contains information of a coding-system specified by the
-   function `set-terminal-coding-system'.  */
-extern struct coding_system terminal_coding;
-
 /* Coding system to be used to encode text for terminal display when
    terminal coding system is nil.  */
 extern struct coding_system safe_terminal_coding;
 
-/* Coding-system of what is sent from terminal keyboard.  This
-   structure contains information of a coding-system specified by the
-   function `set-keyboard-coding-system'.  */
-extern struct coding_system keyboard_coding;
-
 /* Default coding systems used for process I/O.  */
 extern Lisp_Object Vdefault_process_coding_system;