]> code.delx.au - gnu-emacs/blobdiff - src/character.h
* character.h (CHAR_PRINTABLE_P): Reparenthesize to avoid warning.
[gnu-emacs] / src / character.h
index 7b6bcd1a5ae6778e6268bf607fb07d6742b0e476..1f1f6eade84be74434c28654104d440bca3a8223 100644 (file)
@@ -1,7 +1,7 @@
 /* Header for multibyte character handler.
    Copyright (C) 1995, 1997, 1998 Electrotechnical Laboratory, JAPAN.
      Licensed to the Free Software Foundation.
-   Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
+   Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
      National Institute of Advanced Industrial Science and Technology (AIST)
      Registration Number H13PRO009
 
@@ -136,8 +136,8 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 /* Nonzero if character C has a printable glyph.  */
 #define CHAR_PRINTABLE_P(c)    \
-  (((c) >= 32 && ((c) < 127)   \
-    || ! NILP (CHAR_TABLE_REF (Vprintable_chars, (c)))))
+  (((c) >= 32 && (c) < 127)    \
+   || ! NILP (CHAR_TABLE_REF (Vprintable_chars, (c))))
 
 /* Return byte length of multibyte form for character C.  */
 #define CHAR_BYTES(c)                  \
@@ -311,10 +311,9 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
   } while (0)
 
 /* Return the character code of character whose multibyte form is at
-   P.  The argument LEN is ignored.  It will be removed in the
-   future.  */
+   P.  */
 
-#define STRING_CHAR(p, len)                                    \
+#define STRING_CHAR(p)                                         \
   (!((p)[0] & 0x80)                                            \
    ? (p)[0]                                                    \
    : ! ((p)[0] & 0x20)                                         \
@@ -329,10 +328,9 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 
 /* Like STRING_CHAR, but set ACTUAL_LEN to the length of multibyte
-   form.  The argument LEN is ignored.  It will be removed in the
-   future.  */
+   form.  */
 
-#define STRING_CHAR_AND_LENGTH(p, len, actual_len)             \
+#define STRING_CHAR_AND_LENGTH(p, actual_len)                  \
   (!((p)[0] & 0x80)                                            \
    ? ((actual_len) = 1, (p)[0])                                        \
    : ! ((p)[0] & 0x20)                                         \
@@ -382,7 +380,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
          unsigned char *ptr = &SDATA (STRING)[BYTEIDX];                \
          int len;                                                      \
                                                                        \
-         OUTPUT = STRING_CHAR_AND_LENGTH (ptr, 0, len);                \
+         OUTPUT = STRING_CHAR_AND_LENGTH (ptr, len);                   \
          BYTEIDX += len;                                               \
        }                                                               \
       else                                                             \
@@ -405,7 +403,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
          unsigned char *ptr = &SDATA (STRING)[BYTEIDX];                      \
          int len;                                                            \
                                                                              \
-         OUTPUT = STRING_CHAR_AND_LENGTH (ptr, 0, len);                      \
+         OUTPUT = STRING_CHAR_AND_LENGTH (ptr, len);                         \
          BYTEIDX += len;                                                     \
        }                                                                     \
       else                                                                   \
@@ -426,7 +424,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
       unsigned char *ptr = &SDATA (STRING)[BYTEIDX];                        \
       int len;                                                              \
                                                                             \
-      OUTPUT = STRING_CHAR_AND_LENGTH (ptr, 0, len);                        \
+      OUTPUT = STRING_CHAR_AND_LENGTH (ptr, len);                           \
       BYTEIDX += len;                                                       \
       CHARIDX++;                                                            \
     }                                                                       \
@@ -445,7 +443,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
          unsigned char *ptr = BYTE_POS_ADDR (BYTEIDX);         \
          int len;                                              \
                                                                \
-         OUTPUT= STRING_CHAR_AND_LENGTH (ptr, 0, len);         \
+         OUTPUT= STRING_CHAR_AND_LENGTH (ptr, len);            \
          BYTEIDX += len;                                       \
        }                                                       \
       else                                                     \
@@ -465,7 +463,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
       unsigned char *ptr = BYTE_POS_ADDR (BYTEIDX);            \
       int len;                                                 \
                                                                \
-      OUTPUT= STRING_CHAR_AND_LENGTH (ptr, 0, len);            \
+      OUTPUT = STRING_CHAR_AND_LENGTH (ptr, len);              \
       BYTEIDX += len;                                          \
       CHARIDX++;                                               \
     }                                                          \
@@ -672,7 +670,7 @@ extern Lisp_Object Vscript_representative_chars;
   } while (0)
 
 #define DEFSYM(sym, name)      \
-  do { (sym) = intern ((name)); staticpro (&(sym)); } while (0)
+  do { (sym) = intern_c_string ((name)); staticpro (&(sym)); } while (0)
 
 #endif /* EMACS_CHARACTER_H */