aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog20
-rw-r--r--src/dispextern.h6
-rw-r--r--src/fringe.c41
-rw-r--r--src/w32term.c4
-rw-r--r--src/window.c11
-rw-r--r--src/xfaces.c25
-rw-r--r--src/xfns.c4
-rw-r--r--src/xmenu.c2
-rw-r--r--src/xselect.c14
-rw-r--r--src/xsettings.c9
-rw-r--r--src/xterm.c6
-rw-r--r--src/xterm.h2
12 files changed, 82 insertions, 62 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 73525169bf9..79fce55c003 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,25 @@
12013-07-30 Dmitry Antipov <dmantipov@yandex.ru> 12013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
2 2
3 * fringe.c (draw_window_fringes, update_window_fringes)
4 (compute_fringe_widths):
5 * w32term.c (x_draw_glyph_string):
6 * window.c (candidate_window_p, Frecenter):
7 * xfaces.c (realize_basic_faces, realize_default_face)
8 (Fbitmap_space_p, Finternal_set_lisp_face_attribute)
9 (x_update_menu_appearance, face_attr_equal_p, lface_equal_p):
10 * xfns.c (x_set_cursor_color, xic_free_xfontset):
11 * xmenu.c (Fx_menu_bar_open_internal):
12 * xselect.c (x_reply_selection_request, Fx_get_atom_name):
13 * xsettings.c (xft_settings_event):
14 * xterm.c (x_draw_glyph_string, x_had_errors_p):
15 Use bool for booleans. Adjust style and comments where
16 appropriate.
17 * dispextern.h (draw_window_fringes, update_window_fringes)
18 (compute_fringe_widths):
19 * xterm.h (x_had_errors_p): Adjust prototype.
20
212013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
22
3 * frame.c (Fmodify_frame_parameters): Always check 2nd arg with 23 * frame.c (Fmodify_frame_parameters): Always check 2nd arg with
4 CHECK_LIST. Rewrite the loop to avoid useless local variable. 24 CHECK_LIST. Rewrite the loop to avoid useless local variable.
5 25
diff --git a/src/dispextern.h b/src/dispextern.h
index e0d04231d3a..d747700fd66 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -3235,9 +3235,9 @@ extern void tty_draw_row_with_mouse_face (struct window *, struct glyph_row *,
3235int lookup_fringe_bitmap (Lisp_Object); 3235int lookup_fringe_bitmap (Lisp_Object);
3236void draw_fringe_bitmap (struct window *, struct glyph_row *, int); 3236void draw_fringe_bitmap (struct window *, struct glyph_row *, int);
3237void draw_row_fringe_bitmaps (struct window *, struct glyph_row *); 3237void draw_row_fringe_bitmaps (struct window *, struct glyph_row *);
3238int draw_window_fringes (struct window *, int); 3238bool draw_window_fringes (struct window *, bool);
3239int update_window_fringes (struct window *, int); 3239bool update_window_fringes (struct window *, bool);
3240void compute_fringe_widths (struct frame *, int); 3240void compute_fringe_widths (struct frame *, bool);
3241 3241
3242#ifdef HAVE_NTGUI 3242#ifdef HAVE_NTGUI
3243void w32_init_fringe (struct redisplay_interface *); 3243void w32_init_fringe (struct redisplay_interface *);
diff --git a/src/fringe.c b/src/fringe.c
index f728cd6d5ff..1d05244e64e 100644
--- a/src/fringe.c
+++ b/src/fringe.c
@@ -890,31 +890,32 @@ draw_row_fringe_bitmaps (struct window *w, struct glyph_row *row)
890/* Draw the fringes of window W. Only fringes for rows marked for 890/* Draw the fringes of window W. Only fringes for rows marked for
891 update in redraw_fringe_bitmaps_p are drawn. 891 update in redraw_fringe_bitmaps_p are drawn.
892 892
893 Return >0 if left or right fringe was redrawn in any way. 893 Return nonzero if left or right fringe was redrawn in any way.
894 894
895 If NO_FRINGE is non-zero, also return >0 if either fringe has zero width. 895 If NO_FRINGE_P is non-zero, also return nonzero if either fringe
896 has zero width.
896 897
897 A return value >0 indicates that the vertical line between windows 898 A return nonzero value indicates that the vertical line between
898 needs update (as it may be drawn in the fringe). 899 windows needs update (as it may be drawn in the fringe).
899*/ 900*/
900 901
901int 902bool
902draw_window_fringes (struct window *w, int no_fringe) 903draw_window_fringes (struct window *w, bool no_fringe_p)
903{ 904{
904 struct glyph_row *row; 905 struct glyph_row *row;
905 int yb = window_text_bottom_y (w); 906 int yb = window_text_bottom_y (w);
906 int nrows = w->current_matrix->nrows; 907 int nrows = w->current_matrix->nrows;
907 int y, rn; 908 int y, rn;
908 int updated = 0; 909 bool updated_p = 0;
909 910
910 if (w->pseudo_window_p) 911 if (w->pseudo_window_p)
911 return 0; 912 return updated_p;
912 913
913 /* Must draw line if no fringe */ 914 /* Must draw line if no fringe */
914 if (no_fringe 915 if (no_fringe_p
915 && (WINDOW_LEFT_FRINGE_WIDTH (w) == 0 916 && (WINDOW_LEFT_FRINGE_WIDTH (w) == 0
916 || WINDOW_RIGHT_FRINGE_WIDTH (w) == 0)) 917 || WINDOW_RIGHT_FRINGE_WIDTH (w) == 0))
917 updated++; 918 updated_p = 1;
918 919
919 for (y = w->vscroll, rn = 0, row = w->current_matrix->rows; 920 for (y = w->vscroll, rn = 0, row = w->current_matrix->rows;
920 y < yb && rn < nrows; 921 y < yb && rn < nrows;
@@ -924,10 +925,10 @@ draw_window_fringes (struct window *w, int no_fringe)
924 continue; 925 continue;
925 draw_row_fringe_bitmaps (w, row); 926 draw_row_fringe_bitmaps (w, row);
926 row->redraw_fringe_bitmaps_p = 0; 927 row->redraw_fringe_bitmaps_p = 0;
927 updated++; 928 updated_p = 1;
928 } 929 }
929 930
930 return updated; 931 return updated_p;
931} 932}
932 933
933 934
@@ -936,14 +937,14 @@ draw_window_fringes (struct window *w, int no_fringe)
936 937
937 If KEEP_CURRENT_P is 0, update current_matrix too. */ 938 If KEEP_CURRENT_P is 0, update current_matrix too. */
938 939
939int 940bool
940update_window_fringes (struct window *w, int keep_current_p) 941update_window_fringes (struct window *w, bool keep_current_p)
941{ 942{
942 struct glyph_row *row, *cur = 0; 943 struct glyph_row *row, *cur = 0;
943 int yb = window_text_bottom_y (w); 944 int yb = window_text_bottom_y (w);
944 int rn, nrows = w->current_matrix->nrows; 945 int rn, nrows = w->current_matrix->nrows;
945 int y; 946 int y;
946 int redraw_p = 0; 947 bool redraw_p = 0;
947 Lisp_Object boundary_top = Qnil, boundary_bot = Qnil; 948 Lisp_Object boundary_top = Qnil, boundary_bot = Qnil;
948 Lisp_Object arrow_top = Qnil, arrow_bot = Qnil; 949 Lisp_Object arrow_top = Qnil, arrow_bot = Qnil;
949 Lisp_Object empty_pos; 950 Lisp_Object empty_pos;
@@ -1169,7 +1170,7 @@ update_window_fringes (struct window *w, int keep_current_p)
1169 int left, right; 1170 int left, right;
1170 unsigned left_face_id, right_face_id; 1171 unsigned left_face_id, right_face_id;
1171 int left_offset, right_offset; 1172 int left_offset, right_offset;
1172 int periodic_p; 1173 bool periodic_p;
1173 1174
1174 row = w->desired_matrix->rows + rn; 1175 row = w->desired_matrix->rows + rn;
1175 cur = w->current_matrix->rows + rn; 1176 cur = w->current_matrix->rows + rn;
@@ -1285,7 +1286,7 @@ update_window_fringes (struct window *w, int keep_current_p)
1285 || periodic_p != cur->fringe_bitmap_periodic_p 1286 || periodic_p != cur->fringe_bitmap_periodic_p
1286 || cur->redraw_fringe_bitmaps_p) 1287 || cur->redraw_fringe_bitmaps_p)
1287 { 1288 {
1288 redraw_p = row->redraw_fringe_bitmaps_p = 1; 1289 redraw_p = 1, row->redraw_fringe_bitmaps_p = 1;
1289 if (!keep_current_p) 1290 if (!keep_current_p)
1290 { 1291 {
1291 cur->redraw_fringe_bitmaps_p = 1; 1292 cur->redraw_fringe_bitmaps_p = 1;
@@ -1304,7 +1305,7 @@ update_window_fringes (struct window *w, int keep_current_p)
1304 1305
1305 if (row->overlay_arrow_bitmap != cur->overlay_arrow_bitmap) 1306 if (row->overlay_arrow_bitmap != cur->overlay_arrow_bitmap)
1306 { 1307 {
1307 redraw_p = row->redraw_fringe_bitmaps_p = 1; 1308 redraw_p = 1, row->redraw_fringe_bitmaps_p = 1;
1308 if (!keep_current_p) 1309 if (!keep_current_p)
1309 { 1310 {
1310 cur->redraw_fringe_bitmaps_p = 1; 1311 cur->redraw_fringe_bitmaps_p = 1;
@@ -1339,7 +1340,7 @@ update_window_fringes (struct window *w, int keep_current_p)
1339*/ 1340*/
1340 1341
1341void 1342void
1342compute_fringe_widths (struct frame *f, int redraw) 1343compute_fringe_widths (struct frame *f, bool redraw_p)
1343{ 1344{
1344 int o_left = FRAME_LEFT_FRINGE_WIDTH (f); 1345 int o_left = FRAME_LEFT_FRINGE_WIDTH (f);
1345 int o_right = FRAME_RIGHT_FRINGE_WIDTH (f); 1346 int o_right = FRAME_RIGHT_FRINGE_WIDTH (f);
@@ -1410,7 +1411,7 @@ compute_fringe_widths (struct frame *f, int redraw)
1410 FRAME_FRINGE_COLS (f) = 0; 1411 FRAME_FRINGE_COLS (f) = 0;
1411 } 1412 }
1412 1413
1413 if (redraw && FRAME_VISIBLE_P (f)) 1414 if (redraw_p && FRAME_VISIBLE_P (f))
1414 if (o_left != FRAME_LEFT_FRINGE_WIDTH (f) || 1415 if (o_left != FRAME_LEFT_FRINGE_WIDTH (f) ||
1415 o_right != FRAME_RIGHT_FRINGE_WIDTH (f) || 1416 o_right != FRAME_RIGHT_FRINGE_WIDTH (f) ||
1416 o_cols != FRAME_FRINGE_COLS (f)) 1417 o_cols != FRAME_FRINGE_COLS (f))
diff --git a/src/w32term.c b/src/w32term.c
index a596a487f3d..b97632dabca 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -2360,7 +2360,7 @@ x_draw_stretch_glyph_string (struct glyph_string *s)
2360static void 2360static void
2361x_draw_glyph_string (struct glyph_string *s) 2361x_draw_glyph_string (struct glyph_string *s)
2362{ 2362{
2363 int relief_drawn_p = 0; 2363 bool relief_drawn_p = 0;
2364 2364
2365 /* If S draws into the background of its successor, draw the 2365 /* If S draws into the background of its successor, draw the
2366 background of the successor first so that S can draw into it. 2366 background of the successor first so that S can draw into it.
@@ -4629,7 +4629,7 @@ w32_read_socket (struct terminal *terminal,
4629 { 4629 {
4630 /* If we decide we want to generate an event to be seen 4630 /* If we decide we want to generate an event to be seen
4631 by the rest of Emacs, we put it here. */ 4631 by the rest of Emacs, we put it here. */
4632 int tool_bar_p = 0; 4632 bool tool_bar_p = 0;
4633 int button; 4633 int button;
4634 int up; 4634 int up;
4635 4635
diff --git a/src/window.c b/src/window.c
index 2ff149ed4fa..6fd6849c6c3 100644
--- a/src/window.c
+++ b/src/window.c
@@ -72,8 +72,6 @@ static void window_scroll_line_based (Lisp_Object, int, int, int);
72static int freeze_window_start (struct window *, void *); 72static int freeze_window_start (struct window *, void *);
73static Lisp_Object window_list (void); 73static Lisp_Object window_list (void);
74static int add_window_to_list (struct window *, void *); 74static int add_window_to_list (struct window *, void *);
75static int candidate_window_p (Lisp_Object, Lisp_Object, Lisp_Object,
76 Lisp_Object);
77static Lisp_Object next_window (Lisp_Object, Lisp_Object, 75static Lisp_Object next_window (Lisp_Object, Lisp_Object,
78 Lisp_Object, int); 76 Lisp_Object, int);
79static void decode_next_window_args (Lisp_Object *, Lisp_Object *, 77static void decode_next_window_args (Lisp_Object *, Lisp_Object *,
@@ -2213,12 +2211,13 @@ window_list (void)
2213 a window means search the frame that window belongs to, 2211 a window means search the frame that window belongs to,
2214 a frame means consider windows on that frame, only. */ 2212 a frame means consider windows on that frame, only. */
2215 2213
2216static int 2214static bool
2217candidate_window_p (Lisp_Object window, Lisp_Object owindow, Lisp_Object minibuf, Lisp_Object all_frames) 2215candidate_window_p (Lisp_Object window, Lisp_Object owindow,
2216 Lisp_Object minibuf, Lisp_Object all_frames)
2218{ 2217{
2219 struct window *w = XWINDOW (window); 2218 struct window *w = XWINDOW (window);
2220 struct frame *f = XFRAME (w->frame); 2219 struct frame *f = XFRAME (w->frame);
2221 int candidate_p = 1; 2220 bool candidate_p = 1;
2222 2221
2223 if (!BUFFERP (w->contents)) 2222 if (!BUFFERP (w->contents))
2224 candidate_p = 0; 2223 candidate_p = 0;
@@ -5172,7 +5171,7 @@ and redisplay normally--don't erase and redraw the frame. */)
5172 struct window *w = XWINDOW (selected_window); 5171 struct window *w = XWINDOW (selected_window);
5173 struct buffer *buf = XBUFFER (w->contents); 5172 struct buffer *buf = XBUFFER (w->contents);
5174 struct buffer *obuf = current_buffer; 5173 struct buffer *obuf = current_buffer;
5175 int center_p = 0; 5174 bool center_p = 0;
5176 ptrdiff_t charpos, bytepos; 5175 ptrdiff_t charpos, bytepos;
5177 EMACS_INT iarg IF_LINT (= 0); 5176 EMACS_INT iarg IF_LINT (= 0);
5178 int this_scroll_margin; 5177 int this_scroll_margin;
diff --git a/src/xfaces.c b/src/xfaces.c
index f647ff2e209..7bf05fc85cd 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -448,8 +448,8 @@ static struct face *realize_non_ascii_face (struct frame *, Lisp_Object,
448 struct face *); 448 struct face *);
449static struct face *realize_x_face (struct face_cache *, Lisp_Object *); 449static struct face *realize_x_face (struct face_cache *, Lisp_Object *);
450static struct face *realize_tty_face (struct face_cache *, Lisp_Object *); 450static struct face *realize_tty_face (struct face_cache *, Lisp_Object *);
451static int realize_basic_faces (struct frame *); 451static bool realize_basic_faces (struct frame *);
452static int realize_default_face (struct frame *); 452static bool realize_default_face (struct frame *);
453static void realize_named_face (struct frame *, Lisp_Object, int); 453static void realize_named_face (struct frame *, Lisp_Object, int);
454static struct face_cache *make_face_cache (struct frame *); 454static struct face_cache *make_face_cache (struct frame *);
455static void clear_face_gcs (struct face_cache *); 455static void clear_face_gcs (struct face_cache *);
@@ -819,7 +819,7 @@ the pixmap. Bits are stored row by row, each row occupies
819\(WIDTH + 7)/8 bytes. */) 819\(WIDTH + 7)/8 bytes. */)
820 (Lisp_Object object) 820 (Lisp_Object object)
821{ 821{
822 int pixmap_p = 0; 822 bool pixmap_p = 0;
823 823
824 if (STRINGP (object)) 824 if (STRINGP (object))
825 /* If OBJECT is a string, it's a file name. */ 825 /* If OBJECT is a string, it's a file name. */
@@ -2854,7 +2854,7 @@ FRAME 0 means change the face on all frames, and change the default
2854 } 2854 }
2855 else if (EQ (attr, QCunderline)) 2855 else if (EQ (attr, QCunderline))
2856 { 2856 {
2857 int valid_p = 0; 2857 bool valid_p = 0;
2858 2858
2859 if (UNSPECIFIEDP (value) || IGNORE_DEFFACE_P (value)) 2859 if (UNSPECIFIEDP (value) || IGNORE_DEFFACE_P (value))
2860 valid_p = 1; 2860 valid_p = 1;
@@ -2941,7 +2941,7 @@ FRAME 0 means change the face on all frames, and change the default
2941 } 2941 }
2942 else if (EQ (attr, QCbox)) 2942 else if (EQ (attr, QCbox))
2943 { 2943 {
2944 int valid_p; 2944 bool valid_p;
2945 2945
2946 /* Allow t meaning a simple box of width 1 in foreground color 2946 /* Allow t meaning a simple box of width 1 in foreground color
2947 of the face. */ 2947 of the face. */
@@ -3510,7 +3510,7 @@ x_update_menu_appearance (struct frame *f)
3510 Lisp_Object lface = lface_from_face_name (f, Qmenu, 1); 3510 Lisp_Object lface = lface_from_face_name (f, Qmenu, 1);
3511 struct face *face = FACE_FROM_ID (f, MENU_FACE_ID); 3511 struct face *face = FACE_FROM_ID (f, MENU_FACE_ID);
3512 const char *myname = SSDATA (Vx_resource_name); 3512 const char *myname = SSDATA (Vx_resource_name);
3513 int changed_p = 0; 3513 bool changed_p = 0;
3514#ifdef USE_MOTIF 3514#ifdef USE_MOTIF
3515 const char *popup_path = "popup_menu"; 3515 const char *popup_path = "popup_menu";
3516#else 3516#else
@@ -3858,7 +3858,7 @@ return the font name used for CHARACTER. */)
3858 all attributes are `equal'. Tries to be fast because this function 3858 all attributes are `equal'. Tries to be fast because this function
3859 is called quite often. */ 3859 is called quite often. */
3860 3860
3861static int 3861static bool
3862face_attr_equal_p (Lisp_Object v1, Lisp_Object v2) 3862face_attr_equal_p (Lisp_Object v1, Lisp_Object v2)
3863{ 3863{
3864 /* Type can differ, e.g. when one attribute is unspecified, i.e. nil, 3864 /* Type can differ, e.g. when one attribute is unspecified, i.e. nil,
@@ -3891,10 +3891,11 @@ face_attr_equal_p (Lisp_Object v1, Lisp_Object v2)
3891 all attributes are `equal'. Tries to be fast because this function 3891 all attributes are `equal'. Tries to be fast because this function
3892 is called quite often. */ 3892 is called quite often. */
3893 3893
3894static int 3894static bool
3895lface_equal_p (Lisp_Object *v1, Lisp_Object *v2) 3895lface_equal_p (Lisp_Object *v1, Lisp_Object *v2)
3896{ 3896{
3897 int i, equal_p = 1; 3897 int i;
3898 bool equal_p = 1;
3898 3899
3899 for (i = 1; i < LFACE_VECTOR_SIZE && equal_p; ++i) 3900 for (i = 1; i < LFACE_VECTOR_SIZE && equal_p; ++i)
3900 equal_p = face_attr_equal_p (v1[i], v2[i]); 3901 equal_p = face_attr_equal_p (v1[i], v2[i]);
@@ -5201,10 +5202,10 @@ face_fontset (Lisp_Object attrs[LFACE_VECTOR_SIZE])
5201 of F don't contain enough information needed to realize the default 5202 of F don't contain enough information needed to realize the default
5202 face. */ 5203 face. */
5203 5204
5204static int 5205static bool
5205realize_basic_faces (struct frame *f) 5206realize_basic_faces (struct frame *f)
5206{ 5207{
5207 int success_p = 0; 5208 bool success_p = 0;
5208 ptrdiff_t count = SPECPDL_INDEX (); 5209 ptrdiff_t count = SPECPDL_INDEX ();
5209 5210
5210 /* Block input here so that we won't be surprised by an X expose 5211 /* Block input here so that we won't be surprised by an X expose
@@ -5249,7 +5250,7 @@ realize_basic_faces (struct frame *f)
5249 specified, make it fully-specified. Attributes of the default face 5250 specified, make it fully-specified. Attributes of the default face
5250 that are not explicitly specified are taken from frame parameters. */ 5251 that are not explicitly specified are taken from frame parameters. */
5251 5252
5252static int 5253static bool
5253realize_default_face (struct frame *f) 5254realize_default_face (struct frame *f)
5254{ 5255{
5255 struct face_cache *c = FRAME_FACE_CACHE (f); 5256 struct face_cache *c = FRAME_FACE_CACHE (f);
diff --git a/src/xfns.c b/src/xfns.c
index a3eff1a5cce..a4492a10fdb 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -942,7 +942,7 @@ static void
942x_set_cursor_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) 942x_set_cursor_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
943{ 943{
944 unsigned long fore_pixel, pixel; 944 unsigned long fore_pixel, pixel;
945 int fore_pixel_allocated_p = 0, pixel_allocated_p = 0; 945 bool fore_pixel_allocated_p = 0, pixel_allocated_p = 0;
946 struct x_output *x = f->output_data.x; 946 struct x_output *x = f->output_data.x;
947 947
948 if (!NILP (Vx_cursor_fore_pixel)) 948 if (!NILP (Vx_cursor_fore_pixel))
@@ -2066,7 +2066,7 @@ void
2066xic_free_xfontset (struct frame *f) 2066xic_free_xfontset (struct frame *f)
2067{ 2067{
2068 Lisp_Object rest, frame; 2068 Lisp_Object rest, frame;
2069 int shared_p = 0; 2069 bool shared_p = 0;
2070 2070
2071 if (!FRAME_XIC_FONTSET (f)) 2071 if (!FRAME_XIC_FONTSET (f))
2072 return; 2072 return;
diff --git a/src/xmenu.c b/src/xmenu.c
index 6c0e3dd78a6..5cc37842da9 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -493,7 +493,7 @@ If FRAME is nil or not given, use the selected frame. */)
493 if (menubar) 493 if (menubar)
494 { 494 {
495 Window child; 495 Window child;
496 int error_p = 0; 496 bool error_p = 0;
497 497
498 x_catch_errors (FRAME_X_DISPLAY (f)); 498 x_catch_errors (FRAME_X_DISPLAY (f));
499 memset (&ev, 0, sizeof ev); 499 memset (&ev, 0, sizeof ev);
diff --git a/src/xselect.c b/src/xselect.c
index 6a80eddc82c..d9f7d9c29c7 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -654,7 +654,7 @@ x_reply_selection_request (struct input_event *event,
654 if (cs->wait_object) 654 if (cs->wait_object)
655 { 655 {
656 int format_bytes = cs->format / 8; 656 int format_bytes = cs->format / 8;
657 int had_errors = x_had_errors_p (display); 657 bool had_errors_p = x_had_errors_p (display);
658 unblock_input (); 658 unblock_input ();
659 659
660 bytes_remaining = cs->size; 660 bytes_remaining = cs->size;
@@ -662,7 +662,7 @@ x_reply_selection_request (struct input_event *event,
662 662
663 /* Wait for the requestor to ack by deleting the property. 663 /* Wait for the requestor to ack by deleting the property.
664 This can run Lisp code (process handlers) or signal. */ 664 This can run Lisp code (process handlers) or signal. */
665 if (! had_errors) 665 if (! had_errors_p)
666 { 666 {
667 TRACE1 ("Waiting for ACK (deletion of %s)", 667 TRACE1 ("Waiting for ACK (deletion of %s)",
668 XGetAtomName (display, cs->property)); 668 XGetAtomName (display, cs->property));
@@ -694,10 +694,10 @@ x_reply_selection_request (struct input_event *event,
694 cs->data += i * ((cs->format == 32) ? sizeof (long) 694 cs->data += i * ((cs->format == 32) ? sizeof (long)
695 : format_bytes); 695 : format_bytes);
696 XFlush (display); 696 XFlush (display);
697 had_errors = x_had_errors_p (display); 697 had_errors_p = x_had_errors_p (display);
698 unblock_input (); 698 unblock_input ();
699 699
700 if (had_errors) break; 700 if (had_errors_p) break;
701 701
702 /* Wait for the requestor to ack this chunk by deleting 702 /* Wait for the requestor to ack this chunk by deleting
703 the property. This can run Lisp code or signal. */ 703 the property. This can run Lisp code or signal. */
@@ -2427,17 +2427,17 @@ If the value is 0 or the atom is not known, return the empty string. */)
2427 Lisp_Object ret = Qnil; 2427 Lisp_Object ret = Qnil;
2428 Display *dpy = FRAME_X_DISPLAY (f); 2428 Display *dpy = FRAME_X_DISPLAY (f);
2429 Atom atom; 2429 Atom atom;
2430 int had_errors; 2430 bool had_errors_p;
2431 2431
2432 CONS_TO_INTEGER (value, Atom, atom); 2432 CONS_TO_INTEGER (value, Atom, atom);
2433 2433
2434 block_input (); 2434 block_input ();
2435 x_catch_errors (dpy); 2435 x_catch_errors (dpy);
2436 name = atom ? XGetAtomName (dpy, atom) : empty; 2436 name = atom ? XGetAtomName (dpy, atom) : empty;
2437 had_errors = x_had_errors_p (dpy); 2437 had_errors_p = x_had_errors_p (dpy);
2438 x_uncatch_errors (); 2438 x_uncatch_errors ();
2439 2439
2440 if (!had_errors) 2440 if (!had_errors_p)
2441 ret = build_string (name); 2441 ret = build_string (name);
2442 2442
2443 if (atom && name) XFree (name); 2443 if (atom && name) XFree (name);
diff --git a/src/xsettings.c b/src/xsettings.c
index 45f8435d9f4..b5d5f4db59b 100644
--- a/src/xsettings.c
+++ b/src/xsettings.c
@@ -756,8 +756,7 @@ read_and_apply_settings (struct x_display_info *dpyinfo, int send_event_p)
756void 756void
757xft_settings_event (struct x_display_info *dpyinfo, XEvent *event) 757xft_settings_event (struct x_display_info *dpyinfo, XEvent *event)
758{ 758{
759 int check_window_p = 0; 759 bool check_window_p = 0, apply_settings_p = 0;
760 int apply_settings = 0;
761 760
762 switch (event->type) 761 switch (event->type)
763 { 762 {
@@ -777,7 +776,7 @@ xft_settings_event (struct x_display_info *dpyinfo, XEvent *event)
777 if (event->xproperty.window == dpyinfo->xsettings_window 776 if (event->xproperty.window == dpyinfo->xsettings_window
778 && event->xproperty.state == PropertyNewValue 777 && event->xproperty.state == PropertyNewValue
779 && event->xproperty.atom == dpyinfo->Xatom_xsettings_prop) 778 && event->xproperty.atom == dpyinfo->Xatom_xsettings_prop)
780 apply_settings = 1; 779 apply_settings_p = 1;
781 break; 780 break;
782 } 781 }
783 782
@@ -787,10 +786,10 @@ xft_settings_event (struct x_display_info *dpyinfo, XEvent *event)
787 dpyinfo->xsettings_window = None; 786 dpyinfo->xsettings_window = None;
788 get_prop_window (dpyinfo); 787 get_prop_window (dpyinfo);
789 if (dpyinfo->xsettings_window != None) 788 if (dpyinfo->xsettings_window != None)
790 apply_settings = 1; 789 apply_settings_p = 1;
791 } 790 }
792 791
793 if (apply_settings) 792 if (apply_settings_p)
794 read_and_apply_settings (dpyinfo, True); 793 read_and_apply_settings (dpyinfo, True);
795} 794}
796 795
diff --git a/src/xterm.c b/src/xterm.c
index b3534871da9..a2306935e4e 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -2691,7 +2691,7 @@ x_draw_underwave (struct glyph_string *s)
2691static void 2691static void
2692x_draw_glyph_string (struct glyph_string *s) 2692x_draw_glyph_string (struct glyph_string *s)
2693{ 2693{
2694 int relief_drawn_p = 0; 2694 bool relief_drawn_p = 0;
2695 2695
2696 /* If S draws into the background of its successors, draw the 2696 /* If S draws into the background of its successors, draw the
2697 background of the successors first so that S can draw into it. 2697 background of the successors first so that S can draw into it.
@@ -6854,7 +6854,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr,
6854 { 6854 {
6855 /* If we decide we want to generate an event to be seen 6855 /* If we decide we want to generate an event to be seen
6856 by the rest of Emacs, we put it here. */ 6856 by the rest of Emacs, we put it here. */
6857 int tool_bar_p = 0; 6857 bool tool_bar_p = 0;
6858 6858
6859 memset (&compose_status, 0, sizeof (compose_status)); 6859 memset (&compose_status, 0, sizeof (compose_status));
6860 last_mouse_glyph_frame = 0; 6860 last_mouse_glyph_frame = 0;
@@ -7663,7 +7663,7 @@ x_check_errors (Display *dpy, const char *format)
7663/* Nonzero if we had any X protocol errors 7663/* Nonzero if we had any X protocol errors
7664 since we did x_catch_errors on DPY. */ 7664 since we did x_catch_errors on DPY. */
7665 7665
7666int 7666bool
7667x_had_errors_p (Display *dpy) 7667x_had_errors_p (Display *dpy)
7668{ 7668{
7669 /* Make sure to catch any errors incurred so far. */ 7669 /* Make sure to catch any errors incurred so far. */
diff --git a/src/xterm.h b/src/xterm.h
index 5415a77cf58..6bdc708220b 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -947,7 +947,7 @@ extern int x_text_icon (struct frame *, const char *);
947extern void x_catch_errors (Display *); 947extern void x_catch_errors (Display *);
948extern void x_check_errors (Display *, const char *) 948extern void x_check_errors (Display *, const char *)
949 ATTRIBUTE_FORMAT_PRINTF (2, 0); 949 ATTRIBUTE_FORMAT_PRINTF (2, 0);
950extern int x_had_errors_p (Display *); 950extern bool x_had_errors_p (Display *);
951extern void x_uncatch_errors (void); 951extern void x_uncatch_errors (void);
952extern void x_clear_errors (Display *); 952extern void x_clear_errors (Display *);
953extern void x_set_window_size (struct frame *, int, int, int); 953extern void x_set_window_size (struct frame *, int, int, int);