diff options
| author | Kenichi Handa | 1998-03-24 12:16:10 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1998-03-24 12:16:10 +0000 |
| commit | d8fc7ce4c112c91f112caa5695401513f3912701 (patch) | |
| tree | 829b74996d32067650ccd01344b1ff1b7657d115 /src | |
| parent | 2436e1803120b1833b8386543dc51212a0a3f489 (diff) | |
| download | emacs-d8fc7ce4c112c91f112caa5695401513f3912701.tar.gz emacs-d8fc7ce4c112c91f112caa5695401513f3912701.zip | |
Declarations changed.
(STRING_MULTIBYTE, STRING_BYTES, SET_STRING_BYTES):
New definitions treating negative size_byte as a flag for unibyte.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lisp.h | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/src/lisp.h b/src/lisp.h index 14f14e9261d..30e9a8e60dc 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -545,9 +545,32 @@ struct Lisp_Buffer_Cons | |||
| 545 | int bufpos; | 545 | int bufpos; |
| 546 | }; | 546 | }; |
| 547 | 547 | ||
| 548 | #if 0 | ||
| 549 | |||
| 548 | /* Nonzero if STR is a multibyte string. */ | 550 | /* Nonzero if STR is a multibyte string. */ |
| 549 | #define STRING_MULTIBYTE(STR) \ | 551 | #define STRING_MULTIBYTE(STR) \ |
| 550 | (XSTRING (STR)->size != XSTRING (STR)->size_byte) | 552 | (XSTRING (STR)->size_byte != XSTRING (STR)->size) |
| 553 | |||
| 554 | /* Return the length in bytes of STR. */ | ||
| 555 | #define STRING_BYTES(STR) ((STR)->size_byte + 0) | ||
| 556 | |||
| 557 | /* Set the length in bytes of STR. */ | ||
| 558 | #define SET_STRING_BYTES(STR, SIZE) ((STR)->size_byte = (SIZE)) | ||
| 559 | |||
| 560 | #else | ||
| 561 | |||
| 562 | /* Nonzero if STR is a multibyte string. */ | ||
| 563 | #define STRING_MULTIBYTE(STR) \ | ||
| 564 | (XSTRING (STR)->size_byte >= 0) | ||
| 565 | |||
| 566 | /* Return the length in bytes of STR. */ | ||
| 567 | #define STRING_BYTES(STR) \ | ||
| 568 | ((STR)->size_byte < 0 ? (STR)->size : (STR)->size_byte) | ||
| 569 | |||
| 570 | /* Set the length in bytes of STR. */ | ||
| 571 | #define SET_STRING_BYTES(STR, SIZE) ((STR)->size_byte = (SIZE)) | ||
| 572 | |||
| 573 | #endif /* 0 */ | ||
| 551 | 574 | ||
| 552 | /* In a string or vector, the sign bit of the `size' is the gc mark bit */ | 575 | /* In a string or vector, the sign bit of the `size' is the gc mark bit */ |
| 553 | 576 | ||
| @@ -1731,7 +1754,7 @@ extern void modify_region P_ ((struct buffer *, int, int)); | |||
| 1731 | extern void prepare_to_modify_buffer P_ ((int, int, int *)); | 1754 | extern void prepare_to_modify_buffer P_ ((int, int, int *)); |
| 1732 | extern void signal_before_change P_ ((int, int, int *)); | 1755 | extern void signal_before_change P_ ((int, int, int *)); |
| 1733 | extern void signal_after_change P_ ((int, int, int)); | 1756 | extern void signal_after_change P_ ((int, int, int)); |
| 1734 | extern void replace_range P_ ((int, int, Lisp_Object, int, int)); | 1757 | extern void replace_range P_ ((int, int, Lisp_Object, int, int, int)); |
| 1735 | 1758 | ||
| 1736 | /* Defined in dispnew.c */ | 1759 | /* Defined in dispnew.c */ |
| 1737 | EXFUN (Fding, 1); | 1760 | EXFUN (Fding, 1); |
| @@ -1781,12 +1804,14 @@ EXFUN (Fmake_marker, 0); | |||
| 1781 | EXFUN (Fmake_string, 2); | 1804 | EXFUN (Fmake_string, 2); |
| 1782 | extern Lisp_Object build_string P_ ((char *)); | 1805 | extern Lisp_Object build_string P_ ((char *)); |
| 1783 | extern Lisp_Object make_string P_ ((char *, int)); | 1806 | extern Lisp_Object make_string P_ ((char *, int)); |
| 1784 | extern Lisp_Object make__multibytestring P_ ((char *, int, int)); | 1807 | extern Lisp_Object make_multibyte_string P_ ((char *, int, int)); |
| 1785 | extern Lisp_Object make_event_array P_ ((int, Lisp_Object *)); | 1808 | extern Lisp_Object make_event_array P_ ((int, Lisp_Object *)); |
| 1786 | extern Lisp_Object make_uninit_string P_ ((int)); | 1809 | extern Lisp_Object make_uninit_string P_ ((int)); |
| 1787 | extern Lisp_Object make_uninit_multibyte_string P_ ((int, int)); | 1810 | extern Lisp_Object make_uninit_multibyte_string P_ ((int, int)); |
| 1811 | extern Lisp_Object make_string_from_bytes P_ ((char *, int, int)); | ||
| 1812 | extern Lisp_Object make_specified_string P_ ((char *, int, int, int)); | ||
| 1788 | EXFUN (Fpurecopy, 1); | 1813 | EXFUN (Fpurecopy, 1); |
| 1789 | extern Lisp_Object make_pure_string P_ ((char *, int, int)); | 1814 | extern Lisp_Object make_pure_string P_ ((char *, int, int, int)); |
| 1790 | extern Lisp_Object pure_cons P_ ((Lisp_Object, Lisp_Object)); | 1815 | extern Lisp_Object pure_cons P_ ((Lisp_Object, Lisp_Object)); |
| 1791 | extern Lisp_Object make_pure_vector P_ ((EMACS_INT)); | 1816 | extern Lisp_Object make_pure_vector P_ ((EMACS_INT)); |
| 1792 | EXFUN (Fgarbage_collect, 0); | 1817 | EXFUN (Fgarbage_collect, 0); |