Mercurial > emacs
diff src/dispextern.h @ 28360:37743eccd7aa
(INC_TEXT_POS, DEC_TEXT_POS): Add parameter MULTIBYTE_P.
| author | Gerd Moellmann <gerd@gnu.org> |
|---|---|
| date | Mon, 27 Mar 2000 16:02:34 +0000 |
| parents | bc79dbcca2a1 |
| children | 4b675266db04 |
line wrap: on
line diff
--- a/src/dispextern.h Mon Mar 27 15:48:36 2000 +0000 +++ b/src/dispextern.h Mon Mar 27 16:02:34 2000 +0000 @@ -130,21 +130,27 @@ /* 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)
