changeset 46461:7d3969ae9291

(find_charset_in_text, c_string_width): (parse_str_as_multibyte): Declarations updated. (FETCH_STRING_CHAR_ADVANCE): (FETCH_STRING_CHAR_ADVANCE_NO_CHECK): Use const for pointer to lisp string data.
author Ken Raeburn <raeburn@raeburn.org>
date Tue, 16 Jul 2002 19:48:00 +0000
parents 876356a4a4ca
children c6bb99a483e0
files src/charset.h
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/charset.h	Tue Jul 16 19:47:56 2002 +0000
+++ b/src/charset.h	Tue Jul 16 19:48:00 2002 +0000
@@ -573,7 +573,7 @@
     CHARIDX++;								   \
     if (STRING_MULTIBYTE (STRING))					   \
       {									   \
-	unsigned char *ptr = SDATA (STRING) + BYTEIDX;			   \
+	const unsigned char *ptr = SDATA (STRING) + BYTEIDX;		   \
 	int space_left = SBYTES (STRING) - BYTEIDX;			   \
 	int actual_len;							   \
 									   \
@@ -590,7 +590,7 @@
 #define FETCH_STRING_CHAR_ADVANCE_NO_CHECK(OUTPUT, STRING, CHARIDX, BYTEIDX)  \
 if (1)									      \
   {									      \
-    unsigned char *fetch_string_char_ptr = SDATA (STRING) + BYTEIDX;	      \
+    const unsigned char *fetch_string_char_ptr = SDATA (STRING) + BYTEIDX;    \
     int fetch_string_char_space_left = SBYTES (STRING) - BYTEIDX;	      \
     int actual_len;							      \
     									      \
@@ -794,16 +794,17 @@
 extern int string_to_char P_ ((const unsigned char *, int, int *));
 extern int char_printable_p P_ ((int c));
 extern int multibyte_form_length P_ ((const unsigned char *, int));
-extern void parse_str_as_multibyte P_ ((unsigned char *, int, int *, int *));
+extern void parse_str_as_multibyte P_ ((const unsigned char *, int, int *,
+					int *));
 extern int str_as_multibyte P_ ((unsigned char *, int, int, int *));
 extern int parse_str_to_multibyte P_ ((unsigned char *, int));
 extern int str_to_multibyte P_ ((unsigned char *, int, int));
 extern int str_as_unibyte P_ ((unsigned char *, int));
 extern int get_charset_id P_ ((Lisp_Object));
-extern int find_charset_in_text P_ ((unsigned char *, int, int, int *,
+extern int find_charset_in_text P_ ((const unsigned char *, int, int, int *,
 				    Lisp_Object));
 extern int strwidth P_ ((unsigned char *, int));
-extern int c_string_width P_ ((unsigned char *, int, int, int *, int *));
+extern int c_string_width P_ ((const unsigned char *, int, int, int *, int *));
 extern int lisp_string_width P_ ((Lisp_Object, int, int *, int *));
 extern int char_bytes P_ ((int));
 extern int char_valid_p P_ ((int, int));