diff options
Diffstat (limited to 'pkg/catgirl/patch/0001-Revert-Use-gnu-case-range-and-gnu-conditional-omitte.patch')
| -rw-r--r-- | pkg/catgirl/patch/0001-Revert-Use-gnu-case-range-and-gnu-conditional-omitte.patch | 115 |
1 files changed, 67 insertions, 48 deletions
diff --git a/pkg/catgirl/patch/0001-Revert-Use-gnu-case-range-and-gnu-conditional-omitte.patch b/pkg/catgirl/patch/0001-Revert-Use-gnu-case-range-and-gnu-conditional-omitte.patch index 6ab5c038..c77fc31d 100644 --- a/pkg/catgirl/patch/0001-Revert-Use-gnu-case-range-and-gnu-conditional-omitte.patch +++ b/pkg/catgirl/patch/0001-Revert-Use-gnu-case-range-and-gnu-conditional-omitte.patch @@ -1,4 +1,4 @@ -From 48ce2b38033ae93717fd330c3cb6c0476e2979e5 Mon Sep 17 00:00:00 2001 +From beac90889183cb71ca3dfc8c9ada9175879b9c34 Mon Sep 17 00:00:00 2001 From: Michael Forney <mforney@mforney.org> Date: Thu, 7 May 2020 00:36:14 -0700 Subject: [PATCH] Revert "Use gnu-case-range and @@ -6,30 +6,32 @@ Subject: [PATCH] Revert "Use gnu-case-range and This reverts commit 75a6aa9258270169f43f56e063f1bfb57eebe56b. --- - Makefile | 3 +-- + Makefile | 2 -- command.c | 33 +++++++++++++++++++-------------- complete.c | 4 ++-- + edit.c | 2 +- handle.c | 45 +++++++++++++++++++++++++++------------------ - ui.c | 9 +++++++-- + input.c | 7 ++++++- url.c | 2 +- - 6 files changed, 57 insertions(+), 39 deletions(-) + window.c | 2 +- + 8 files changed, 57 insertions(+), 40 deletions(-) diff --git a/Makefile b/Makefile -index 48fc350..ac452d2 100644 +index 3abba03..9518cda 100644 --- a/Makefile +++ b/Makefile -@@ -2,8 +2,7 @@ PREFIX ?= /usr/local +@@ -2,9 +2,7 @@ PREFIX ?= /usr/local BINDIR ?= ${PREFIX}/bin MANDIR ?= ${PREFIX}/man -CEXTS = gnu-case-range gnu-conditional-omitted-operand --CFLAGS += -std=c11 -Wall -Wextra -Wpedantic ${CEXTS:%=-Wno-%} -+CFLAGS += -std=c11 -Wall -Wextra -Wpedantic + CFLAGS += -std=c11 -Wall -Wextra -Wpedantic -Wmissing-prototypes +-CFLAGS += ${CEXTS:%=-Wno-%} LDADD.libtls = -ltls LDADD.ncursesw = -lncursesw diff --git a/command.c b/command.c -index 335c396..d87e162 100644 +index a127af3..f5be51b 100644 --- a/command.c +++ b/command.c @@ -68,8 +68,8 @@ static int splitChunk(const char *cmd, uint id) { @@ -161,11 +163,24 @@ index 9e59db5..9ea1192 100644 return node; } +diff --git a/edit.c b/edit.c +index bb92edf..07705dd 100644 +--- a/edit.c ++++ b/edit.c +@@ -69,7 +69,7 @@ int editReserve(struct Edit *e, size_t index, size_t count) { + return -1; + } + if (e->len + count > e->cap) { +- size_t cap = (e->cap ?: 256); ++ size_t cap = (e->cap ? e->cap : 256); + while (cap < e->len + count) cap *= 2; + wchar_t *buf = realloc(e->buf, sizeof(*buf) * cap); + if (!buf) return -1; diff --git a/handle.c b/handle.c -index e460c7c..0cdda74 100644 +index 9f051c7..a4f1015 100644 --- a/handle.c +++ b/handle.c -@@ -299,9 +299,9 @@ static void handleReplyISupport(struct Message *msg) { +@@ -301,9 +301,9 @@ static void handleReplyISupport(struct Message *msg) { set(&network.setParamModes, setParam); set(&network.channelModes, channel); } else if (!strcmp(key, "EXCEPTS")) { @@ -177,7 +192,7 @@ index e460c7c..0cdda74 100644 } } } -@@ -354,7 +354,7 @@ static void handleJoin(struct Message *msg) { +@@ -356,7 +356,7 @@ static void handleJoin(struct Message *msg) { "\3%02d%s\3\t%s%s%sarrives in \3%02d%s\3", hash(msg->user), msg->nick, (msg->params[2] ? "(" : ""), @@ -186,7 +201,7 @@ index e460c7c..0cdda74 100644 (msg->params[2] ? "\17) " : ""), hash(msg->params[0]), msg->params[0] ); -@@ -386,12 +386,14 @@ static void handlePart(struct Message *msg) { +@@ -388,12 +388,14 @@ static void handlePart(struct Message *msg) { id, heat, tagTime(msg), "\3%02d%s\3\tleaves \3%02d%s\3%s%s", hash(msg->user), msg->nick, hash(msg->params[0]), msg->params[0], @@ -203,7 +218,7 @@ index e460c7c..0cdda74 100644 ); } -@@ -408,12 +410,14 @@ static void handleKick(struct Message *msg) { +@@ -410,12 +412,14 @@ static void handleKick(struct Message *msg) { hash(msg->user), msg->nick, completeColor(id, msg->params[1]), msg->params[1], hash(msg->params[0]), msg->params[0], @@ -220,7 +235,7 @@ index e460c7c..0cdda74 100644 ); completeRemove(id, msg->params[1]); if (kicked) completeClear(id); -@@ -464,13 +468,15 @@ static void handleQuit(struct Message *msg) { +@@ -466,13 +470,15 @@ static void handleQuit(struct Message *msg) { id, heat, tagTime(msg), "\3%02d%s\3\tleaves%s%s", hash(msg->user), msg->nick, @@ -238,7 +253,7 @@ index e460c7c..0cdda74 100644 ); } completeRemove(None, msg->nick); -@@ -732,7 +738,7 @@ static void handleReplyUserModeIs(struct Message *msg) { +@@ -734,7 +740,7 @@ static void handleReplyUserModeIs(struct Message *msg) { if (*ch == '+') continue; const char *name = UserModes[(byte)*ch]; ptr = seprintf( @@ -247,7 +262,7 @@ index e460c7c..0cdda74 100644 ); } uiFormat( -@@ -772,13 +778,13 @@ static void handleReplyChannelModeIs(struct Message *msg) { +@@ -774,13 +780,13 @@ static void handleReplyChannelModeIs(struct Message *msg) { assert(param < ParamCap); ptr = seprintf( ptr, end, ", +%c%s%s %s", @@ -263,7 +278,7 @@ index e460c7c..0cdda74 100644 ); } } -@@ -805,7 +811,7 @@ static void handleMode(struct Message *msg) { +@@ -807,7 +813,7 @@ static void handleMode(struct Message *msg) { hash(msg->user), msg->nick, (set ? "" : "un"), self.color, msg->params[0], @@ -272,7 +287,7 @@ index e460c7c..0cdda74 100644 ); } return; -@@ -962,7 +968,7 @@ static void handleErrorBanListFull(struct Message *msg) { +@@ -964,7 +970,7 @@ static void handleErrorBanListFull(struct Message *msg) { require(msg, false, 4); uiFormat( idFor(msg->params[1]), Warm, tagTime(msg), @@ -281,7 +296,7 @@ index e460c7c..0cdda74 100644 ); } -@@ -1067,14 +1073,15 @@ static void handleReplyWhoisIdle(struct Message *msg) { +@@ -1069,14 +1075,15 @@ static void handleReplyWhoisIdle(struct Message *msg) { } } char signon[sizeof("0000-00-00 00:00:00")]; @@ -299,7 +314,7 @@ index e460c7c..0cdda74 100644 ); } -@@ -1109,7 +1116,9 @@ static void handleReplyWhoisGeneric(struct Message *msg) { +@@ -1111,7 +1118,9 @@ static void handleReplyWhoisGeneric(struct Message *msg) { Network, Warm, tagTime(msg), "\3%02d%s\3\t%s%s%s", completeColor(Network, msg->params[1]), msg->params[1], @@ -310,7 +325,7 @@ index e460c7c..0cdda74 100644 ); } -@@ -1184,7 +1193,7 @@ static bool isMention(const struct Message *msg) { +@@ -1186,7 +1195,7 @@ static bool isMention(const struct Message *msg) { const char *match = msg->params[1]; while (NULL != (match = strstr(match, self.nick))) { char a = (match > msg->params[1] ? match[-1] : ' '); @@ -319,40 +334,31 @@ index e460c7c..0cdda74 100644 if ((isspace(a) || ispunct(a)) && (isspace(b) || ispunct(b))) { return true; } -diff --git a/ui.c b/ui.c -index 2789bd7..4b87a1f 100644 ---- a/ui.c -+++ b/ui.c -@@ -497,7 +497,7 @@ static size_t windowTop(const struct Window *window) { - } - - static size_t windowBottom(const struct Window *window) { -- size_t bottom = BufferCap - (window->scroll ?: 1); -+ size_t bottom = BufferCap - (window->scroll ? window->scroll : 1); - if (window->scroll) bottom -= SplitLines + MarkerLines; - return bottom; - } -@@ -976,7 +976,6 @@ static void keyCode(int code) { - break; case KeyMetaGt: scrollTo(window, 0); - break; case KeyMetaLt: scrollTop(window); +diff --git a/input.c b/input.c +index f3813c4..820bf3c 100644 +--- a/input.c ++++ b/input.c +@@ -417,7 +417,6 @@ static void keyCode(int code) { + break; case KeyMetaGt: windowScroll(ScrollAll, -1); + break; case KeyMetaLt: windowScroll(ScrollAll, +1); -- break; case KeyMeta0 ... KeyMeta9: uiShowNum(code - KeyMeta0); - break; case KeyMetaA: showAuto(); - break; case KeyMetaB: edit(id, EditPrevWord, 0); - break; case KeyMetaD: edit(id, EditDeleteNextWord, 0); -@@ -1006,6 +1005,12 @@ static void keyCode(int code) { - break; case KEY_SEND: scrollTo(window, 0); - break; case KEY_SHOME: scrollTo(window, BufferCap); - break; case KEY_UP: windowScroll(window, +1); +- break; case KeyMeta0 ... KeyMeta9: windowShow(code - KeyMeta0); + break; case KeyMetaA: windowAuto(); + break; case KeyMetaB: error = editFn(edit, EditPrevWord); + break; case KeyMetaD: error = editFn(edit, EditDeleteNextWord); +@@ -448,6 +447,12 @@ static void keyCode(int code) { + break; case KEY_SEND: windowScroll(ScrollAll, -1); + break; case KEY_SHOME: windowScroll(ScrollAll, +1); + break; case KEY_UP: windowScroll(ScrollOne, +1); + + break; default: { + if (code >= KeyMeta0 && code <= KeyMeta9) { -+ uiShowNum(code - KeyMeta0); ++ windowShow(code - KeyMeta0); + } + } } + if (error) err(EX_OSERR, "editFn"); } - diff --git a/url.c b/url.c index 219a83c..9c721e0 100644 --- a/url.c @@ -366,6 +372,19 @@ index 219a83c..9c721e0 100644 || writeString(file, url->url); if (error) return error; } +diff --git a/window.c b/window.c +index ee0911f..d7bc472 100644 +--- a/window.c ++++ b/window.c +@@ -220,7 +220,7 @@ static size_t windowTop(const struct Window *window) { + } + + static size_t windowBottom(const struct Window *window) { +- size_t bottom = BufferCap - (window->scroll ?: 1); ++ size_t bottom = BufferCap - (window->scroll ? window->scroll : 1); + if (window->scroll) bottom -= SplitLines + MarkerLines; + return bottom; + } -- 2.34.1 |
