diff options
| author | Paul Eggert | 2012-09-24 14:38:23 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-09-24 14:38:23 -0700 |
| commit | 578098f346bf9e1f23ca86ed764fc00b035b427f (patch) | |
| tree | 19d59f89e4a3dfcab6b7a054d6d8522ca686fe06 /src/xterm.c | |
| parent | 9a48e1689182ec87974c04429ca82f5015d6f5e2 (diff) | |
| download | emacs-578098f346bf9e1f23ca86ed764fc00b035b427f.tar.gz emacs-578098f346bf9e1f23ca86ed764fc00b035b427f.zip | |
image.c, indent.c: Use bool for booleans.
* dispextern.h (struct image_type): Members valid_p, load, init
now return bool, not int. All uses changed.
* image.c: Omit unnecessary static decls.
(x_create_bitmap_mask, x_build_heuristic_mask):
Return void, not int, since callers don't care about the return value.
(x_create_bitmap_mask, define_image_type, valid_image_p)
(struct image_keyword, parse_image_spec, image_spec_value)
(check_image_size, image_background)
(image_background_transparent, x_clear_image_1)
(postprocess_image, lookup_image, x_check_image_size)
(x_create_x_image_and_pixmap, xbm_image_p)
(Create_Pixmap_From_Bitmap_Data, xbm_read_bitmap_data)
(xbm_load_image, xbm_file_p, xbm_load, xpm_lookup_color)
(init_xpm_functions, xpm_valid_color_symbols_p, xpm_image_p)
(xpm_load, xpm_load_image, lookup_rgb_color, lookup_pixel_color)
(x_to_xcolors, x_build_heuristic_mask, pbm_image_p, pbm_load)
(png_image_p, init_png_functions, png_load_body, png_load)
(jpeg_image_p, init_jpeg_functions, jpeg_load_body, jpeg_load)
(tiff_image_p, init_tiff_functions, tiff_load, gif_image_p)
(init_gif_functions, gif_load, imagemagick_image_p)
(imagemagick_load_image, imagemagick_load, svg_image_p)
(init_svg_functions, svg_load, svg_load_image, gs_image_p)
(gs_load):
* nsimage.m (ns_load_image):
* nsterm.m (ns_defined_color):
* xfaces.c (tty_lookup_color, tty_defined_color, defined_color):
* xfns.c (x_defined_color):
* xterm.c (x_alloc_lighter_color_for_widget)
(x_alloc_nearest_color_1, x_alloc_nearest_color)
(x_alloc_lighter_color):
* indent.c (disptab_matches_widthtab, current_column)
(scan_for_column, string_display_width, indented_beyond_p)
(compute_motion, vmotion, Fvertical_motion):
Use bool for booleans.
Diffstat (limited to 'src/xterm.c')
| -rw-r--r-- | src/xterm.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/xterm.c b/src/xterm.c index c33fbf74c77..6cd1d583870 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -287,7 +287,7 @@ enum xembed_message | |||
| 287 | 287 | ||
| 288 | /* Used in x_flush. */ | 288 | /* Used in x_flush. */ |
| 289 | 289 | ||
| 290 | static int x_alloc_nearest_color_1 (Display *, Colormap, XColor *); | 290 | static bool x_alloc_nearest_color_1 (Display *, Colormap, XColor *); |
| 291 | static void x_set_window_size_1 (struct frame *, int, int, int); | 291 | static void x_set_window_size_1 (struct frame *, int, int, int); |
| 292 | static void x_raise_frame (struct frame *); | 292 | static void x_raise_frame (struct frame *); |
| 293 | static void x_lower_frame (struct frame *); | 293 | static void x_lower_frame (struct frame *); |
| @@ -899,8 +899,8 @@ static void x_compute_glyph_string_overhangs (struct glyph_string *); | |||
| 899 | static void x_set_cursor_gc (struct glyph_string *); | 899 | static void x_set_cursor_gc (struct glyph_string *); |
| 900 | static void x_set_mode_line_face_gc (struct glyph_string *); | 900 | static void x_set_mode_line_face_gc (struct glyph_string *); |
| 901 | static void x_set_mouse_face_gc (struct glyph_string *); | 901 | static void x_set_mouse_face_gc (struct glyph_string *); |
| 902 | static int x_alloc_lighter_color (struct frame *, Display *, Colormap, | 902 | static bool x_alloc_lighter_color (struct frame *, Display *, Colormap, |
| 903 | unsigned long *, double, int); | 903 | unsigned long *, double, int); |
| 904 | static void x_setup_relief_color (struct frame *, struct relief *, | 904 | static void x_setup_relief_color (struct frame *, struct relief *, |
| 905 | double, int, unsigned long); | 905 | double, int, unsigned long); |
| 906 | static void x_setup_relief_colors (struct glyph_string *); | 906 | static void x_setup_relief_colors (struct glyph_string *); |
| @@ -1469,9 +1469,9 @@ x_frame_of_widget (Widget widget) | |||
| 1469 | If this produces the same color as PIXEL, try a color where all RGB | 1469 | If this produces the same color as PIXEL, try a color where all RGB |
| 1470 | values have DELTA added. Return the allocated color in *PIXEL. | 1470 | values have DELTA added. Return the allocated color in *PIXEL. |
| 1471 | DISPLAY is the X display, CMAP is the colormap to operate on. | 1471 | DISPLAY is the X display, CMAP is the colormap to operate on. |
| 1472 | Value is non-zero if successful. */ | 1472 | Value is true if successful. */ |
| 1473 | 1473 | ||
| 1474 | int | 1474 | bool |
| 1475 | x_alloc_lighter_color_for_widget (Widget widget, Display *display, Colormap cmap, | 1475 | x_alloc_lighter_color_for_widget (Widget widget, Display *display, Colormap cmap, |
| 1476 | unsigned long *pixel, double factor, int delta) | 1476 | unsigned long *pixel, double factor, int delta) |
| 1477 | { | 1477 | { |
| @@ -1696,15 +1696,15 @@ x_query_color (struct frame *f, XColor *color) | |||
| 1696 | 1696 | ||
| 1697 | /* Allocate the color COLOR->pixel on DISPLAY, colormap CMAP. If an | 1697 | /* Allocate the color COLOR->pixel on DISPLAY, colormap CMAP. If an |
| 1698 | exact match can't be allocated, try the nearest color available. | 1698 | exact match can't be allocated, try the nearest color available. |
| 1699 | Value is non-zero if successful. Set *COLOR to the color | 1699 | Value is true if successful. Set *COLOR to the color |
| 1700 | allocated. */ | 1700 | allocated. */ |
| 1701 | 1701 | ||
| 1702 | static int | 1702 | static bool |
| 1703 | x_alloc_nearest_color_1 (Display *dpy, Colormap cmap, XColor *color) | 1703 | x_alloc_nearest_color_1 (Display *dpy, Colormap cmap, XColor *color) |
| 1704 | { | 1704 | { |
| 1705 | int rc; | 1705 | bool rc; |
| 1706 | 1706 | ||
| 1707 | rc = XAllocColor (dpy, cmap, color); | 1707 | rc = XAllocColor (dpy, cmap, color) != 0; |
| 1708 | if (rc == 0) | 1708 | if (rc == 0) |
| 1709 | { | 1709 | { |
| 1710 | /* If we got to this point, the colormap is full, so we're going | 1710 | /* If we got to this point, the colormap is full, so we're going |
| @@ -1735,7 +1735,7 @@ x_alloc_nearest_color_1 (Display *dpy, Colormap cmap, XColor *color) | |||
| 1735 | color->red = cells[nearest].red; | 1735 | color->red = cells[nearest].red; |
| 1736 | color->green = cells[nearest].green; | 1736 | color->green = cells[nearest].green; |
| 1737 | color->blue = cells[nearest].blue; | 1737 | color->blue = cells[nearest].blue; |
| 1738 | rc = XAllocColor (dpy, cmap, color); | 1738 | rc = XAllocColor (dpy, cmap, color) != 0; |
| 1739 | } | 1739 | } |
| 1740 | else | 1740 | else |
| 1741 | { | 1741 | { |
| @@ -1768,10 +1768,10 @@ x_alloc_nearest_color_1 (Display *dpy, Colormap cmap, XColor *color) | |||
| 1768 | 1768 | ||
| 1769 | /* Allocate the color COLOR->pixel on frame F, colormap CMAP. If an | 1769 | /* Allocate the color COLOR->pixel on frame F, colormap CMAP. If an |
| 1770 | exact match can't be allocated, try the nearest color available. | 1770 | exact match can't be allocated, try the nearest color available. |
| 1771 | Value is non-zero if successful. Set *COLOR to the color | 1771 | Value is true if successful. Set *COLOR to the color |
| 1772 | allocated. */ | 1772 | allocated. */ |
| 1773 | 1773 | ||
| 1774 | int | 1774 | bool |
| 1775 | x_alloc_nearest_color (struct frame *f, Colormap cmap, XColor *color) | 1775 | x_alloc_nearest_color (struct frame *f, Colormap cmap, XColor *color) |
| 1776 | { | 1776 | { |
| 1777 | gamma_correct (f, color); | 1777 | gamma_correct (f, color); |
| @@ -1821,12 +1821,12 @@ x_copy_color (struct frame *f, long unsigned int pixel) | |||
| 1821 | DISPLAY is the X display, CMAP is the colormap to operate on. | 1821 | DISPLAY is the X display, CMAP is the colormap to operate on. |
| 1822 | Value is non-zero if successful. */ | 1822 | Value is non-zero if successful. */ |
| 1823 | 1823 | ||
| 1824 | static int | 1824 | static bool |
| 1825 | x_alloc_lighter_color (struct frame *f, Display *display, Colormap cmap, long unsigned int *pixel, double factor, int delta) | 1825 | x_alloc_lighter_color (struct frame *f, Display *display, Colormap cmap, long unsigned int *pixel, double factor, int delta) |
| 1826 | { | 1826 | { |
| 1827 | XColor color, new; | 1827 | XColor color, new; |
| 1828 | long bright; | 1828 | long bright; |
| 1829 | int success_p; | 1829 | bool success_p; |
| 1830 | 1830 | ||
| 1831 | /* Get RGB color values. */ | 1831 | /* Get RGB color values. */ |
| 1832 | color.pixel = *pixel; | 1832 | color.pixel = *pixel; |