Mercurial > emacs
changeset 21276:e0c0f8846fb0
Declarations changed.
(STRING_MULTIBYTE, STRING_BYTES, SET_STRING_BYTES):
New definitions treating negative size_byte as a flag for unibyte.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Tue, 24 Mar 1998 12:16:10 +0000 |
parents | 66f5ac2310fd |
children | be5da0a5cf64 |
files | src/lisp.h |
diffstat | 1 files changed, 29 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lisp.h Tue Mar 24 05:41:38 1998 +0000 +++ b/src/lisp.h Tue Mar 24 12:16:10 1998 +0000 @@ -545,9 +545,32 @@ int bufpos; }; +#if 0 + /* Nonzero if STR is a multibyte string. */ #define STRING_MULTIBYTE(STR) \ - (XSTRING (STR)->size != XSTRING (STR)->size_byte) + (XSTRING (STR)->size_byte != XSTRING (STR)->size) + +/* Return the length in bytes of STR. */ +#define STRING_BYTES(STR) ((STR)->size_byte + 0) + +/* Set the length in bytes of STR. */ +#define SET_STRING_BYTES(STR, SIZE) ((STR)->size_byte = (SIZE)) + +#else + +/* Nonzero if STR is a multibyte string. */ +#define STRING_MULTIBYTE(STR) \ + (XSTRING (STR)->size_byte >= 0) + +/* Return the length in bytes of STR. */ +#define STRING_BYTES(STR) \ + ((STR)->size_byte < 0 ? (STR)->size : (STR)->size_byte) + +/* Set the length in bytes of STR. */ +#define SET_STRING_BYTES(STR, SIZE) ((STR)->size_byte = (SIZE)) + +#endif /* 0 */ /* In a string or vector, the sign bit of the `size' is the gc mark bit */ @@ -1731,7 +1754,7 @@ extern void prepare_to_modify_buffer P_ ((int, int, int *)); extern void signal_before_change P_ ((int, int, int *)); extern void signal_after_change P_ ((int, int, int)); -extern void replace_range P_ ((int, int, Lisp_Object, int, int)); +extern void replace_range P_ ((int, int, Lisp_Object, int, int, int)); /* Defined in dispnew.c */ EXFUN (Fding, 1); @@ -1781,12 +1804,14 @@ EXFUN (Fmake_string, 2); extern Lisp_Object build_string P_ ((char *)); extern Lisp_Object make_string P_ ((char *, int)); -extern Lisp_Object make__multibytestring P_ ((char *, int, int)); +extern Lisp_Object make_multibyte_string P_ ((char *, int, int)); extern Lisp_Object make_event_array P_ ((int, Lisp_Object *)); extern Lisp_Object make_uninit_string P_ ((int)); extern Lisp_Object make_uninit_multibyte_string P_ ((int, int)); +extern Lisp_Object make_string_from_bytes P_ ((char *, int, int)); +extern Lisp_Object make_specified_string P_ ((char *, int, int, int)); EXFUN (Fpurecopy, 1); -extern Lisp_Object make_pure_string P_ ((char *, int, int)); +extern Lisp_Object make_pure_string P_ ((char *, int, int, int)); extern Lisp_Object pure_cons P_ ((Lisp_Object, Lisp_Object)); extern Lisp_Object make_pure_vector P_ ((EMACS_INT)); EXFUN (Fgarbage_collect, 0);