]> code.delx.au - gnu-emacs/blobdiff - src/composite.h
Update copyright year to 2016
[gnu-emacs] / src / composite.h
index df1700937975803307723b32cc977cd28cf2156b..1423feb92b25dbea48c8d95446f1b498c6b2ee82 100644 (file)
@@ -1,5 +1,5 @@
 /* Header for composite sequence handler.
-   Copyright (C) 2001-2013 Free Software Foundation, Inc.
+   Copyright (C) 2001-2016 Free Software Foundation, Inc.
    Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
      National Institute of Advanced Industrial Science and Technology (AIST)
      Registration Number H14PRO021
@@ -28,9 +28,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "font.h"
 
 INLINE_HEADER_BEGIN
-#ifndef COMPOSITE_INLINE
-# define COMPOSITE_INLINE INLINE
-#endif
 
 /* Methods to display a sequence of components of a composition.  */
 enum composition_method {
@@ -59,7 +56,7 @@ enum composition_method {
    They don't check validity of PROP.  */
 
 /* Return true if PROP is already registered.  */
-COMPOSITE_INLINE bool
+INLINE bool
 composition_registered_p (Lisp_Object prop)
 {
   return INTEGERP (XCAR (prop));
@@ -115,7 +112,7 @@ composition_registered_p (Lisp_Object prop)
     gref = (rule_code) / 12;                                           \
     if (gref > 12) gref = 11;                                          \
     nref = (rule_code) % 12;                                           \
-  } while (0)
+  } while (false)
 
 /* Like COMPOSITION_DECODE_REFS (RULE_CODE, GREF, NREF), but also
    decode RULE_CODE into XOFF and YOFF (vertical offset).  */
@@ -125,7 +122,7 @@ composition_registered_p (Lisp_Object prop)
     xoff = (rule_code) >> 16;                                          \
     yoff = ((rule_code) >> 8) & 0xFF;                                  \
     COMPOSITION_DECODE_REFS (rule_code, gref, nref);                   \
-  } while (0)
+  } while (false)
 
 /* Nonzero if the global reference point GREF and new reference point NREF are
    valid.  */
@@ -159,7 +156,7 @@ 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 short width;
+  int width;
 
   /* Method of the composition.  */
   enum composition_method method;
@@ -193,7 +190,6 @@ extern ptrdiff_t n_compositions;
 #define CHECK_BORDER   (CHECK_HEAD | CHECK_TAIL)
 #define CHECK_ALL      (CHECK_BORDER | CHECK_INSIDE)
 
-extern Lisp_Object Qcomposition;
 extern Lisp_Object composition_hash_table;
 extern ptrdiff_t get_composition_id (ptrdiff_t, ptrdiff_t, ptrdiff_t,
                                     Lisp_Object, Lisp_Object);
@@ -207,7 +203,7 @@ extern void compose_text (ptrdiff_t, ptrdiff_t, Lisp_Object, Lisp_Object,
 
 /* Return the method of a composition with property PROP.  */
 
-COMPOSITE_INLINE enum composition_method
+INLINE enum composition_method
 composition_method (Lisp_Object prop)
 {
   if (composition_registered_p (prop))
@@ -226,7 +222,7 @@ composition_method (Lisp_Object prop)
 /* Given offsets START and END, return true if PROP is a valid composition
    property with length END - START.  */
 
-COMPOSITE_INLINE bool
+INLINE bool
 composition_valid_p (ptrdiff_t start, ptrdiff_t end, Lisp_Object prop)
 {
   return (CONSP (prop)
@@ -262,7 +258,7 @@ composition_valid_p (ptrdiff_t start, ptrdiff_t end, Lisp_Object prop)
 #define LGSTRING_GLYPH_LEN(lgs) (ASIZE ((lgs)) - 2)
 #define LGSTRING_GLYPH(lgs, idx) AREF ((lgs), (idx) + 2)
 #define LGSTRING_SET_GLYPH(lgs, idx, val) ASET ((lgs), (idx) + 2, (val))
-COMPOSITE_INLINE Lisp_Object *
+INLINE Lisp_Object *
 lgstring_glyph_addr (Lisp_Object lgs, ptrdiff_t idx)
 {
   return aref_addr (lgs, idx + 2);