static int display_echo_area_1 P_ ((EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT));
static int resize_mini_window_1 P_ ((EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT));
static Lisp_Object unwind_redisplay P_ ((Lisp_Object));
-static int string_char_and_length P_ ((const unsigned char *, int, int *));
+static int string_char_and_length P_ ((const unsigned char *, int *));
static struct text_pos display_prop_end P_ ((struct it *, Lisp_Object,
struct text_pos));
static int compute_window_start_on_continuation_line P_ ((struct window *));
character. */
static INLINE int
-string_char_and_length (str, maxlen, len)
+string_char_and_length (str, len)
const unsigned char *str;
- int maxlen, *len;
+ int *len;
{
int c;
- c = STRING_CHAR_AND_LENGTH (str, maxlen, *len);
+ c = STRING_CHAR_AND_LENGTH (str, *len);
if (!CHAR_VALID_P (c, 1))
/* We may not change the length here because other places in Emacs
don't use this function, i.e. they silently accept invalid
while (nchars--)
{
- string_char_and_length (p, rest, &len);
+ string_char_and_length (p, &len);
p += len, rest -= len;
xassert (rest >= 0);
CHARPOS (pos) += 1;
SET_TEXT_POS (pos, 0, 0);
while (charpos--)
{
- string_char_and_length (s, rest, &len);
+ string_char_and_length (s, &len);
s += len, rest -= len;
xassert (rest >= 0);
CHARPOS (pos) += 1;
for (nchars = 0; rest > 0; ++nchars)
{
- string_char_and_length (p, rest, &len);
+ string_char_and_length (p, &len);
rest -= len, p += len;
}
}
int c, len;
struct face *face = FACE_FROM_ID (it->f, face_id);
- c = string_char_and_length (p, rest, &len);
+ c = string_char_and_length (p, &len);
face_id = FACE_FOR_CHAR (it->f, face, c, CHARPOS (pos), it->string);
}
}
pos_byte = IT_STRING_BYTEPOS (*it);
string = it->string;
s = SDATA (string) + pos_byte;
- it->c = STRING_CHAR (s, 0);
+ it->c = STRING_CHAR (s);
}
else
{
int remaining = SBYTES (it->string) - IT_STRING_BYTEPOS (*it);
const unsigned char *s = (SDATA (it->string)
+ IT_STRING_BYTEPOS (*it));
- it->c = string_char_and_length (s, remaining, &it->len);
+ it->c = string_char_and_length (s, &it->len);
}
else
{
int maxlen = SBYTES (it->string) - IT_STRING_BYTEPOS (*it);
const unsigned char *s = (SDATA (it->string)
+ IT_STRING_BYTEPOS (*it));
- it->c = string_char_and_length (s, maxlen, &it->len);
+ it->c = string_char_and_length (s, &it->len);
}
else
{
performance problem because there is no noticeable performance
difference between Emacs running in unibyte or multibyte mode. */
int maxlen = strlen (it->s) - IT_BYTEPOS (*it);
- it->c = string_char_and_length (it->s + IT_BYTEPOS (*it),
- maxlen, &it->len);
+ it->c = string_char_and_length (it->s + IT_BYTEPOS (*it), &it->len);
}
else
it->c = it->s[IT_BYTEPOS (*it)], it->len = 1;
/* Get the next character, maybe multibyte. */
p = BYTE_POS_ADDR (IT_BYTEPOS (*it));
if (it->multibyte_p && !ASCII_BYTE_P (*p))
- it->c = STRING_CHAR_AND_LENGTH (p, 0, it->len);
+ it->c = STRING_CHAR_AND_LENGTH (p, it->len);
else
it->c = *p, it->len = 1;
for the *Message* buffer. */
for (i = 0; i < nbytes; i += char_bytes)
{
- c = string_char_and_length (m + i, nbytes - i, &char_bytes);
+ c = string_char_and_length (m + i, &char_bytes);
work[0] = (ASCII_CHAR_P (c)
? c
: multibyte_char_to_unibyte (c, Qnil));
/* Convert a multibyte string to single-byte. */
for (i = 0; i < nbytes; i += n)
{
- c = string_char_and_length (s + i, nbytes - i, &n);
+ c = string_char_and_length (s + i, &n);
work[0] = (ASCII_CHAR_P (c)
? c
: multibyte_char_to_unibyte (c, Qnil));
/* Get the next character. */
if (multibyte_p)
- it.c = string_char_and_length (p, arrow_len, &it.len);
+ it.c = string_char_and_length (p, &it.len);
else
it.c = *p, it.len = 1;
p += it.len;
{
int maxlen = ((IT_BYTEPOS (*it) >= GPT ? ZV : GPT)
- IT_BYTEPOS (*it));
- it2.c = STRING_CHAR_AND_LENGTH (p, maxlen, it2.len);
+ it2.c = STRING_CHAR_AND_LENGTH (p, it2.len);
}
else
it2.c = *p, it2.len = 1;