From: Gerd Moellmann Date: Mon, 27 Mar 2000 16:02:34 +0000 (+0000) Subject: (INC_TEXT_POS, DEC_TEXT_POS): Add parameter MULTIBYTE_P. X-Git-Tag: emacs-pretest-21.0.90~4455 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7bed37e412c8fa2a7db05bb51a8d4806c39f532d;p=emacs.git (INC_TEXT_POS, DEC_TEXT_POS): Add parameter MULTIBYTE_P. --- 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)