changeset 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 81f630fe3816
children eccb57c44da5
files src/dispextern.h
diffstat 1 files changed, 10 insertions(+), 4 deletions(-) [+]
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)