aboutsummaryrefslogtreecommitdiffstats
path: root/src/xfaces.c
diff options
context:
space:
mode:
authorDmitry Antipov2013-07-30 09:56:18 +0400
committerDmitry Antipov2013-07-30 09:56:18 +0400
commitd7e6881a2ec341affe3a89b26cf2da6919772214 (patch)
treed11a0e72bf7e9efde22a622ee76e2666d7e92a9b /src/xfaces.c
parentec3058af9654df71cce93629f3eab32dcbb6b946 (diff)
downloademacs-d7e6881a2ec341affe3a89b26cf2da6919772214.tar.gz
emacs-d7e6881a2ec341affe3a89b26cf2da6919772214.zip
* fringe.c (draw_window_fringes, update_window_fringes)
(compute_fringe_widths): * w32term.c (x_draw_glyph_string): * window.c (candidate_window_p, Frecenter): * xfaces.c (realize_basic_faces, realize_default_face) (Fbitmap_space_p, Finternal_set_lisp_face_attribute) (x_update_menu_appearance, face_attr_equal_p, lface_equal_p): * xfns.c (x_set_cursor_color, xic_free_xfontset): * xmenu.c (Fx_menu_bar_open_internal): * xselect.c (x_reply_selection_request, Fx_get_atom_name): * xsettings.c (xft_settings_event): * xterm.c (x_draw_glyph_string, x_had_errors_p): Use bool for booleans. Adjust style and comments where appropriate. * dispextern.h (draw_window_fringes, update_window_fringes) (compute_fringe_widths): * xterm.h (x_had_errors_p): Adjust prototype.
Diffstat (limited to 'src/xfaces.c')
-rw-r--r--src/xfaces.c25
1 files changed, 13 insertions, 12 deletions
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);