mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-18 06:01:22 -08:00
(INC_TEXT_POS, DEC_TEXT_POS): Add parameter MULTIBYTE_P.
This commit is contained in:
parent
7439e5b9ca
commit
7bed37e412
1 changed files with 10 additions and 4 deletions
|
|
@ -130,21 +130,27 @@ struct text_pos
|
|||
|
||||
/* Increment text position POS. */
|
||||
|
||||
#define INC_TEXT_POS(POS) \
|
||||
#define INC_TEXT_POS(POS, MULTIBYTE_P) \
|
||||
do \
|
||||
{ \
|
||||
++(POS).charpos; \
|
||||
INC_POS ((POS).bytepos); \
|
||||
if (MULTIBYTE_P) \
|
||||
INC_POS ((POS).bytepos); \
|
||||
else \
|
||||
++(POS).bytepos; \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
/* Decrement text position POS. */
|
||||
|
||||
#define DEC_TEXT_POS(POS) \
|
||||
#define DEC_TEXT_POS(POS, MULTIBYTE_P) \
|
||||
do \
|
||||
{ \
|
||||
--(POS).charpos; \
|
||||
DEC_POS ((POS).bytepos); \
|
||||
if (MULTIBYTE_P) \
|
||||
DEC_POS ((POS).bytepos); \
|
||||
else \
|
||||
--(POS).bytepos; \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue