static void reconsider_clip_changes P_ ((struct window *, struct buffer *));
static int text_outside_line_unchanged_p P_ ((struct window *, int, int));
static void store_frame_title_char P_ ((char));
-static int store_frame_title P_ ((unsigned char *, int, int));
+static int store_frame_title P_ ((const unsigned char *, int, int));
static void x_consider_frame_title P_ ((Lisp_Object));
static void handle_stop P_ ((struct it *));
static int tool_bar_lines_needed P_ ((struct frame *));
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_ ((unsigned char *, int, int *));
+static int string_char_and_length P_ ((const unsigned char *, int, 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 *));
static INLINE int
string_char_and_length (str, maxlen, len)
- unsigned char *str;
+ const unsigned char *str;
int maxlen, *len;
{
int c;
if (STRING_MULTIBYTE (string))
{
int rest = SBYTES (string) - BYTEPOS (pos);
- unsigned char *p = SDATA (string) + BYTEPOS (pos);
+ const unsigned char *p = SDATA (string) + BYTEPOS (pos);
int len;
while (nchars--)
for (i = 0; i < it->n_overlay_strings; ++i)
{
- char *s = SDATA (it->overlay_strings[i]);
- char *e = s + SBYTES (it->overlay_strings[i]);
+ const char *s = SDATA (it->overlay_strings[i]);
+ const char *e = s + SBYTES (it->overlay_strings[i]);
while (s < e && *s != '\n')
++s;
suitable for unibyte text if IT->string is unibyte. */
if (STRING_MULTIBYTE (it->string))
{
- unsigned char *p = SDATA (it->string) + BYTEPOS (pos);
+ const unsigned char *p = SDATA (it->string) + BYTEPOS (pos);
int rest = SBYTES (it->string) - BYTEPOS (pos);
int c, len;
struct face *face = FACE_FROM_ID (it->f, face_id);
else if (STRING_MULTIBYTE (it->string))
{
int remaining = SBYTES (it->string) - IT_STRING_BYTEPOS (*it);
- unsigned char *s = SDATA (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);
}
else
else if (STRING_MULTIBYTE (it->string))
{
int maxlen = SBYTES (it->string) - IT_STRING_BYTEPOS (*it);
- unsigned char *s = SDATA (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);
}
else
void
message_dolog (m, nbytes, nlflag, multibyte)
- char *m;
+ const char *m;
int nbytes, nlflag, multibyte;
{
if (!NILP (Vmemory_full))
void
message2 (m, nbytes, multibyte)
- char *m;
+ const char *m;
int nbytes;
int multibyte;
{
void
message2_nolog (m, nbytes, multibyte)
- char *m;
+ const char *m;
int nbytes;
{
struct frame *sf = SELECTED_FRAME ();
void
set_message (s, string, nbytes, multibyte_p)
- char *s;
+ const char *s;
Lisp_Object string;
int nbytes;
{
Lisp_Object a2;
EMACS_INT nbytes, multibyte_p;
{
- char *s = (char *) a1;
+ const char *s = (const char *) a1;
Lisp_Object string = a2;
xassert (BEG == Z);
{
/* Convert from single-byte to multi-byte. */
int i, c, n;
- unsigned char *msg = (unsigned char *) s;
+ const unsigned char *msg = (const unsigned char *) s;
unsigned char str[MAX_MULTIBYTE_LENGTH];
/* Convert a single-byte string to multibyte. */
static int
store_frame_title (str, field_width, precision)
- unsigned char *str;
+ const unsigned char *str;
int field_width, precision;
{
int n = 0;
struct frame *f = XFRAME (WINDOW_FRAME (w));
struct buffer *buffer = XBUFFER (w->buffer);
struct buffer *old = current_buffer;
- unsigned char *arrow_string = SDATA (Voverlay_arrow_string);
+ const unsigned char *arrow_string = SDATA (Voverlay_arrow_string);
int arrow_len = SCHARS (Voverlay_arrow_string);
- unsigned char *arrow_end = arrow_string + arrow_len;
- unsigned char *p;
+ const unsigned char *arrow_end = arrow_string + arrow_len;
+ const unsigned char *p;
struct it it;
int multibyte_p;
int n_glyphs_before;
{
/* A string: output it and check for %-constructs within it. */
unsigned char c;
- unsigned char *this, *lisp_string;
+ const unsigned char *this, *lisp_string;
if (!NILP (props) || risky)
{
|| !NILP (mode_line_string_list)
|| it->current_x < it->last_visible_x))
{
- unsigned char *last = this;
+ const unsigned char *last = this;
/* Advance to end of string or next format specifier. */
while ((c = *this++) != '\0' && c != '%')
}
else /* c == '%' */
{
- unsigned char *percent_position = this;
+ const unsigned char *percent_position = this;
/* Get the specified minimum width. Zero means
don't pad. */
{
Lisp_Object val;
int multibyte = !NILP (current_buffer->enable_multibyte_characters);
- unsigned char *eol_str;
+ const unsigned char *eol_str;
int eol_str_len;
/* The EOL conversion we are using. */
Lisp_Object eoltype;
else if (INTEGERP (eoltype)
&& CHAR_VALID_P (XINT (eoltype), 0))
{
- eol_str = (unsigned char *) alloca (MAX_MULTIBYTE_LENGTH);
- eol_str_len = CHAR_STRING (XINT (eoltype), eol_str);
+ unsigned char *tmp = (unsigned char *) alloca (MAX_MULTIBYTE_LENGTH);
+ eol_str_len = CHAR_STRING (XINT (eoltype), tmp);
+ eol_str = tmp;
}
else
{