Commit 8867de67 authored by Karl Heuer's avatar Karl Heuer
Browse files

(string_to_non_ascii_char, multibyte_form_length)

(split_non_ascii_string, str_cmpchar_id): Make the STR argument
const unsigned char *.
parent c9fe9cce
......@@ -174,7 +174,7 @@ non_ascii_char_to_string (c, workbuf, str)
directly if STR can hold an ASCII character. */
string_to_non_ascii_char (str, len, actual_len)
unsigned char *str;
const unsigned char *str;
int len, *actual_len;
{
int charset;
......@@ -200,7 +200,7 @@ string_to_non_ascii_char (str, len, actual_len)
/* Return the length of the multi-byte form at string STR of length LEN. */
int
multibyte_form_length (str, len)
unsigned char *str;
const unsigned char *str;
int len;
{
int charset;
......@@ -222,7 +222,8 @@ multibyte_form_length (str, len)
which checks range of STR in advance. */
split_non_ascii_string (str, len, charset, c1, c2)
register unsigned char *str, *c1, *c2;
register const unsigned char *str;
register unsigned char *c1, *c2;
register int len, *charset;
{
register unsigned int cs = *str++;
......@@ -1205,7 +1206,7 @@ static int *cmpchar_hash_table[CMPCHAR_HASH_TABLE_SIZE];
is the sole function for assigning CMPCHAR-ID. */
int
str_cmpchar_id (str, len)
unsigned char *str;
const unsigned char *str;
int len;
{
int hash_idx, *hashp;
......@@ -1220,7 +1221,7 @@ str_cmpchar_id (str, len)
/* At first, get the actual length of the composite character. */
{
unsigned char *p, *endp = str + 1, *lastp = str + len;
const unsigned char *p, *endp = str + 1, *lastp = str + len;
int bytes;
while (endp < lastp && ! CHAR_HEAD_P (*endp)) endp++;
......
......@@ -793,12 +793,12 @@ extern int n_cmpchars;
extern void invalid_character P_ ((int));
extern int unify_char P_ ((Lisp_Object, int, int, int, int));
extern int split_non_ascii_string P_ ((unsigned char *, int, int *,
extern int split_non_ascii_string P_ ((const unsigned char *, int, int *,
unsigned char *, unsigned char *));
extern int string_to_non_ascii_char P_ ((unsigned char *, int, int *));
extern int string_to_non_ascii_char P_ ((const unsigned char *, int, int *));
extern int non_ascii_char_to_string P_ ((int, unsigned char *, unsigned char **));
extern int multibyte_form_length P_ ((unsigned char *, int));
extern int str_cmpchar_id P_ ((unsigned char *, int));
extern int multibyte_form_length P_ ((const unsigned char *, int));
extern int str_cmpchar_id P_ ((const unsigned char *, int));
extern int get_charset_id P_ ((Lisp_Object));
extern int cmpchar_component P_ ((unsigned int, unsigned int));
extern int find_charset_in_str P_ ((unsigned char *, int, int *, Lisp_Object));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment