aboutsummaryrefslogtreecommitdiffstats
path: root/src/dispextern.h
diff options
context:
space:
mode:
authorPaul Eggert2013-12-14 13:36:44 -0800
committerPaul Eggert2013-12-14 13:36:44 -0800
commit96c0686368d8b7d481cb40239db896ff37df416a (patch)
tree84d8ee02271476dd4aaaee52c5302f2c576089ef /src/dispextern.h
parent5ae811ddef14ea1989088c259a9ed2d14d5332b4 (diff)
downloademacs-96c0686368d8b7d481cb40239db896ff37df416a.tar.gz
emacs-96c0686368d8b7d481cb40239db896ff37df416a.zip
Use bool for boolean, focusing on headers.
* configure.ac (PTY_OPEN, GC_MARK_SECONDARY_STACK): Use bool for boolean. * lib-src/emacsclient.c, lib-src/etags.c, lib-src/hexl.c (FALSE, TRUE): Remove. All uses replaced with uncapitalized version. * lib-src/emacsclient.c (message): * lib-src/etags.c (make_tag, pfnote, consider_token, make_C_tag, lang_names): * lib-src/hexl.c (un_flag, iso_flag, endian): * lib-src/pop.c (pop_debug, pop_open, pop_multi_first, pop_multi_next) (pop_trash): Use bool for boolean. * lib-src/etags.c (bool): Remove. * lib-src/etags.c (globals, members, declarations, no_line_directive) (no_duplicates): Use 'int' for boolean values that getopt requires to be 'int'. Formerly, these were 'bool' and 'bool' was 'int', but we can no longer rely on this implementation. * lib-src/pop.h (struct _popserver): Use bool_bf for boolean bit-fields. * lwlib/xlwmenuP.h (XlwMenu_part): Use bool_bf for boolean bit-fields. * src/atimer.h, src/lisp.h, src/syssignal.h, src/syswait.h, src/unexelf.c: No need to include <stdbool.h>, since conf_post.h does it now. * src/buffer.h (BUF_COMPUTE_UNCHANGED, DECODE_POSITION) (BUFFER_CHECK_INDIRECTION, GET_OVERLAYS_AT, PER_BUFFER_VALUE_P) (SET_PER_BUFFER_VALUE_P): * src/ccl.c, src/ccl.h (setup_ccl_program): * src/ccl.h (CHECK_CCL_PROGRAM): * src/character.h (MAKE_CHAR_UNIBYTE, CHECK_CHARACTER_CAR) (CHECK_CHARACTER_CDR, CHAR_STRING_ADVANCE, NEXT_CHAR_BOUNDARY) (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE) (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE) (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, FETCH_CHAR_ADVANCE) (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, INC_BOTH) (DEC_BOTH, BUF_INC_POS, BUF_DEC_POS): * src/charset.h (CHECK_CHARSET, CHECK_CHARSET_GET_ID) (CHECK_CHARSET_GET_ATTR, CHECK_CHARSET_GET_CHARSET) (CHARSET_FAST_MAP_SET): * src/coding.c (decode_coding_ccl, encode_coding_ccl): * src/coding.h (CHECK_CODING_SYSTEM, CHECK_CODING_SYSTEM_GET_SPEC) (CHECK_CODING_SYSTEM_GET_ID, SJIS_TO_JIS, SJIS_TO_JIS2) (JIS_TO_SJIS, JIS_TO_SJIS2, ENCODE_FILE, DECODE_FILE) (ENCODE_SYSTEM, DECODE_SYSTEM, ENCODE_UTF_8) (decode_coding_c_string): * src/composite.h (COMPOSITION_DECODE_REFS, COMPOSITION_DECODE_RULE): * src/conf_post.h (has_attribute): * src/dispextern.h (trace_redisplay_p): (INC_TEXT_POS, DEC_TEXT_POS, SET_GLYPH_FROM_GLYPH_CODE) (SET_CHAR_GLYPH, SET_CHAR_GLYPH_FROM_GLYPH) (SET_GLYPH_FROM_CHAR_GLYPH): (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P) (FACE_SUITABLE_FOR_ASCII_CHAR_P, FACE_SUITABLE_FOR_CHAR_P) (PRODUCE_GLYPHS, reset_mouse_highlight, in_display_vector_p) (cursor_in_mouse_face_p): * src/dispnew.c (adjust_glyph_matrix, clear_glyph_matrix_rows) (blank_row, prepare_desired_row) (build_frame_matrix_from_leaf_window, make_current) (mirror_make_current, mirrored_line_dance, mirror_line_dance) (update_window, scrolling_window, update_frame_line): * src/disptab.h (GLYPH_FOLLOW_ALIASES): * src/editfns.c (Fformat): * src/font.h (FONT_WEIGHT_SYMBOLIC, FONT_SLANT_SYMBOLIC) (FONT_WIDTH_SYMBOLIC, FONT_WEIGHT_FOR_FACE, FONT_SLANT_FOR_FACE) (FONT_WIDTH_FOR_FACE, FONT_WEIGHT_NAME_NUMERIC) (FONT_SLANT_NAME_NUMERIC, FONT_WIDTH_NAME_NUMERIC) (FONT_SET_STYLE, CHECK_FONT, CHECK_FONT_SPEC, CHECK_FONT_ENTITY) (CHECK_FONT_OBJECT, CHECK_FONT_GET_OBJECT, FONT_ADD_LOG) (FONT_DEFERRED_LOG): * src/frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_WINDOW_P): (FRAME_EXTERNAL_TOOL_BAR, FRAME_EXTERNAL_MENU_BAR, FOR_EACH_FRAME) (FRAME_MOUSE_UPDATE): * src/fringe.c (Fdefine_fringe_bitmap): * src/image.c (x_create_bitmap_from_data, x_create_bitmap_mask) (x_create_bitmap_from_xpm_data, xpm_load_image): * src/intervals.h (INTERVAL_HAS_PARENT, INTERVAL_PARENT) (set_interval_parent, RESET_INTERVAL, COPY_INTERVAL_CACHE) (MERGE_INTERVAL_CACHE): * src/keymap.h (KEYMAPP): * src/lisp.h (eassert, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE) (STRING_SET_UNIBYTE, STRING_SET_MULTIBYTE, DEFSYM, PSEUDOVECTORP) (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER) (CHECK_NUMBER_COERCE_MARKER, CHECK_NUMBER_OR_FLOAT_COERCE_MARKER) (DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT) (DEFVAR_BUFFER_DEFAULTS, DEFVAR_KBOARD, QUIT) (RETURN_UNGCPRO, USE_SAFE_ALLOCA, SAFE_NALLOCA, SAFE_FREE) (SAFE_ALLOCA_LISP, FOR_EACH_ALIST_VALUE, functionp): * src/syntax.h (SYNTAX_ENTRY, SYNTAX_WITH_FLAGS, SYNTAX) (UPDATE_SYNTAX_TABLE_FORWARD, UPDATE_SYNTAX_TABLE_BACKWARD) (SETUP_BUFFER_SYNTAX_TABLE): * src/systime.h (timespec_valid_p): * src/term.c (save_and_enable_current_matrix): * src/window.h (WINDOW_MENU_BAR_P, WINDOW_TOOL_BAR_P): * src/xdisp.c (in_display_vector_p, display_tool_bar_line) (redisplay_internal, try_window_reusing_current_matrix) (sync_frame_with_window_matrix_rows, try_window_id) (display_menu_bar, display_tty_menu_item, display_mode_line) (coords_in_mouse_face_p, cursor_in_mouse_face_p): * src/xmenu.c (xmenu_show): * src/xterm.c (use_xim, x_term_init): * src/xterm.h (XSync, GTK_CHECK_VERSION, use_xim, SET_SCROLL_BAR_X_WIDGET) (struct x_bitmap_record): Use bool for booleans. * src/ccl.c (struct buffer_text): * src/ccl.h (struct ccl_program): * src/charset.h (struct charset): * src/cm.h (struct cm): * src/coding.h (struct iso_2022_spec, struct coding_system): * src/dispextern.h (struct glyph, struct glyph_matrix, struct glyph_row) (struct glyph_string, struct face, struct face_cache) (struct bidi_string_data, struct bidi_it) (struct draw_fringe_bitmap_params, struct it, Mouse_HLInfo) (struct image): * src/editfns.c (Fformat): * src/frame.h (struct frame): * src/fringe.c (struct fringe_bitmap): * src/intervals.h (struct interval): * src/keyboard.h (struct kboard): * src/lisp.h (struct Lisp_Symbol, struct Lisp_Misc_Any, struct Lisp_Marker) (struct Lisp_Overlay, struct Lisp_Save_Value, struct Lisp_Free) (struct Lisp_Buffer_Local_Value, union specbinding): * src/macfont.m (struct macfont_info): * src/process.h (struct Lisp_Process): * src/termchar.h (struct tty_display_info): * src/window.h (struct window): * src/xterm.h (struct x_output): Use bool_bf for boolean bit-fields. * src/ccl.c (setup_ccl_program): Now returns bool instead of -1 or 0. All callers changed. * src/ccl.h (struct ccl_program): Remove unused members private_state, src_multibyte, dst_multibyte, cr_consumed, suppress_error, eight_bit_control. (struct ccl_spec): Remove unused members cr_carryover, eight_bit_carryover. * src/conf_post.h: Include <stdbool.h>. (bool_bf): New type. * src/dispextern.h (TRACE, PREPARE_FACE_FOR_DISPLAY): * src/interval.h (RESET_INTERVAL, COPY_INTERVAL_CACHE, MERGE_INTERVAL_CACHE) Surround statement macro with proper 'do { ... } while (false)' brackets. (SET_MATRIX_ROW_ENABLED_P): Assume 2nd arg is bool. (PRODUCE_GLYPHS): Simplify use of boolean. * src/fileio.c (Fcopy_file): If I is an integer, prefer 'if (I != 0)' to 'if (I)'. * src/lisp.h (UNGCPRO): Return void, not int. (FOR_EACH_TAIL): Use void expression, not int expression. * src/region-cache.c: Reindent. * src/region-cache.h: Copy comments from region-cache.c, to fix incorrect remarks about booleans.
Diffstat (limited to 'src/dispextern.h')
-rw-r--r--src/dispextern.h416
1 files changed, 205 insertions, 211 deletions
diff --git a/src/dispextern.h b/src/dispextern.h
index 97847e04686..ded11e58dfb 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -139,9 +139,9 @@ enum window_part
139/* Macros to include code only if GLYPH_DEBUG is defined. */ 139/* Macros to include code only if GLYPH_DEBUG is defined. */
140 140
141#ifdef GLYPH_DEBUG 141#ifdef GLYPH_DEBUG
142#define IF_DEBUG(X) X 142#define IF_DEBUG(X) (X)
143#else 143#else
144#define IF_DEBUG(X) (void) 0 144#define IF_DEBUG(X) ((void) 0)
145#endif 145#endif
146 146
147/* Macro for displaying traces of redisplay. If Emacs was compiled 147/* Macro for displaying traces of redisplay. If Emacs was compiled
@@ -150,18 +150,18 @@ enum window_part
150 150
151#ifdef GLYPH_DEBUG 151#ifdef GLYPH_DEBUG
152 152
153extern int trace_redisplay_p EXTERNALLY_VISIBLE; 153extern bool trace_redisplay_p EXTERNALLY_VISIBLE;
154#include <stdio.h> 154#include <stdio.h>
155 155
156#define TRACE(X) \ 156#define TRACE(X) \
157 do { \
157 if (trace_redisplay_p) \ 158 if (trace_redisplay_p) \
158 fprintf X; \ 159 fprintf X; \
159 else \ 160 } while (false)
160 (void) 0
161 161
162#else /* not GLYPH_DEBUG */ 162#else /* not GLYPH_DEBUG */
163 163
164#define TRACE(X) (void) 0 164#define TRACE(X) ((void) 0)
165 165
166#endif /* GLYPH_DEBUG */ 166#endif /* GLYPH_DEBUG */
167 167
@@ -205,7 +205,7 @@ struct text_pos
205 else \ 205 else \
206 ++(POS).bytepos; \ 206 ++(POS).bytepos; \
207 } \ 207 } \
208 while (0) 208 while (false)
209 209
210/* Decrement text position POS. */ 210/* Decrement text position POS. */
211 211
@@ -218,7 +218,7 @@ struct text_pos
218 else \ 218 else \
219 --(POS).bytepos; \ 219 --(POS).bytepos; \
220 } \ 220 } \
221 while (0) 221 while (false)
222 222
223/* Set text position POS from marker MARKER. */ 223/* Set text position POS from marker MARKER. */
224 224
@@ -323,7 +323,7 @@ GLYPH_CODE_FACE (Lisp_Object gc)
323 SET_GLYPH (glyph, (XINT (gc) & ((1 << CHARACTERBITS)-1)), \ 323 SET_GLYPH (glyph, (XINT (gc) & ((1 << CHARACTERBITS)-1)), \
324 (XINT (gc) >> CHARACTERBITS)); \ 324 (XINT (gc) >> CHARACTERBITS)); \
325 } \ 325 } \
326 while (0) 326 while (false)
327 327
328/* The ID of the mode line highlighting face. */ 328/* The ID of the mode line highlighting face. */
329enum { GLYPH_MODE_LINE_FACE = 1 }; 329enum { GLYPH_MODE_LINE_FACE = 1 };
@@ -408,41 +408,41 @@ struct glyph
408 should be an enumerator of type enum glyph_type. */ 408 should be an enumerator of type enum glyph_type. */
409 unsigned type : 3; 409 unsigned type : 3;
410 410
411 /* 1 means this glyph was produced from multibyte text. Zero 411 /* True means this glyph was produced from multibyte text. False
412 means it was produced from unibyte text, i.e. charsets aren't 412 means it was produced from unibyte text, i.e. charsets aren't
413 applicable, and encoding is not performed. */ 413 applicable, and encoding is not performed. */
414 unsigned multibyte_p : 1; 414 bool_bf multibyte_p : 1;
415 415
416 /* Non-zero means draw a box line at the left or right side of this 416 /* True means draw a box line at the left or right side of this
417 glyph. This is part of the implementation of the face attribute 417 glyph. This is part of the implementation of the face attribute
418 `:box'. */ 418 `:box'. */
419 unsigned left_box_line_p : 1; 419 bool_bf left_box_line_p : 1;
420 unsigned right_box_line_p : 1; 420 bool_bf right_box_line_p : 1;
421 421
422 /* Non-zero means this glyph's physical ascent or descent is greater 422 /* True means this glyph's physical ascent or descent is greater
423 than its logical ascent/descent, i.e. it may potentially overlap 423 than its logical ascent/descent, i.e. it may potentially overlap
424 glyphs above or below it. */ 424 glyphs above or below it. */
425 unsigned overlaps_vertically_p : 1; 425 bool_bf overlaps_vertically_p : 1;
426 426
427 /* For terminal frames, 1 means glyph is a padding glyph. Padding 427 /* For terminal frames, true means glyph is a padding glyph. Padding
428 glyphs are used for characters whose visual shape consists of 428 glyphs are used for characters whose visual shape consists of
429 more than one glyph (e.g. Asian characters). All but the first 429 more than one glyph (e.g. Asian characters). All but the first
430 glyph of such a glyph sequence have the padding_p flag set. This 430 glyph of such a glyph sequence have the padding_p flag set. This
431 flag is used only to minimize code changes. A better way would 431 flag is used only to minimize code changes. A better way would
432 probably be to use the width field of glyphs to express padding. 432 probably be to use the width field of glyphs to express padding.
433 433
434 For graphic frames, 1 means the pixel width of the glyph in a 434 For graphic frames, true means the pixel width of the glyph in a
435 font is 0, but 1-pixel is padded on displaying for correct cursor 435 font is 0, but 1-pixel is padded on displaying for correct cursor
436 displaying. The member `pixel_width' above is set to 1. */ 436 displaying. The member `pixel_width' above is set to 1. */
437 unsigned padding_p : 1; 437 bool_bf padding_p : 1;
438 438
439 /* 1 means the actual glyph is not available, draw using `struct 439 /* True means the actual glyph is not available, draw using `struct
440 glyphless' below instead. This can happen when a font couldn't 440 glyphless' below instead. This can happen when a font couldn't
441 be loaded, or a character doesn't have a glyph in a font. */ 441 be loaded, or a character doesn't have a glyph in a font. */
442 unsigned glyph_not_available_p : 1; 442 bool_bf glyph_not_available_p : 1;
443 443
444 /* Non-zero means don't display cursor here. */ 444 /* True means don't display cursor here. */
445 unsigned avoid_cursor_p : 1; 445 bool_bf avoid_cursor_p : 1;
446 446
447 /* Resolved bidirectional level of this character [0..63]. */ 447 /* Resolved bidirectional level of this character [0..63]. */
448 unsigned resolved_level : 5; 448 unsigned resolved_level : 5;
@@ -491,7 +491,7 @@ struct glyph
491 struct 491 struct
492 { 492 {
493 /* Flag to tell if the composition is automatic or not. */ 493 /* Flag to tell if the composition is automatic or not. */
494 unsigned automatic : 1; 494 bool_bf automatic : 1;
495 /* ID of the composition. */ 495 /* ID of the composition. */
496 unsigned id : 31; 496 unsigned id : 31;
497 } cmp; 497 } cmp;
@@ -515,8 +515,8 @@ struct glyph
515 { 515 {
516 /* Value is an enum of the type glyphless_display_method. */ 516 /* Value is an enum of the type glyphless_display_method. */
517 unsigned method : 2; 517 unsigned method : 2;
518 /* 1 iff this glyph is for a character of no font. */ 518 /* True iff this glyph is for a character of no font. */
519 unsigned for_no_font : 1; 519 bool_bf for_no_font : 1;
520 /* Length of acronym or hexadecimal code string (at most 8). */ 520 /* Length of acronym or hexadecimal code string (at most 8). */
521 unsigned len : 4; 521 unsigned len : 4;
522 /* Character to display. Actually we need only 22 bits. */ 522 /* Character to display. Actually we need only 22 bits. */
@@ -584,7 +584,7 @@ struct glyph
584 (GLYPH).face_id = (FACE_ID); \ 584 (GLYPH).face_id = (FACE_ID); \
585 (GLYPH).padding_p = (PADDING_P); \ 585 (GLYPH).padding_p = (PADDING_P); \
586 } \ 586 } \
587 while (0) 587 while (false)
588 588
589/* Fill a character type glyph GLYPH from a glyph typedef FROM as 589/* Fill a character type glyph GLYPH from a glyph typedef FROM as
590 defined in lisp.h. */ 590 defined in lisp.h. */
@@ -593,7 +593,7 @@ struct glyph
593 SET_CHAR_GLYPH ((GLYPH), \ 593 SET_CHAR_GLYPH ((GLYPH), \
594 GLYPH_CHAR ((FROM)), \ 594 GLYPH_CHAR ((FROM)), \
595 GLYPH_FACE ((FROM)), \ 595 GLYPH_FACE ((FROM)), \
596 0) 596 false)
597 597
598/* Construct a glyph code from a character glyph GLYPH. If the 598/* Construct a glyph code from a character glyph GLYPH. If the
599 character is multibyte, return -1 as we can't use glyph table for a 599 character is multibyte, return -1 as we can't use glyph table for a
@@ -607,7 +607,7 @@ struct glyph
607 else \ 607 else \
608 SET_GLYPH ((G), -1, 0); \ 608 SET_GLYPH ((G), -1, 0); \
609 } \ 609 } \
610 while (0) 610 while (false)
611 611
612#define GLYPH_INVALID_P(GLYPH) (GLYPH_CHAR (GLYPH) < 0) 612#define GLYPH_INVALID_P(GLYPH) (GLYPH_CHAR (GLYPH) < 0)
613 613
@@ -722,11 +722,11 @@ struct glyph_matrix
722 /* Flag indicating that scrolling should not be tried in 722 /* Flag indicating that scrolling should not be tried in
723 update_window. This flag is set by functions like try_window_id 723 update_window. This flag is set by functions like try_window_id
724 which do their own scrolling. */ 724 which do their own scrolling. */
725 unsigned no_scrolling_p : 1; 725 bool_bf no_scrolling_p : 1;
726 726
727 /* Non-zero means window displayed in this matrix has a header 727 /* True means window displayed in this matrix has a header
728 line. */ 728 line. */
729 unsigned header_line_p : 1; 729 bool_bf header_line_p : 1;
730 730
731#ifdef GLYPH_DEBUG 731#ifdef GLYPH_DEBUG
732 /* A string identifying the method used to display the matrix. */ 732 /* A string identifying the method used to display the matrix. */
@@ -750,7 +750,7 @@ struct glyph_matrix
750void check_matrix_pointer_lossage (struct glyph_matrix *); 750void check_matrix_pointer_lossage (struct glyph_matrix *);
751#define CHECK_MATRIX(MATRIX) check_matrix_pointer_lossage ((MATRIX)) 751#define CHECK_MATRIX(MATRIX) check_matrix_pointer_lossage ((MATRIX))
752#else 752#else
753#define CHECK_MATRIX(MATRIX) (void) 0 753#define CHECK_MATRIX(MATRIX) ((void) 0)
754#endif 754#endif
755 755
756 756
@@ -916,107 +916,107 @@ struct glyph_row
916 /* Vertical offset of the right fringe bitmap. */ 916 /* Vertical offset of the right fringe bitmap. */
917 signed right_fringe_offset : FRINGE_HEIGHT_BITS; 917 signed right_fringe_offset : FRINGE_HEIGHT_BITS;
918 918
919 /* 1 means that at least one of the left and right fringe bitmaps is 919 /* True means that at least one of the left and right fringe bitmaps is
920 periodic and thus depends on the y-position of the row. */ 920 periodic and thus depends on the y-position of the row. */
921 unsigned fringe_bitmap_periodic_p : 1; 921 bool_bf fringe_bitmap_periodic_p : 1;
922 922
923 /* 1 means that we must draw the bitmaps of this row. */ 923 /* True means that we must draw the bitmaps of this row. */
924 unsigned redraw_fringe_bitmaps_p : 1; 924 bool_bf redraw_fringe_bitmaps_p : 1;
925 925
926 /* In a desired matrix, 1 means that this row must be updated. In a 926 /* In a desired matrix, true means that this row must be updated. In a
927 current matrix, 0 means that the row has been invalidated, i.e. 927 current matrix, false means that the row has been invalidated, i.e.
928 the row's contents do not agree with what is visible on the 928 the row's contents do not agree with what is visible on the
929 screen. */ 929 screen. */
930 unsigned enabled_p : 1; 930 bool_bf enabled_p : 1;
931 931
932 /* 1 means row displays a text line that is truncated on the left or 932 /* True means row displays a text line that is truncated on the left or
933 right side. */ 933 right side. */
934 unsigned truncated_on_left_p : 1; 934 bool_bf truncated_on_left_p : 1;
935 unsigned truncated_on_right_p : 1; 935 bool_bf truncated_on_right_p : 1;
936 936
937 /* 1 means that this row displays a continued line, i.e. it has a 937 /* True means that this row displays a continued line, i.e. it has a
938 continuation mark at the right side. */ 938 continuation mark at the right side. */
939 unsigned continued_p : 1; 939 bool_bf continued_p : 1;
940 940
941 /* 0 means that this row does not contain any text, i.e. it is 941 /* False means that this row does not contain any text, i.e., it is
942 a blank line at the window and buffer end. */ 942 a blank line at the window and buffer end. */
943 unsigned displays_text_p : 1; 943 bool_bf displays_text_p : 1;
944 944
945 /* 1 means that this line ends at ZV. */ 945 /* True means that this line ends at ZV. */
946 unsigned ends_at_zv_p : 1; 946 bool_bf ends_at_zv_p : 1;
947 947
948 /* 1 means the face of the last glyph in the text area is drawn to 948 /* True means the face of the last glyph in the text area is drawn to
949 the right end of the window. This flag is used in 949 the right end of the window. This flag is used in
950 update_text_area to optimize clearing to the end of the area. */ 950 update_text_area to optimize clearing to the end of the area. */
951 unsigned fill_line_p : 1; 951 bool_bf fill_line_p : 1;
952 952
953 /* Non-zero means display a bitmap on X frames indicating that this 953 /* True means display a bitmap on X frames indicating that this
954 line contains no text and ends in ZV. */ 954 line contains no text and ends in ZV. */
955 unsigned indicate_empty_line_p : 1; 955 bool_bf indicate_empty_line_p : 1;
956 956
957 /* 1 means this row contains glyphs that overlap each other because 957 /* True means this row contains glyphs that overlap each other because
958 of lbearing or rbearing. */ 958 of lbearing or rbearing. */
959 unsigned contains_overlapping_glyphs_p : 1; 959 bool_bf contains_overlapping_glyphs_p : 1;
960 960
961 /* 1 means this row is as wide as the window it is displayed in, including 961 /* True means this row is as wide as the window it is displayed in, including
962 scroll bars, fringes, and internal borders. This also 962 scroll bars, fringes, and internal borders. This also
963 implies that the row doesn't have marginal areas. */ 963 implies that the row doesn't have marginal areas. */
964 unsigned full_width_p : 1; 964 bool_bf full_width_p : 1;
965 965
966 /* Non-zero means row is a mode or header-line. */ 966 /* True means row is a mode or header-line. */
967 unsigned mode_line_p : 1; 967 bool_bf mode_line_p : 1;
968 968
969 /* 1 in a current row means this row is overlapped by another row. */ 969 /* True in a current row means this row is overlapped by another row. */
970 unsigned overlapped_p : 1; 970 bool_bf overlapped_p : 1;
971 971
972 /* 1 means this line ends in the middle of a character consisting 972 /* True means this line ends in the middle of a character consisting
973 of more than one glyph. Some glyphs have been put in this row, 973 of more than one glyph. Some glyphs have been put in this row,
974 the rest are put in rows below this one. */ 974 the rest are put in rows below this one. */
975 unsigned ends_in_middle_of_char_p : 1; 975 bool_bf ends_in_middle_of_char_p : 1;
976 976
977 /* 1 means this line starts in the middle of a character consisting 977 /* True means this line starts in the middle of a character consisting
978 of more than one glyph. Some glyphs have been put in the 978 of more than one glyph. Some glyphs have been put in the
979 previous row, the rest are put in this row. */ 979 previous row, the rest are put in this row. */
980 unsigned starts_in_middle_of_char_p : 1; 980 bool_bf starts_in_middle_of_char_p : 1;
981 981
982 /* 1 in a current row means this row overlaps others. */ 982 /* True in a current row means this row overlaps others. */
983 unsigned overlapping_p : 1; 983 bool_bf overlapping_p : 1;
984 984
985 /* 1 means some glyphs in this row are displayed in mouse-face. */ 985 /* True means some glyphs in this row are displayed in mouse-face. */
986 unsigned mouse_face_p : 1; 986 bool_bf mouse_face_p : 1;
987 987
988 /* 1 means this row was ended by a newline from a string. */ 988 /* True means this row was ended by a newline from a string. */
989 unsigned ends_in_newline_from_string_p : 1; 989 bool_bf ends_in_newline_from_string_p : 1;
990 990
991 /* 1 means this row width is exactly the width of the window, and the 991 /* True means this row width is exactly the width of the window, and the
992 final newline character is hidden in the right fringe. */ 992 final newline character is hidden in the right fringe. */
993 unsigned exact_window_width_line_p : 1; 993 bool_bf exact_window_width_line_p : 1;
994 994
995 /* 1 means this row currently shows the cursor in the right fringe. */ 995 /* True means this row currently shows the cursor in the right fringe. */
996 unsigned cursor_in_fringe_p : 1; 996 bool_bf cursor_in_fringe_p : 1;
997 997
998 /* 1 means the last glyph in the row is part of an ellipsis. */ 998 /* True means the last glyph in the row is part of an ellipsis. */
999 unsigned ends_in_ellipsis_p : 1; 999 bool_bf ends_in_ellipsis_p : 1;
1000 1000
1001 /* Non-zero means display a bitmap on X frames indicating that this 1001 /* True means display a bitmap on X frames indicating that this
1002 the first line of the buffer. */ 1002 the first line of the buffer. */
1003 unsigned indicate_bob_p : 1; 1003 bool_bf indicate_bob_p : 1;
1004 1004
1005 /* Non-zero means display a bitmap on X frames indicating that this 1005 /* True means display a bitmap on X frames indicating that this
1006 the top line of the window, but not start of the buffer. */ 1006 the top line of the window, but not start of the buffer. */
1007 unsigned indicate_top_line_p : 1; 1007 bool_bf indicate_top_line_p : 1;
1008 1008
1009 /* Non-zero means display a bitmap on X frames indicating that this 1009 /* True means display a bitmap on X frames indicating that this
1010 the last line of the buffer. */ 1010 the last line of the buffer. */
1011 unsigned indicate_eob_p : 1; 1011 bool_bf indicate_eob_p : 1;
1012 1012
1013 /* Non-zero means display a bitmap on X frames indicating that this 1013 /* True means display a bitmap on X frames indicating that this
1014 the bottom line of the window, but not end of the buffer. */ 1014 the bottom line of the window, but not end of the buffer. */
1015 unsigned indicate_bottom_line_p : 1; 1015 bool_bf indicate_bottom_line_p : 1;
1016 1016
1017 /* Non-zero means the row was reversed to display text in a 1017 /* True means the row was reversed to display text in a
1018 right-to-left paragraph. */ 1018 right-to-left paragraph. */
1019 unsigned reversed_p : 1; 1019 bool_bf reversed_p : 1;
1020 1020
1021 /* Continuation lines width at the start of the row. */ 1021 /* Continuation lines width at the start of the row. */
1022 int continuation_lines_width; 1022 int continuation_lines_width;
@@ -1107,10 +1107,10 @@ struct glyph_row *matrix_row (struct glyph_matrix *, int);
1107/* Set and query the enabled_p flag of glyph row ROW in MATRIX. */ 1107/* Set and query the enabled_p flag of glyph row ROW in MATRIX. */
1108 1108
1109#define SET_MATRIX_ROW_ENABLED_P(MATRIX, ROW, VALUE) \ 1109#define SET_MATRIX_ROW_ENABLED_P(MATRIX, ROW, VALUE) \
1110 (MATRIX_ROW ((MATRIX), (ROW))->enabled_p = (VALUE) != 0) 1110 (MATRIX_ROW (MATRIX, ROW)->enabled_p = (VALUE))
1111 1111
1112#define MATRIX_ROW_ENABLED_P(MATRIX, ROW) \ 1112#define MATRIX_ROW_ENABLED_P(MATRIX, ROW) \
1113 (MATRIX_ROW ((MATRIX), (ROW))->enabled_p) 1113 (MATRIX_ROW (MATRIX, ROW)->enabled_p)
1114 1114
1115/* Non-zero if ROW displays text. Value is non-zero if the row is 1115/* Non-zero if ROW displays text. Value is non-zero if the row is
1116 blank but displays a line end. */ 1116 blank but displays a line end. */
@@ -1188,12 +1188,12 @@ struct glyph_row *matrix_row (struct glyph_matrix *, int);
1188 || ((ROW)->start.overlay_string_index >= 0 \ 1188 || ((ROW)->start.overlay_string_index >= 0 \
1189 && (ROW)->start.string_pos.charpos > 0)) 1189 && (ROW)->start.string_pos.charpos > 0))
1190 1190
1191/* Non-zero means ROW overlaps its predecessor. */ 1191/* True means ROW overlaps its predecessor. */
1192 1192
1193#define MATRIX_ROW_OVERLAPS_PRED_P(ROW) \ 1193#define MATRIX_ROW_OVERLAPS_PRED_P(ROW) \
1194 ((ROW)->phys_ascent > (ROW)->ascent) 1194 ((ROW)->phys_ascent > (ROW)->ascent)
1195 1195
1196/* Non-zero means ROW overlaps its successor. */ 1196/* True means ROW overlaps its successor. */
1197 1197
1198#define MATRIX_ROW_OVERLAPS_SUCC_P(ROW) \ 1198#define MATRIX_ROW_OVERLAPS_SUCC_P(ROW) \
1199 ((ROW)->phys_height - (ROW)->phys_ascent \ 1199 ((ROW)->phys_height - (ROW)->phys_ascent \
@@ -1203,8 +1203,7 @@ struct glyph_row *matrix_row (struct glyph_matrix *, int);
1203 1203
1204extern struct glyph space_glyph; 1204extern struct glyph space_glyph;
1205 1205
1206/* Non-zero means last display completed. Zero means it was 1206/* True means last display completed. False means it was preempted. */
1207 preempted. */
1208 1207
1209extern bool display_completed; 1208extern bool display_completed;
1210 1209
@@ -1300,24 +1299,24 @@ struct glyph_string
1300 /* Start and end glyph indices in a glyph-string. */ 1299 /* Start and end glyph indices in a glyph-string. */
1301 int cmp_from, cmp_to; 1300 int cmp_from, cmp_to;
1302 1301
1303 /* 1 means this glyph strings face has to be drawn to the right end 1302 /* True means this glyph strings face has to be drawn to the right end
1304 of the window's drawing area. */ 1303 of the window's drawing area. */
1305 unsigned extends_to_end_of_line_p : 1; 1304 bool_bf extends_to_end_of_line_p : 1;
1306 1305
1307 /* 1 means the background of this string has been drawn. */ 1306 /* True means the background of this string has been drawn. */
1308 unsigned background_filled_p : 1; 1307 bool_bf background_filled_p : 1;
1309 1308
1310 /* 1 means glyph string must be drawn with 16-bit functions. */ 1309 /* True means glyph string must be drawn with 16-bit functions. */
1311 unsigned two_byte_p : 1; 1310 bool_bf two_byte_p : 1;
1312 1311
1313 /* 1 means that the original font determined for drawing this glyph 1312 /* True means that the original font determined for drawing this glyph
1314 string could not be loaded. The member `font' has been set to 1313 string could not be loaded. The member `font' has been set to
1315 the frame's default font in this case. */ 1314 the frame's default font in this case. */
1316 unsigned font_not_found_p : 1; 1315 bool_bf font_not_found_p : 1;
1317 1316
1318 /* 1 means that the face in which this glyph string is drawn has a 1317 /* True means that the face in which this glyph string is drawn has a
1319 stipple pattern. */ 1318 stipple pattern. */
1320 unsigned stippled_p : 1; 1319 bool_bf stippled_p : 1;
1321 1320
1322#define OVERLAPS_PRED (1 << 0) 1321#define OVERLAPS_PRED (1 << 0)
1323#define OVERLAPS_SUCC (1 << 1) 1322#define OVERLAPS_SUCC (1 << 1)
@@ -1332,10 +1331,10 @@ struct glyph_string
1332 respectively. */ 1331 respectively. */
1333 unsigned for_overlaps : 3; 1332 unsigned for_overlaps : 3;
1334 1333
1335 /* 1 means that all glyphs in this glyph string has the flag 1334 /* True means that all glyphs in this glyph string has the flag
1336 padding_p set, and thus must be drawn one by one to have 1-pixel 1335 padding_p set, and thus must be drawn one by one to have 1-pixel
1337 width even though the logical width in the font is zero. */ 1336 width even though the logical width in the font is zero. */
1338 unsigned padding_p : 1; 1337 bool_bf padding_p : 1;
1339 1338
1340 /* The GC to use for drawing this glyph string. */ 1339 /* The GC to use for drawing this glyph string. */
1341#if defined (HAVE_X_WINDOWS) 1340#if defined (HAVE_X_WINDOWS)
@@ -1348,7 +1347,7 @@ struct glyph_string
1348 1347
1349 /* A pointer to the first glyph in the string. This glyph 1348 /* A pointer to the first glyph in the string. This glyph
1350 corresponds to char2b[0]. Needed to draw rectangles if 1349 corresponds to char2b[0]. Needed to draw rectangles if
1351 font_not_found_p is 1. */ 1350 font_not_found_p is true. */
1352 struct glyph *first_glyph; 1351 struct glyph *first_glyph;
1353 1352
1354 /* Image, if any. */ 1353 /* Image, if any. */
@@ -1480,7 +1479,7 @@ struct glyph_string
1480 && FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME (W))) \ 1479 && FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME (W))) \
1481 && !NILP (BVAR (XBUFFER ((W)->contents), mode_line_format)) \ 1480 && !NILP (BVAR (XBUFFER ((W)->contents), mode_line_format)) \
1482 && WINDOW_PIXEL_HEIGHT (W) > WINDOW_FRAME_LINE_HEIGHT (W)) \ 1481 && WINDOW_PIXEL_HEIGHT (W) > WINDOW_FRAME_LINE_HEIGHT (W)) \
1483 : 0) 1482 : false)
1484 1483
1485/* Value is true if window W wants a header line and is large enough 1484/* Value is true if window W wants a header line and is large enough
1486 to accommodate it. */ 1485 to accommodate it. */
@@ -1494,7 +1493,7 @@ struct glyph_string
1494 > (WINDOW_WANTS_MODELINE_P (W) \ 1493 > (WINDOW_WANTS_MODELINE_P (W) \
1495 ? (2 * WINDOW_FRAME_LINE_HEIGHT (W)) \ 1494 ? (2 * WINDOW_FRAME_LINE_HEIGHT (W)) \
1496 : WINDOW_FRAME_LINE_HEIGHT (W)))) \ 1495 : WINDOW_FRAME_LINE_HEIGHT (W)))) \
1497 : 0) 1496 : false)
1498 1497
1499/* Return proper value to be used as baseline offset of font that has 1498/* Return proper value to be used as baseline offset of font that has
1500 ASCENT and DESCENT to draw characters by the font at the vertical 1499 ASCENT and DESCENT to draw characters by the font at the vertical
@@ -1656,54 +1655,54 @@ struct face
1656 /* Style of underlining. */ 1655 /* Style of underlining. */
1657 ENUM_BF (face_underline_type) underline_type : 1; 1656 ENUM_BF (face_underline_type) underline_type : 1;
1658 1657
1659 /* If `box' above specifies a 3D type, 1 means use box_color for 1658 /* If `box' above specifies a 3D type, true means use box_color for
1660 drawing shadows. */ 1659 drawing shadows. */
1661 unsigned use_box_color_for_shadows_p : 1; 1660 bool_bf use_box_color_for_shadows_p : 1;
1662 1661
1663 /* Non-zero if text in this face should be underlined, overlined, 1662 /* Non-zero if text in this face should be underlined, overlined,
1664 strike-through or have a box drawn around it. */ 1663 strike-through or have a box drawn around it. */
1665 unsigned underline_p : 1; 1664 bool_bf underline_p : 1;
1666 unsigned overline_p : 1; 1665 bool_bf overline_p : 1;
1667 unsigned strike_through_p : 1; 1666 bool_bf strike_through_p : 1;
1668 1667
1669 /* 1 means that the colors specified for this face could not be 1668 /* True means that the colors specified for this face could not be
1670 loaded, and were replaced by default colors, so they shouldn't be 1669 loaded, and were replaced by default colors, so they shouldn't be
1671 freed. */ 1670 freed. */
1672 unsigned foreground_defaulted_p : 1; 1671 bool_bf foreground_defaulted_p : 1;
1673 unsigned background_defaulted_p : 1; 1672 bool_bf background_defaulted_p : 1;
1674 1673
1675 /* 1 means that either no color is specified for underlining or that 1674 /* True means that either no color is specified for underlining or that
1676 the specified color couldn't be loaded. Use the foreground 1675 the specified color couldn't be loaded. Use the foreground
1677 color when drawing in that case. */ 1676 color when drawing in that case. */
1678 unsigned underline_defaulted_p : 1; 1677 bool_bf underline_defaulted_p : 1;
1679 1678
1680 /* 1 means that either no color is specified for the corresponding 1679 /* True means that either no color is specified for the corresponding
1681 attribute or that the specified color couldn't be loaded. 1680 attribute or that the specified color couldn't be loaded.
1682 Use the foreground color when drawing in that case. */ 1681 Use the foreground color when drawing in that case. */
1683 unsigned overline_color_defaulted_p : 1; 1682 bool_bf overline_color_defaulted_p : 1;
1684 unsigned strike_through_color_defaulted_p : 1; 1683 bool_bf strike_through_color_defaulted_p : 1;
1685 unsigned box_color_defaulted_p : 1; 1684 bool_bf box_color_defaulted_p : 1;
1686 1685
1687 /* TTY appearances. Colors are found in `lface' with empty color 1686 /* TTY appearances. Colors are found in `lface' with empty color
1688 string meaning the default color of the TTY. */ 1687 string meaning the default color of the TTY. */
1689 unsigned tty_bold_p : 1; 1688 bool_bf tty_bold_p : 1;
1690 unsigned tty_italic_p : 1; 1689 bool_bf tty_italic_p : 1;
1691 unsigned tty_underline_p : 1; 1690 bool_bf tty_underline_p : 1;
1692 unsigned tty_reverse_p : 1; 1691 bool_bf tty_reverse_p : 1;
1693 1692
1694 /* 1 means that colors of this face may not be freed because they 1693 /* True means that colors of this face may not be freed because they
1695 have been copied bitwise from a base face (see 1694 have been copied bitwise from a base face (see
1696 realize_x_face). */ 1695 realize_x_face). */
1697 unsigned colors_copied_bitwise_p : 1; 1696 bool_bf colors_copied_bitwise_p : 1;
1698 1697
1699 /* If non-zero, use overstrike (to simulate bold-face). */ 1698 /* If non-zero, use overstrike (to simulate bold-face). */
1700 unsigned overstrike : 1; 1699 bool_bf overstrike : 1;
1701 1700
1702/* NOTE: this is not used yet, but eventually this impl should be done 1701/* NOTE: this is not used yet, but eventually this impl should be done
1703 similarly to overstrike */ 1702 similarly to overstrike */
1704#ifdef HAVE_NS 1703#ifdef HAVE_NS
1705 /* If non-zero, use geometric rotation (to simulate italic). */ 1704 /* If non-zero, use geometric rotation (to simulate italic). */
1706 unsigned synth_ital : 1; 1705 bool_bf synth_ital : 1;
1707#endif 1706#endif
1708 1707
1709 /* The hash value of this face. */ 1708 /* The hash value of this face. */
@@ -1791,7 +1790,7 @@ struct face_cache
1791 1790
1792 /* Flag indicating that attributes of the `menu' face have been 1791 /* Flag indicating that attributes of the `menu' face have been
1793 changed. */ 1792 changed. */
1794 unsigned menu_face_changed_p : 1; 1793 bool_bf menu_face_changed_p : 1;
1795}; 1794};
1796 1795
1797 1796
@@ -1799,10 +1798,10 @@ struct face_cache
1799 using X resources of FACE. */ 1798 using X resources of FACE. */
1800 1799
1801#define PREPARE_FACE_FOR_DISPLAY(F, FACE) \ 1800#define PREPARE_FACE_FOR_DISPLAY(F, FACE) \
1801 do { \
1802 if ((FACE)->gc == 0) \ 1802 if ((FACE)->gc == 0) \
1803 prepare_face_for_display ((F), (FACE)); \ 1803 prepare_face_for_display ((F), (FACE)); \
1804 else \ 1804 } while (false)
1805 (void) 0
1806 1805
1807/* Return a pointer to the face with ID on frame F, or null if such a 1806/* Return a pointer to the face with ID on frame F, or null if such a
1808 face doesn't exist. */ 1807 face doesn't exist. */
@@ -1828,7 +1827,7 @@ struct face_cache
1828 1827
1829#else /* not HAVE_WINDOW_SYSTEM */ 1828#else /* not HAVE_WINDOW_SYSTEM */
1830 1829
1831#define FACE_SUITABLE_FOR_ASCII_CHAR_P(FACE, CHAR) 1 1830#define FACE_SUITABLE_FOR_ASCII_CHAR_P(FACE, CHAR) true
1832#define FACE_FOR_CHAR(F, FACE, CHAR, POS, OBJECT) ((FACE)->id) 1831#define FACE_FOR_CHAR(F, FACE, CHAR, POS, OBJECT) ((FACE)->id)
1833 1832
1834#endif /* not HAVE_WINDOW_SYSTEM */ 1833#endif /* not HAVE_WINDOW_SYSTEM */
@@ -1926,9 +1925,9 @@ struct bidi_string_data {
1926 ptrdiff_t schars; /* the number of characters in the string, 1925 ptrdiff_t schars; /* the number of characters in the string,
1927 excluding the terminating null */ 1926 excluding the terminating null */
1928 ptrdiff_t bufpos; /* buffer position of lstring, or 0 if N/A */ 1927 ptrdiff_t bufpos; /* buffer position of lstring, or 0 if N/A */
1929 unsigned from_disp_str : 1; /* 1 means the string comes from a 1928 bool_bf from_disp_str : 1; /* True means the string comes from a
1930 display property */ 1929 display property */
1931 unsigned unibyte : 1; /* 1 means the string is unibyte */ 1930 bool_bf unibyte : 1; /* True means the string is unibyte */
1932}; 1931};
1933 1932
1934/* Data type for reordering bidirectional text. */ 1933/* Data type for reordering bidirectional text. */
@@ -1971,10 +1970,10 @@ struct bidi_it {
1971 struct window *w; /* the window being displayed */ 1970 struct window *w; /* the window being displayed */
1972 bidi_dir_t paragraph_dir; /* current paragraph direction */ 1971 bidi_dir_t paragraph_dir; /* current paragraph direction */
1973 ptrdiff_t separator_limit; /* where paragraph separator should end */ 1972 ptrdiff_t separator_limit; /* where paragraph separator should end */
1974 unsigned prev_was_pdf : 1; /* if non-zero, previous char was PDF */ 1973 bool_bf prev_was_pdf : 1; /* if true, previous char was PDF */
1975 unsigned first_elt : 1; /* if non-zero, examine current char first */ 1974 bool_bf first_elt : 1; /* if true, examine current char first */
1976 unsigned new_paragraph : 1; /* if non-zero, we expect a new paragraph */ 1975 bool_bf new_paragraph : 1; /* if true, we expect a new paragraph */
1977 unsigned frame_window_p : 1; /* non-zero if displaying on a GUI frame */ 1976 bool_bf frame_window_p : 1; /* true if displaying on a GUI frame */
1978}; 1977};
1979 1978
1980/* Value is non-zero when the bidi iterator is at base paragraph 1979/* Value is non-zero when the bidi iterator is at base paragraph
@@ -2002,8 +2001,8 @@ struct draw_fringe_bitmap_params
2002 int wd, h, dh; 2001 int wd, h, dh;
2003 int x, y; 2002 int x, y;
2004 int bx, nx, by, ny; 2003 int bx, nx, by, ny;
2005 unsigned cursor_p : 1; 2004 bool_bf cursor_p : 1;
2006 unsigned overlay_p : 1; 2005 bool_bf overlay_p : 1;
2007 struct face *face; 2006 struct face *face;
2008}; 2007};
2009 2008
@@ -2238,30 +2237,30 @@ struct it
2238 /* Position at which redisplay end trigger functions should be run. */ 2237 /* Position at which redisplay end trigger functions should be run. */
2239 ptrdiff_t redisplay_end_trigger_charpos; 2238 ptrdiff_t redisplay_end_trigger_charpos;
2240 2239
2241 /* 1 means multibyte characters are enabled. */ 2240 /* True means multibyte characters are enabled. */
2242 unsigned multibyte_p : 1; 2241 bool_bf multibyte_p : 1;
2243 2242
2244 /* 1 means window has a mode line at its top. */ 2243 /* True means window has a mode line at its top. */
2245 unsigned header_line_p : 1; 2244 bool_bf header_line_p : 1;
2246 2245
2247 /* 1 means `string' is the value of a `display' property. 2246 /* True means `string' is the value of a `display' property.
2248 Don't handle some `display' properties in these strings. */ 2247 Don't handle some `display' properties in these strings. */
2249 unsigned string_from_display_prop_p : 1; 2248 bool_bf string_from_display_prop_p : 1;
2250 2249
2251 /* 1 means `string' comes from a `line-prefix' or `wrap-prefix' 2250 /* True means `string' comes from a `line-prefix' or `wrap-prefix'
2252 property. */ 2251 property. */
2253 unsigned string_from_prefix_prop_p : 1; 2252 bool_bf string_from_prefix_prop_p : 1;
2254 2253
2255 /* 1 means we are iterating an object that came from a value of a 2254 /* True means we are iterating an object that came from a value of a
2256 `display' property. */ 2255 `display' property. */
2257 unsigned from_disp_prop_p : 1; 2256 bool_bf from_disp_prop_p : 1;
2258 2257
2259 /* When METHOD == next_element_from_display_vector, 2258 /* When METHOD == next_element_from_display_vector,
2260 this is 1 if we're doing an ellipsis. Otherwise meaningless. */ 2259 this is true if we're doing an ellipsis. Otherwise meaningless. */
2261 unsigned ellipsis_p : 1; 2260 bool_bf ellipsis_p : 1;
2262 2261
2263 /* True means cursor shouldn't be displayed here. */ 2262 /* True means cursor shouldn't be displayed here. */
2264 unsigned avoid_cursor_p : 1; 2263 bool_bf avoid_cursor_p : 1;
2265 2264
2266 /* Display table in effect or null for none. */ 2265 /* Display table in effect or null for none. */
2267 struct Lisp_Char_Table *dp; 2266 struct Lisp_Char_Table *dp;
@@ -2375,13 +2374,13 @@ struct it
2375 enum glyph_row_area area; 2374 enum glyph_row_area area;
2376 enum it_method method; 2375 enum it_method method;
2377 bidi_dir_t paragraph_embedding; 2376 bidi_dir_t paragraph_embedding;
2378 unsigned multibyte_p : 1; 2377 bool_bf multibyte_p : 1;
2379 unsigned string_from_display_prop_p : 1; 2378 bool_bf string_from_display_prop_p : 1;
2380 unsigned string_from_prefix_prop_p : 1; 2379 bool_bf string_from_prefix_prop_p : 1;
2381 unsigned display_ellipsis_p : 1; 2380 bool_bf display_ellipsis_p : 1;
2382 unsigned avoid_cursor_p : 1; 2381 bool_bf avoid_cursor_p : 1;
2383 unsigned bidi_p : 1; 2382 bool_bf bidi_p : 1;
2384 unsigned from_disp_prop_p : 1; 2383 bool_bf from_disp_prop_p : 1;
2385 enum line_wrap_method line_wrap; 2384 enum line_wrap_method line_wrap;
2386 2385
2387 /* Properties from display property that are reset by another display 2386 /* Properties from display property that are reset by another display
@@ -2407,46 +2406,46 @@ struct it
2407 int face_id; 2406 int face_id;
2408 2407
2409 /* Setting of buffer-local variable selective-display-ellipsis. */ 2408 /* Setting of buffer-local variable selective-display-ellipsis. */
2410 unsigned selective_display_ellipsis_p : 1; 2409 bool_bf selective_display_ellipsis_p : 1;
2411 2410
2412 /* 1 means control characters are translated into the form `^C' 2411 /* True means control characters are translated into the form `^C'
2413 where the `^' can be replaced by a display table entry. */ 2412 where the `^' can be replaced by a display table entry. */
2414 unsigned ctl_arrow_p : 1; 2413 bool_bf ctl_arrow_p : 1;
2415 2414
2416 /* Non-zero means that the current face has a box. */ 2415 /* True means that the current face has a box. */
2417 unsigned face_box_p : 1; 2416 bool_bf face_box_p : 1;
2418 2417
2419 /* Non-null means that the current character is the first in a run 2418 /* Non-null means that the current character is the first in a run
2420 of characters with box face. */ 2419 of characters with box face. */
2421 unsigned start_of_box_run_p : 1; 2420 bool_bf start_of_box_run_p : 1;
2422 2421
2423 /* Non-zero means that the current character is the last in a run 2422 /* True means that the current character is the last in a run
2424 of characters with box face. */ 2423 of characters with box face. */
2425 unsigned end_of_box_run_p : 1; 2424 bool_bf end_of_box_run_p : 1;
2426 2425
2427 /* 1 means overlay strings at end_charpos have been processed. */ 2426 /* True means overlay strings at end_charpos have been processed. */
2428 unsigned overlay_strings_at_end_processed_p : 1; 2427 bool_bf overlay_strings_at_end_processed_p : 1;
2429 2428
2430 /* 1 means to ignore overlay strings at current pos, as they have 2429 /* True means to ignore overlay strings at current pos, as they have
2431 already been processed. */ 2430 already been processed. */
2432 unsigned ignore_overlay_strings_at_pos_p : 1; 2431 bool_bf ignore_overlay_strings_at_pos_p : 1;
2433 2432
2434 /* 1 means the actual glyph is not available in the current 2433 /* True means the actual glyph is not available in the current
2435 system. */ 2434 system. */
2436 unsigned glyph_not_available_p : 1; 2435 bool_bf glyph_not_available_p : 1;
2437 2436
2438 /* 1 means the next line in display_line continues a character 2437 /* True means the next line in display_line continues a character
2439 consisting of more than one glyph, and some glyphs of this 2438 consisting of more than one glyph, and some glyphs of this
2440 character have been put on the previous line. */ 2439 character have been put on the previous line. */
2441 unsigned starts_in_middle_of_char_p : 1; 2440 bool_bf starts_in_middle_of_char_p : 1;
2442 2441
2443 /* If 1, saved_face_id contains the id of the face in front of text 2442 /* If true, saved_face_id contains the id of the face in front of text
2444 skipped due to selective display. */ 2443 skipped due to selective display. */
2445 unsigned face_before_selective_p : 1; 2444 bool_bf face_before_selective_p : 1;
2446 2445
2447 /* If 1, adjust current glyph so it does not increase current row 2446 /* If true, adjust current glyph so it does not increase current row
2448 descent/ascent (line-height property). Reset after this glyph. */ 2447 descent/ascent (line-height property). Reset after this glyph. */
2449 unsigned constrain_row_ascent_descent_p : 1; 2448 bool_bf constrain_row_ascent_descent_p : 1;
2450 2449
2451 enum line_wrap_method line_wrap; 2450 enum line_wrap_method line_wrap;
2452 2451
@@ -2614,9 +2613,9 @@ struct it
2614 /* Face of the right fringe glyph. */ 2613 /* Face of the right fringe glyph. */
2615 unsigned right_user_fringe_face_id : FACE_ID_BITS; 2614 unsigned right_user_fringe_face_id : FACE_ID_BITS;
2616 2615
2617 /* Non-zero means we need to reorder bidirectional text for display 2616 /* True means we need to reorder bidirectional text for display
2618 in the visual order. */ 2617 in the visual order. */
2619 unsigned bidi_p : 1; 2618 bool_bf bidi_p : 1;
2620 2619
2621 /* For iterating over bidirectional text. */ 2620 /* For iterating over bidirectional text. */
2622 struct bidi_it bidi_it; 2621 struct bidi_it bidi_it;
@@ -2636,7 +2635,7 @@ struct it
2636 2635
2637#define ITERATOR_AT_END_P(IT) ((IT)->what == IT_EOB) 2636#define ITERATOR_AT_END_P(IT) ((IT)->what == IT_EOB)
2638 2637
2639/* Non-zero means IT is at the end of a line. This is the case if it 2638/* True means IT is at the end of a line. This is the case if it
2640 is either on a newline or on a carriage return and selective 2639 is either on a newline or on a carriage return and selective
2641 display hides the rest of the line. */ 2640 display hides the rest of the line. */
2642 2641
@@ -2651,19 +2650,14 @@ struct it
2651#define PRODUCE_GLYPHS(IT) \ 2650#define PRODUCE_GLYPHS(IT) \
2652 do { \ 2651 do { \
2653 if ((IT)->glyph_row != NULL && (IT)->bidi_p) \ 2652 if ((IT)->glyph_row != NULL && (IT)->bidi_p) \
2654 { \ 2653 (IT)->glyph_row->reversed_p = (IT)->bidi_it.paragraph_dir == R2L; \
2655 if ((IT)->bidi_it.paragraph_dir == R2L) \
2656 (IT)->glyph_row->reversed_p = 1; \
2657 else \
2658 (IT)->glyph_row->reversed_p = 0; \
2659 } \
2660 if (FRAME_RIF ((IT)->f) != NULL) \ 2654 if (FRAME_RIF ((IT)->f) != NULL) \
2661 FRAME_RIF ((IT)->f)->produce_glyphs ((IT)); \ 2655 FRAME_RIF ((IT)->f)->produce_glyphs ((IT)); \
2662 else \ 2656 else \
2663 produce_glyphs ((IT)); \ 2657 produce_glyphs ((IT)); \
2664 if ((IT)->glyph_row != NULL) \ 2658 if ((IT)->glyph_row != NULL) \
2665 inhibit_free_realized_faces = 1; \ 2659 inhibit_free_realized_faces = true; \
2666 } while (0) 2660 } while (false)
2667 2661
2668/* Bit-flags indicating what operation move_it_to should perform. */ 2662/* Bit-flags indicating what operation move_it_to should perform. */
2669 2663
@@ -2707,13 +2701,13 @@ typedef struct {
2707 2701
2708 /* Nonzero if part of the text currently shown in 2702 /* Nonzero if part of the text currently shown in
2709 its mouse-face is beyond the window end. */ 2703 its mouse-face is beyond the window end. */
2710 unsigned mouse_face_past_end : 1; 2704 bool_bf mouse_face_past_end : 1;
2711 2705
2712 /* Nonzero means defer mouse-motion highlighting. */ 2706 /* True means defer mouse-motion highlighting. */
2713 unsigned mouse_face_defer : 1; 2707 bool_bf mouse_face_defer : 1;
2714 2708
2715 /* Nonzero means that the mouse highlight should not be shown. */ 2709 /* True means that the mouse highlight should not be shown. */
2716 unsigned mouse_face_hidden : 1; 2710 bool_bf mouse_face_hidden : 1;
2717} Mouse_HLInfo; 2711} Mouse_HLInfo;
2718 2712
2719INLINE void 2713INLINE void
@@ -2728,9 +2722,9 @@ reset_mouse_highlight (Mouse_HLInfo *hlinfo)
2728 hlinfo->mouse_face_mouse_frame = NULL; 2722 hlinfo->mouse_face_mouse_frame = NULL;
2729 hlinfo->mouse_face_window = Qnil; 2723 hlinfo->mouse_face_window = Qnil;
2730 hlinfo->mouse_face_overlay = Qnil; 2724 hlinfo->mouse_face_overlay = Qnil;
2731 hlinfo->mouse_face_past_end = 0; 2725 hlinfo->mouse_face_past_end = false;
2732 hlinfo->mouse_face_hidden = 0; 2726 hlinfo->mouse_face_hidden = false;
2733 hlinfo->mouse_face_defer = 0; 2727 hlinfo->mouse_face_defer = false;
2734} 2728}
2735 2729
2736/*********************************************************************** 2730/***********************************************************************
@@ -2798,8 +2792,8 @@ struct redisplay_interface
2798 void (*update_window_begin_hook) (struct window *w); 2792 void (*update_window_begin_hook) (struct window *w);
2799 2793
2800 /* Function to call after window W has been updated in window-based 2794 /* Function to call after window W has been updated in window-based
2801 redisplay. CURSOR_ON_P non-zero means switch cursor on. 2795 redisplay. CURSOR_ON_P true means switch cursor on.
2802 MOUSE_FACE_OVERWRITTEN_P non-zero means that some lines in W 2796 MOUSE_FACE_OVERWRITTEN_P true means that some lines in W
2803 that contained glyphs in mouse-face were overwritten, so we 2797 that contained glyphs in mouse-face were overwritten, so we
2804 have to update the mouse highlight. */ 2798 have to update the mouse highlight. */
2805 void (*update_window_end_hook) (struct window *w, bool cursor_on_p, 2799 void (*update_window_end_hook) (struct window *w, bool cursor_on_p,
@@ -2848,8 +2842,8 @@ struct redisplay_interface
2848 int width, int height); 2842 int width, int height);
2849 2843
2850/* Draw specified cursor CURSOR_TYPE of width CURSOR_WIDTH 2844/* Draw specified cursor CURSOR_TYPE of width CURSOR_WIDTH
2851 at row GLYPH_ROW on window W if ON_P is 1. If ON_P is 2845 at row GLYPH_ROW on window W if ON_P is true. If ON_P is
2852 0, don't draw cursor. If ACTIVE_P is 1, system caret 2846 false, don't draw cursor. If ACTIVE_P is true, system caret
2853 should track this cursor (when applicable). */ 2847 should track this cursor (when applicable). */
2854 void (*draw_window_cursor) (struct window *w, 2848 void (*draw_window_cursor) (struct window *w,
2855 struct glyph_row *glyph_row, 2849 struct glyph_row *glyph_row,
@@ -2949,11 +2943,11 @@ struct image
2949 /* True if this image has a `transparent' background -- that is, is 2943 /* True if this image has a `transparent' background -- that is, is
2950 uses an image mask. The accessor macro for this is 2944 uses an image mask. The accessor macro for this is
2951 `IMAGE_BACKGROUND_TRANSPARENT'. */ 2945 `IMAGE_BACKGROUND_TRANSPARENT'. */
2952 unsigned background_transparent : 1; 2946 bool_bf background_transparent : 1;
2953 2947
2954 /* True if the `background' and `background_transparent' fields are 2948 /* True if the `background' and `background_transparent' fields are
2955 valid, respectively. */ 2949 valid, respectively. */
2956 unsigned background_valid : 1, background_transparent_valid : 1; 2950 bool_bf background_valid : 1, background_transparent_valid : 1;
2957 2951
2958 /* Width and height of the image. */ 2952 /* Width and height of the image. */
2959 int width, height; 2953 int width, height;
@@ -2996,8 +2990,8 @@ struct image
2996 /* Reference to the type of the image. */ 2990 /* Reference to the type of the image. */
2997 struct image_type *type; 2991 struct image_type *type;
2998 2992
2999 /* 1 means that loading the image failed. Don't try again. */ 2993 /* True means that loading the image failed. Don't try again. */
3000 unsigned load_failed_p; 2994 bool load_failed_p;
3001 2995
3002 /* A place for image types to store additional data. It is marked 2996 /* A place for image types to store additional data. It is marked
3003 during GC. */ 2997 during GC. */
@@ -3201,7 +3195,7 @@ void move_it_past_eol (struct it *);
3201void move_it_in_display_line (struct it *it, 3195void move_it_in_display_line (struct it *it,
3202 ptrdiff_t to_charpos, int to_x, 3196 ptrdiff_t to_charpos, int to_x,
3203 enum move_operation_enum op); 3197 enum move_operation_enum op);
3204int in_display_vector_p (struct it *); 3198bool in_display_vector_p (struct it *);
3205int frame_mode_line_height (struct frame *); 3199int frame_mode_line_height (struct frame *);
3206extern Lisp_Object Qtool_bar; 3200extern Lisp_Object Qtool_bar;
3207extern bool redisplaying_p; 3201extern bool redisplaying_p;
@@ -3270,7 +3264,7 @@ extern void note_mouse_highlight (struct frame *, int, int);
3270extern void x_clear_window_mouse_face (struct window *); 3264extern void x_clear_window_mouse_face (struct window *);
3271extern void cancel_mouse_face (struct frame *); 3265extern void cancel_mouse_face (struct frame *);
3272extern int clear_mouse_face (Mouse_HLInfo *); 3266extern int clear_mouse_face (Mouse_HLInfo *);
3273extern int cursor_in_mouse_face_p (struct window *w); 3267extern bool cursor_in_mouse_face_p (struct window *w);
3274extern void tty_draw_row_with_mouse_face (struct window *, struct glyph_row *, 3268extern void tty_draw_row_with_mouse_face (struct window *, struct glyph_row *,
3275 int, int, enum draw_glyphs_face); 3269 int, int, enum draw_glyphs_face);
3276extern void display_tty_menu_item (const char *, int, int, int, int, int); 3270extern void display_tty_menu_item (const char *, int, int, int, int, int);