Replace `iff' in comments.
[bpt/emacs.git] / src / composite.h
index 6176983..ba8f8c8 100644 (file)
@@ -1,12 +1,15 @@
 /* Header for composite sequence handler.
-   Copyright (C) 1999 Electrotechnical Laboratory, JAPAN.
-   Licensed to the Free Software Foundation.
+   Copyright (C) 2001, 2002, 2003, 2004, 2005,
+                 2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+     National Institute of Advanced Industrial Science and Technology (AIST)
+     Registration Number H14PRO021
 
 This file is part of GNU Emacs.
 
 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 2, or (at your option)
+the Free Software Foundation; either version 3, or (at your option)
 any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
@@ -16,11 +19,11 @@ 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., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
+the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA.  */
 
-#ifndef _COMPOSITE_H
-#define _COMPOSITE_H
+#ifndef EMACS_COMPOSITE_H
+#define EMACS_COMPOSITE_H
 
 /* Methods to display a sequence of components a composition.  */
 enum composition_method {
@@ -53,7 +56,7 @@ enum composition_method {
 /* Temporary variable used only in the following macros.  */
 extern Lisp_Object composition_temp;
 
-/* Return 1 iff the composition is already registered.  */
+/* Return 1 if the composition is already registered.  */
 #define COMPOSITION_REGISTERD_P(prop) INTEGERP (XCAR (prop))
 
 /* Return ID number of the already registered composition.  */
@@ -75,7 +78,7 @@ extern Lisp_Object composition_temp;
 #define COMPOSITION_MODIFICATION_FUNC(prop)    \
   (COMPOSITION_REGISTERD_P (prop)              \
    ? XCDR (XCDR (XCDR (prop)))                 \
-   : XCDR (prop))
+   : CONSP (prop) ? XCDR (prop) : Qnil)
 
 /* Return the method of composition.  */
 #define COMPOSITION_METHOD(prop)                                       \
@@ -88,19 +91,22 @@ extern Lisp_Object composition_temp;
          ? COMPOSITION_WITH_ALTCHARS                                   \
          : COMPOSITION_WITH_RULE_ALTCHARS))))
 
-/* Return 1 iff the composition is valid.  It is valid if length of
+/* Return 1 if the composition is valid.  It is valid if length of
    the composition equals to (END - START).  */
-#define COMPOSITION_VALID_P(start, end, prop)                                \
-  (CONSP (prop)                                                                      \
-   && (COMPOSITION_REGISTERD_P (prop)                                        \
-       ? (COMPOSITION_ID (prop) >= 0                                         \
-         && COMPOSITION_ID (prop) <= n_compositions                          \
-         && CONSP (XCDR (prop)))                                             \
-       : (composition_temp = XCAR (prop),                                    \
-         (CONSP (composition_temp)                                           \
-          && (composition_temp = XCDR (composition_temp),                    \
-              (NILP (composition_temp) || STRINGP (composition_temp)         \
-               || VECTORP (composition_temp) || CONSP (composition_temp))))))\
+#define COMPOSITION_VALID_P(start, end, prop)                  \
+  (CONSP (prop)                                                        \
+   && (COMPOSITION_REGISTERD_P (prop)                          \
+       ? (COMPOSITION_ID (prop) >= 0                           \
+         && COMPOSITION_ID (prop) <= n_compositions            \
+         && CONSP (XCDR (prop)))                               \
+       : (composition_temp = XCAR (prop),                      \
+         (CONSP (composition_temp)                             \
+          && (composition_temp = XCDR (composition_temp),      \
+              (NILP (composition_temp)                         \
+               || STRINGP (composition_temp)                   \
+               || VECTORP (composition_temp)                   \
+               || INTEGERP (composition_temp)                  \
+               || CONSP (composition_temp))))))                \
    && (end - start) == COMPOSITION_LENGTH (prop))
 
 /* Return the Nth glyph of composition specified by CMP.  CMP is a
@@ -143,23 +149,23 @@ extern Lisp_Object composition_temp;
 
    When a composition is assigned an ID number (by
    get_composition_id), this structure is allocated for the
-   composition and linked in composition_table[ID].  
+   composition and linked in composition_table[ID].
 
    Identical compositions appearing at different places have the same
    ID, and thus share the same instance of this structure.  */
 
 struct composition {
-  /* How many columns the overall glyphs occupy on the screen.  This
-     gives an approximate value for column calculation in
-     Fcurrent_column, and etc.  */
-  unsigned char width;
-
   /* Number of glyphs of the composition components.  */
-  unsigned char glyph_len;
+  unsigned glyph_len;
 
   /* Width, ascent, and descent pixels of the composition.  */
   short pixel_width, ascent, descent;
 
+  /* How many columns the overall glyphs occupy on the screen.  This
+     gives an approximate value for column calculation in
+     Fcurrent_column, and etc.  */
+  unsigned short width;
+
   /* Method of the composition.  */
   enum composition_method method;
 
@@ -199,8 +205,14 @@ extern int get_composition_id P_ ((int, int, int, Lisp_Object, Lisp_Object));
 extern int find_composition P_ ((int, int, int *, int *, Lisp_Object *,
                                 Lisp_Object));
 extern void update_compositions P_ ((int, int, int));
+extern void make_composition_value_copy P_ ((Lisp_Object));
 extern void compose_region P_ ((int, int, Lisp_Object, Lisp_Object,
                                Lisp_Object));
-extern void syms_of_composition P_ (());
+extern void syms_of_composite P_ ((void));
+extern void compose_text P_ ((int, int, Lisp_Object, Lisp_Object,
+                             Lisp_Object));
+
+#endif /* not EMACS_COMPOSITE_H */
 
-#endif /* not _COMPOSITE_H */
+/* arch-tag: 59524d89-c645-47bd-b5e6-65e861690118
+   (do not change this comment) */