From 7bed37e412c8fa2a7db05bb51a8d4806c39f532d Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Mon, 27 Mar 2000 16:02:34 +0000 Subject: [PATCH] (INC_TEXT_POS, DEC_TEXT_POS): Add parameter MULTIBYTE_P. --- src/dispextern.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/dispextern.h b/src/dispextern.h index 355454a4217..76578b8fde4 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -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) -- 2.39.5