From 328a04fb17861ac2b15b07c5317b15a22c4e3c7b Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 9 Apr 2008 13:26:02 +0200 Subject: [PATCH] [draw/config] Cosmetics Signed-off-by: Julien Danjou --- common/configopts.c | 4 ++-- common/draw.c | 10 ++++------ common/version.h | 4 +--- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/common/configopts.c b/common/configopts.c index 874765cf..1c5d8c09 100644 --- a/common/configopts.c +++ b/common/configopts.c @@ -80,7 +80,7 @@ cfg_position_parse(cfg_t *cfg, cfg_opt_t *opt, const char *value, void *result) { Position *p = p_new(Position, 1); - + if((*p = position_get_from_str(value)) == Off && a_strcmp(value, "off")) { @@ -99,7 +99,7 @@ cfg_alignment_parse(cfg_t *cfg, cfg_opt_t *opt, const char *value, void *result) { Alignment *p = p_new(Alignment, 1); - + if((*p = draw_align_get_from_str(value)) == Auto && a_strcmp(value, "auto")) { diff --git a/common/draw.c b/common/draw.c index 63532d36..5fcd8db6 100644 --- a/common/draw.c +++ b/common/draw.c @@ -87,7 +87,7 @@ draw_iso2utf8(char *iso) } static xcb_visualtype_t * -default_visual_from_screen(xcb_screen_t *s) +draw_screen_default_visual(xcb_screen_t *s) { xcb_depth_iterator_t depth_iter; xcb_visualtype_iterator_t visual_iter; @@ -124,7 +124,7 @@ draw_context_new(xcb_connection_t *conn, int phys_screen, int width, int height, d->width = width; d->height = height; d->depth = s->root_depth; - d->visual = default_visual_from_screen(s); + d->visual = draw_screen_default_visual(s); d->drawable = dw; d->surface = cairo_xcb_surface_create(conn, dw, d->visual, width, height); d->cr = cairo_create(d->surface); @@ -163,7 +163,7 @@ draw_font_new(xcb_connection_t *conn, int phys_screen, char *fontname) * order to get font informations */ surface = cairo_xcb_surface_create(conn, phys_screen, - default_visual_from_screen(s), + draw_screen_default_visual(s), s->width_in_pixels, s->height_in_pixels); @@ -486,7 +486,6 @@ draw_graph(DrawCtx *ctx, area_t rect, int *from, int *to, int cur_index, } } else /* draw from left to right */ - { while(++i < w) { cairo_move_to(ctx->cr, x, y - from[cur_index]); @@ -496,7 +495,6 @@ draw_graph(DrawCtx *ctx, area_t rect, int *from, int *to, int cur_index, if (--cur_index < 0) cur_index = w - 1; } - } cairo_stroke(ctx->cr); @@ -880,7 +878,7 @@ draw_textwidth(xcb_connection_t *conn, int default_screen, font_t *font, const c return 0; surface = cairo_xcb_surface_create(conn, default_screen, - default_visual_from_screen(s), + draw_screen_default_visual(s), s->width_in_pixels, s->height_in_pixels); cr = cairo_create(surface); diff --git a/common/version.h b/common/version.h index b528e977..d6c1ad5d 100644 --- a/common/version.h +++ b/common/version.h @@ -22,8 +22,6 @@ #ifndef AWESOME_COMMON_VERSION_H #define AWESOME_COMMON_VERSION_H -void -eprint_version(const char *const executable) -__attribute__ ((noreturn)); +void eprint_version(const char *const executable) __attribute__ ((noreturn)); #endif