diff options
Diffstat (limited to 'src/character.h')
-rw-r--r-- | src/character.h | 74 |
1 files changed, 22 insertions, 52 deletions
diff --git a/src/character.h b/src/character.h index d454add19ee..c8bcb9f4877 100644 --- a/src/character.h +++ b/src/character.h @@ -221,10 +221,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ (ASCII_BYTE_P (byte) || LEADING_CODE_P (byte)) */ #define CHAR_HEAD_P(byte) (((byte) & 0xC0) != 0x80) -/* Kept for backward compatibility. This macro will be removed in the - future. */ -#define BASE_LEADING_CODE_P LEADING_CODE_P - /* How many bytes a character that starts with BYTE occupies in a multibyte form. */ #define BYTES_BY_CHAR_HEAD(byte) \ @@ -235,23 +231,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ : 5) -/* Return the length of the multi-byte form at string STR of length - LEN while assuming that STR points a valid multi-byte form. As - this macro isn't necessary anymore, all callers will be changed to - use BYTES_BY_CHAR_HEAD directly in the future. */ - -#define MULTIBYTE_FORM_LENGTH(str, len) \ - BYTES_BY_CHAR_HEAD (*(str)) - -/* Parse multibyte string STR of length LENGTH and set BYTES to the - byte length of a character at STR while assuming that STR points a - valid multibyte form. As this macro isn't necessary anymore, all - callers will be changed to use BYTES_BY_CHAR_HEAD directly in the - future. */ - -#define PARSE_MULTIBYTE_SEQ(str, length, bytes) \ - (bytes) = BYTES_BY_CHAR_HEAD (*(str)) - /* The byte length of multibyte form at unibyte string P ending at PEND. If STR doesn't point to a valid multibyte form, return 0. */ @@ -617,24 +596,27 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ : 0) -extern int char_resolve_modifier_mask P_ ((int)); -extern int char_string P_ ((unsigned, unsigned char *)); -extern int string_char P_ ((const unsigned char *, - const unsigned char **, int *)); - -extern int translate_char P_ ((Lisp_Object, int c)); -extern int char_printable_p P_ ((int c)); -extern void parse_str_as_multibyte P_ ((const unsigned char *, int, int *, - int *)); -extern int parse_str_to_multibyte P_ ((unsigned char *, int)); -extern int str_as_multibyte P_ ((unsigned char *, int, int, int *)); -extern int str_to_multibyte P_ ((unsigned char *, int, int)); -extern int str_as_unibyte P_ ((unsigned char *, int)); -extern EMACS_INT str_to_unibyte P_ ((const unsigned char *, unsigned char *, - EMACS_INT, int)); -extern int strwidth P_ ((unsigned char *, int)); -extern int c_string_width P_ ((const unsigned char *, int, int, int *, int *)); -extern int lisp_string_width P_ ((Lisp_Object, int, int *, int *)); +extern int char_resolve_modifier_mask (int); +extern int char_string (unsigned, unsigned char *); +extern int string_char (const unsigned char *, + const unsigned char **, int *); + +extern int translate_char (Lisp_Object, int c); +extern int char_printable_p (int c); +extern void parse_str_as_multibyte (const unsigned char *, + EMACS_INT, EMACS_INT *, EMACS_INT *); +extern EMACS_INT parse_str_to_multibyte (const unsigned char *, EMACS_INT); +extern EMACS_INT str_as_multibyte (unsigned char *, EMACS_INT, EMACS_INT, + EMACS_INT *); +extern EMACS_INT str_to_multibyte (unsigned char *, EMACS_INT, EMACS_INT); +extern EMACS_INT str_as_unibyte (unsigned char *, EMACS_INT); +extern EMACS_INT str_to_unibyte (const unsigned char *, unsigned char *, + EMACS_INT, int); +extern EMACS_INT strwidth (const unsigned char *, EMACS_INT); +extern EMACS_INT c_string_width (const unsigned char *, EMACS_INT, int, + EMACS_INT *, EMACS_INT *); +extern EMACS_INT lisp_string_width (Lisp_Object, int, + EMACS_INT *, EMACS_INT *); extern Lisp_Object Vprintable_chars; @@ -645,7 +627,7 @@ extern Lisp_Object Vchar_direction_table; extern Lisp_Object Vchar_unify_table; extern Lisp_Object Vunicode_category_table; -extern Lisp_Object string_escape_byte8 P_ ((Lisp_Object)); +extern Lisp_Object string_escape_byte8 (Lisp_Object); /* Return a translation table of id number ID. */ #define GET_TRANSLATION_TABLE(id) \ @@ -657,18 +639,6 @@ extern Lisp_Object Vauto_fill_chars; extern Lisp_Object Vchar_script_table; extern Lisp_Object Vscript_representative_chars; -/* Copy LEN bytes from FROM to TO. This macro should be used only - when a caller knows that LEN is short and the obvious copy loop is - faster than calling bcopy which has some overhead. Copying a - multibyte sequence of a character is the typical case. */ - -#define BCOPY_SHORT(from, to, len) \ - do { \ - int i = len; \ - unsigned char *from_p = from, *to_p = to; \ - while (i--) *to_p++ = *from_p++; \ - } while (0) - #define DEFSYM(sym, name) \ do { (sym) = intern_c_string ((name)); staticpro (&(sym)); } while (0) |