713 |
static void reconsider_clip_changes P_ ((struct window *, struct buffer *)); |
static void reconsider_clip_changes P_ ((struct window *, struct buffer *)); |
714 |
static int text_outside_line_unchanged_p P_ ((struct window *, int, int)); |
static int text_outside_line_unchanged_p P_ ((struct window *, int, int)); |
715 |
static void store_frame_title_char P_ ((char)); |
static void store_frame_title_char P_ ((char)); |
716 |
static int store_frame_title P_ ((unsigned char *, int, int)); |
static int store_frame_title P_ ((const unsigned char *, int, int)); |
717 |
static void x_consider_frame_title P_ ((Lisp_Object)); |
static void x_consider_frame_title P_ ((Lisp_Object)); |
718 |
static void handle_stop P_ ((struct it *)); |
static void handle_stop P_ ((struct it *)); |
719 |
static int tool_bar_lines_needed P_ ((struct frame *)); |
static int tool_bar_lines_needed P_ ((struct frame *)); |
732 |
static int display_echo_area_1 P_ ((EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT)); |
static int display_echo_area_1 P_ ((EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT)); |
733 |
static int resize_mini_window_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)); |
734 |
static Lisp_Object unwind_redisplay P_ ((Lisp_Object)); |
static Lisp_Object unwind_redisplay P_ ((Lisp_Object)); |
735 |
static int string_char_and_length P_ ((unsigned char *, int, int *)); |
static int string_char_and_length P_ ((const unsigned char *, int, int *)); |
736 |
static struct text_pos display_prop_end P_ ((struct it *, Lisp_Object, |
static struct text_pos display_prop_end P_ ((struct it *, Lisp_Object, |
737 |
struct text_pos)); |
struct text_pos)); |
738 |
static int compute_window_start_on_continuation_line P_ ((struct window *)); |
static int compute_window_start_on_continuation_line P_ ((struct window *)); |
1149 |
|
|
1150 |
static INLINE int |
static INLINE int |
1151 |
string_char_and_length (str, maxlen, len) |
string_char_and_length (str, maxlen, len) |
1152 |
unsigned char *str; |
const unsigned char *str; |
1153 |
int maxlen, *len; |
int maxlen, *len; |
1154 |
{ |
{ |
1155 |
int c; |
int c; |
1180 |
if (STRING_MULTIBYTE (string)) |
if (STRING_MULTIBYTE (string)) |
1181 |
{ |
{ |
1182 |
int rest = SBYTES (string) - BYTEPOS (pos); |
int rest = SBYTES (string) - BYTEPOS (pos); |
1183 |
unsigned char *p = SDATA (string) + BYTEPOS (pos); |
const unsigned char *p = SDATA (string) + BYTEPOS (pos); |
1184 |
int len; |
int len; |
1185 |
|
|
1186 |
while (nchars--) |
while (nchars--) |
1878 |
|
|
1879 |
for (i = 0; i < it->n_overlay_strings; ++i) |
for (i = 0; i < it->n_overlay_strings; ++i) |
1880 |
{ |
{ |
1881 |
char *s = SDATA (it->overlay_strings[i]); |
const char *s = SDATA (it->overlay_strings[i]); |
1882 |
char *e = s + SBYTES (it->overlay_strings[i]); |
const char *e = s + SBYTES (it->overlay_strings[i]); |
1883 |
|
|
1884 |
while (s < e && *s != '\n') |
while (s < e && *s != '\n') |
1885 |
++s; |
++s; |
2485 |
suitable for unibyte text if IT->string is unibyte. */ |
suitable for unibyte text if IT->string is unibyte. */ |
2486 |
if (STRING_MULTIBYTE (it->string)) |
if (STRING_MULTIBYTE (it->string)) |
2487 |
{ |
{ |
2488 |
unsigned char *p = SDATA (it->string) + BYTEPOS (pos); |
const unsigned char *p = SDATA (it->string) + BYTEPOS (pos); |
2489 |
int rest = SBYTES (it->string) - BYTEPOS (pos); |
int rest = SBYTES (it->string) - BYTEPOS (pos); |
2490 |
int c, len; |
int c, len; |
2491 |
struct face *face = FACE_FROM_ID (it->f, face_id); |
struct face *face = FACE_FROM_ID (it->f, face_id); |
4612 |
else if (STRING_MULTIBYTE (it->string)) |
else if (STRING_MULTIBYTE (it->string)) |
4613 |
{ |
{ |
4614 |
int remaining = SBYTES (it->string) - IT_STRING_BYTEPOS (*it); |
int remaining = SBYTES (it->string) - IT_STRING_BYTEPOS (*it); |
4615 |
unsigned char *s = SDATA (it->string) + IT_STRING_BYTEPOS (*it); |
const unsigned char *s = (SDATA (it->string) |
4616 |
|
+ IT_STRING_BYTEPOS (*it)); |
4617 |
it->c = string_char_and_length (s, remaining, &it->len); |
it->c = string_char_and_length (s, remaining, &it->len); |
4618 |
} |
} |
4619 |
else |
else |
4642 |
else if (STRING_MULTIBYTE (it->string)) |
else if (STRING_MULTIBYTE (it->string)) |
4643 |
{ |
{ |
4644 |
int maxlen = SBYTES (it->string) - IT_STRING_BYTEPOS (*it); |
int maxlen = SBYTES (it->string) - IT_STRING_BYTEPOS (*it); |
4645 |
unsigned char *s = SDATA (it->string) + IT_STRING_BYTEPOS (*it); |
const unsigned char *s = (SDATA (it->string) |
4646 |
|
+ IT_STRING_BYTEPOS (*it)); |
4647 |
it->c = string_char_and_length (s, maxlen, &it->len); |
it->c = string_char_and_length (s, maxlen, &it->len); |
4648 |
} |
} |
4649 |
else |
else |
5655 |
|
|
5656 |
void |
void |
5657 |
message_dolog (m, nbytes, nlflag, multibyte) |
message_dolog (m, nbytes, nlflag, multibyte) |
5658 |
char *m; |
const char *m; |
5659 |
int nbytes, nlflag, multibyte; |
int nbytes, nlflag, multibyte; |
5660 |
{ |
{ |
5661 |
if (!NILP (Vmemory_full)) |
if (!NILP (Vmemory_full)) |
5869 |
|
|
5870 |
void |
void |
5871 |
message2 (m, nbytes, multibyte) |
message2 (m, nbytes, multibyte) |
5872 |
char *m; |
const char *m; |
5873 |
int nbytes; |
int nbytes; |
5874 |
int multibyte; |
int multibyte; |
5875 |
{ |
{ |
5885 |
|
|
5886 |
void |
void |
5887 |
message2_nolog (m, nbytes, multibyte) |
message2_nolog (m, nbytes, multibyte) |
5888 |
char *m; |
const char *m; |
5889 |
int nbytes; |
int nbytes; |
5890 |
{ |
{ |
5891 |
struct frame *sf = SELECTED_FRAME (); |
struct frame *sf = SELECTED_FRAME (); |
6906 |
|
|
6907 |
void |
void |
6908 |
set_message (s, string, nbytes, multibyte_p) |
set_message (s, string, nbytes, multibyte_p) |
6909 |
char *s; |
const char *s; |
6910 |
Lisp_Object string; |
Lisp_Object string; |
6911 |
int nbytes; |
int nbytes; |
6912 |
{ |
{ |
6932 |
Lisp_Object a2; |
Lisp_Object a2; |
6933 |
EMACS_INT nbytes, multibyte_p; |
EMACS_INT nbytes, multibyte_p; |
6934 |
{ |
{ |
6935 |
char *s = (char *) a1; |
const char *s = (const char *) a1; |
6936 |
Lisp_Object string = a2; |
Lisp_Object string = a2; |
6937 |
|
|
6938 |
xassert (BEG == Z); |
xassert (BEG == Z); |
6986 |
{ |
{ |
6987 |
/* Convert from single-byte to multi-byte. */ |
/* Convert from single-byte to multi-byte. */ |
6988 |
int i, c, n; |
int i, c, n; |
6989 |
unsigned char *msg = (unsigned char *) s; |
const unsigned char *msg = (const unsigned char *) s; |
6990 |
unsigned char str[MAX_MULTIBYTE_LENGTH]; |
unsigned char str[MAX_MULTIBYTE_LENGTH]; |
6991 |
|
|
6992 |
/* Convert a single-byte string to multibyte. */ |
/* Convert a single-byte string to multibyte. */ |
7224 |
|
|
7225 |
static int |
static int |
7226 |
store_frame_title (str, field_width, precision) |
store_frame_title (str, field_width, precision) |
7227 |
unsigned char *str; |
const unsigned char *str; |
7228 |
int field_width, precision; |
int field_width, precision; |
7229 |
{ |
{ |
7230 |
int n = 0; |
int n = 0; |
12512 |
struct frame *f = XFRAME (WINDOW_FRAME (w)); |
struct frame *f = XFRAME (WINDOW_FRAME (w)); |
12513 |
struct buffer *buffer = XBUFFER (w->buffer); |
struct buffer *buffer = XBUFFER (w->buffer); |
12514 |
struct buffer *old = current_buffer; |
struct buffer *old = current_buffer; |
12515 |
unsigned char *arrow_string = SDATA (Voverlay_arrow_string); |
const unsigned char *arrow_string = SDATA (Voverlay_arrow_string); |
12516 |
int arrow_len = SCHARS (Voverlay_arrow_string); |
int arrow_len = SCHARS (Voverlay_arrow_string); |
12517 |
unsigned char *arrow_end = arrow_string + arrow_len; |
const unsigned char *arrow_end = arrow_string + arrow_len; |
12518 |
unsigned char *p; |
const unsigned char *p; |
12519 |
struct it it; |
struct it it; |
12520 |
int multibyte_p; |
int multibyte_p; |
12521 |
int n_glyphs_before; |
int n_glyphs_before; |
13719 |
{ |
{ |
13720 |
/* A string: output it and check for %-constructs within it. */ |
/* A string: output it and check for %-constructs within it. */ |
13721 |
unsigned char c; |
unsigned char c; |
13722 |
unsigned char *this, *lisp_string; |
const unsigned char *this, *lisp_string; |
13723 |
|
|
13724 |
if (!NILP (props) || risky) |
if (!NILP (props) || risky) |
13725 |
{ |
{ |
13796 |
|| !NILP (mode_line_string_list) |
|| !NILP (mode_line_string_list) |
13797 |
|| it->current_x < it->last_visible_x)) |
|| it->current_x < it->last_visible_x)) |
13798 |
{ |
{ |
13799 |
unsigned char *last = this; |
const unsigned char *last = this; |
13800 |
|
|
13801 |
/* Advance to end of string or next format specifier. */ |
/* Advance to end of string or next format specifier. */ |
13802 |
while ((c = *this++) != '\0' && c != '%') |
while ((c = *this++) != '\0' && c != '%') |
13835 |
} |
} |
13836 |
else /* c == '%' */ |
else /* c == '%' */ |
13837 |
{ |
{ |
13838 |
unsigned char *percent_position = this; |
const unsigned char *percent_position = this; |
13839 |
|
|
13840 |
/* Get the specified minimum width. Zero means |
/* Get the specified minimum width. Zero means |
13841 |
don't pad. */ |
don't pad. */ |
14335 |
{ |
{ |
14336 |
Lisp_Object val; |
Lisp_Object val; |
14337 |
int multibyte = !NILP (current_buffer->enable_multibyte_characters); |
int multibyte = !NILP (current_buffer->enable_multibyte_characters); |
14338 |
unsigned char *eol_str; |
const unsigned char *eol_str; |
14339 |
int eol_str_len; |
int eol_str_len; |
14340 |
/* The EOL conversion we are using. */ |
/* The EOL conversion we are using. */ |
14341 |
Lisp_Object eoltype; |
Lisp_Object eoltype; |
14387 |
else if (INTEGERP (eoltype) |
else if (INTEGERP (eoltype) |
14388 |
&& CHAR_VALID_P (XINT (eoltype), 0)) |
&& CHAR_VALID_P (XINT (eoltype), 0)) |
14389 |
{ |
{ |
14390 |
eol_str = (unsigned char *) alloca (MAX_MULTIBYTE_LENGTH); |
unsigned char *tmp = (unsigned char *) alloca (MAX_MULTIBYTE_LENGTH); |
14391 |
eol_str_len = CHAR_STRING (XINT (eoltype), eol_str); |
eol_str_len = CHAR_STRING (XINT (eoltype), tmp); |
14392 |
|
eol_str = tmp; |
14393 |
} |
} |
14394 |
else |
else |
14395 |
{ |
{ |