From 66247ce73db602c0dcfcfe8dae8192c0b98957da Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 18 May 2019 10:00:07 -0400 Subject: [PATCH] Fixed building events.c. --- common/events.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/events.c b/common/events.c index 7535af4c..91156081 100644 --- a/common/events.c +++ b/common/events.c @@ -4,6 +4,8 @@ #include "ui.h" #include "uipriv.h" +#define nGrow 32 + struct handler { int id; uiEventHandler f; @@ -136,7 +138,6 @@ notFound: void uiEventDeleteHandler(uiEvent *e, int id) { struct handler *h; - int id; checkEventNonnull(e, /* nothing */); checkEventNotFiring(e, /* nothing */); @@ -144,7 +145,6 @@ void uiEventDeleteHandler(uiEvent *e, int id) if (h == NULL) return; - id = h->id; e->len--; // TODO write this in a way that doesn't mix ptrdiff_t and size_t memmove(h, h + 1, (e->len - (h - e->handlers)) * sizeof (struct handler));