[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/character.h,v
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/src/character.h,v |
Date: |
Thu, 12 Jun 2008 20:25:49 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Stefan Monnier <monnier> 08/06/12 20:25:48
Index: character.h
===================================================================
RCS file: /sources/emacs/emacs/src/character.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- character.h 5 Jun 2008 05:45:16 -0000 1.7
+++ character.h 12 Jun 2008 20:25:47 -0000 1.8
@@ -68,6 +68,13 @@
? (c) - 0x3FFF00 \
: multibyte_char_to_unibyte (c, Qnil))
+/* Return the raw 8-bit byte for character C,
+ or -1 if C doesn't correspond to a byte. */
+#define CHAR_TO_BYTE_SAFE(c) \
+ (CHAR_BYTE8_P (c) \
+ ? (c) - 0x3FFF00 \
+ : multibyte_char_to_unibyte_safe (c, Qnil))
+
/* Nonzero iff BYTE is the 1st byte of a multibyte form of a character
that corresponds to a raw 8-bit byte. */
#define CHAR_BYTE8_HEAD_P(byte) ((byte) == 0xC0 || (byte) == 0xC1)