From 603997932d26636c5a55d4efd9cf980f86b78088 Mon Sep 17 00:00:00 2001 From: okan Date: Fri, 26 Jun 2015 18:54:25 +0000 Subject: region is a _ctx, so name it so --- screen.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/screen.c b/screen.c index 04d42ac..01fcead 100644 --- a/screen.c +++ b/screen.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: screen.c,v 1.74 2015/06/26 17:17:46 okan Exp $ + * $OpenBSD: screen.c,v 1.75 2015/06/26 18:54:25 okan Exp $ */ #include @@ -127,13 +127,13 @@ screen_updatestackingorder(struct screen_ctx *sc) struct geom screen_area(struct screen_ctx *sc, int x, int y, int flags) { - struct region_ctx *region; + struct region_ctx *rc; struct geom area = sc->work; - TAILQ_FOREACH(region, &sc->regionq, entry) { - if (x >= region->area.x && x < region->area.x+region->area.w && - y >= region->area.y && y < region->area.y+region->area.h) { - area = region->area; + TAILQ_FOREACH(rc, &sc->regionq, entry) { + if ((x >= rc->area.x) && (x < (rc->area.x + rc->area.w)) && + (y >= rc->area.y) && (y < (rc->area.y + rc->area.h))) { + area = rc->area; break; } } @@ -145,7 +145,7 @@ screen_area(struct screen_ctx *sc, int x, int y, int flags) void screen_update_geometry(struct screen_ctx *sc) { - struct region_ctx *region; + struct region_ctx *rc; int i; sc->view.x = 0; @@ -155,9 +155,9 @@ screen_update_geometry(struct screen_ctx *sc) sc->work = screen_apply_gap(sc, sc->view); - while ((region = TAILQ_FIRST(&sc->regionq)) != NULL) { - TAILQ_REMOVE(&sc->regionq, region, entry); - free(region); + while ((rc = TAILQ_FIRST(&sc->regionq)) != NULL) { + TAILQ_REMOVE(&sc->regionq, rc, entry); + free(rc); } if (HasRandr) { @@ -174,13 +174,13 @@ screen_update_geometry(struct screen_ctx *sc) continue; } - region = xmalloc(sizeof(*region)); - region->num = i; - region->area.x = ci->x; - region->area.y = ci->y; - region->area.w = ci->width; - region->area.h = ci->height; - TAILQ_INSERT_TAIL(&sc->regionq, region, entry); + rc = xmalloc(sizeof(*rc)); + rc->num = i; + rc->area.x = ci->x; + rc->area.y = ci->y; + rc->area.w = ci->width; + rc->area.h = ci->height; + TAILQ_INSERT_TAIL(&sc->regionq, rc, entry); XRRFreeCrtcInfo(ci); } -- cgit v1.2.3-2-gb3c3