summaryrefslogtreecommitdiff
path: root/pkg/catgirl/patch/0001-Revert-Use-gnu-case-range-and-gnu-conditional-omitte.patch
diff options
context:
space:
mode:
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.patch106
1 files changed, 51 insertions, 55 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 aec925d3..df58f0ab 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 8be1eb6a19a8f467abadc6e9501c18db68b76863 Mon Sep 17 00:00:00 2001
+From 2ee883206837a7dc5a0049841b5a9cdc096f67f6 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
@@ -7,15 +7,15 @@ Subject: [PATCH] Revert "Use gnu-case-range and
This reverts commit 75a6aa9258270169f43f56e063f1bfb57eebe56b.
---
Makefile | 3 +--
- command.c | 34 +++++++++++++++++++---------------
+ command.c | 33 +++++++++++++++++++--------------
complete.c | 4 ++--
handle.c | 45 +++++++++++++++++++++++++++------------------
ui.c | 9 +++++++--
url.c | 2 +-
- 6 files changed, 57 insertions(+), 40 deletions(-)
+ 6 files changed, 57 insertions(+), 39 deletions(-)
diff --git a/Makefile b/Makefile
-index b285e8c..7d6e43d 100644
+index 373e7d5..a07ef19 100644
--- a/Makefile
+++ b/Makefile
@@ -2,8 +2,7 @@ PREFIX ?= /usr/local
@@ -29,7 +29,7 @@ index b285e8c..7d6e43d 100644
LDADD.ncursesw = -lncursesw
diff --git a/command.c b/command.c
-index 4c290fc..e566a13 100644
+index 5c97ef5..0e90715 100644
--- a/command.c
+++ b/command.c
@@ -68,8 +68,8 @@ static int splitChunk(const char *cmd, uint id) {
@@ -43,7 +43,7 @@ index 4c290fc..e566a13 100644
cmd, idNames[id]
);
assert(overhead > 0 && overhead < 512);
-@@ -170,7 +170,7 @@ static void commandPart(uint id, char *params) {
+@@ -171,7 +171,7 @@ static void commandPart(uint id, char *params) {
static void commandQuit(uint id, char *params) {
(void)id;
@@ -52,7 +52,7 @@ index 4c290fc..e566a13 100644
}
static void commandNick(uint id, char *params) {
-@@ -268,7 +268,7 @@ static void commandOp(uint id, char *params) {
+@@ -269,7 +269,7 @@ static void commandOp(uint id, char *params) {
}
static void commandDeop(uint id, char *params) {
@@ -61,7 +61,7 @@ index 4c290fc..e566a13 100644
}
static void commandVoice(uint id, char *params) {
-@@ -280,7 +280,7 @@ static void commandVoice(uint id, char *params) {
+@@ -281,7 +281,7 @@ static void commandVoice(uint id, char *params) {
}
static void commandDevoice(uint id, char *params) {
@@ -70,22 +70,22 @@ index 4c290fc..e566a13 100644
}
static void commandBan(uint id, char *params) {
-@@ -355,12 +355,12 @@ static void commandWhowas(uint id, char *params) {
+@@ -356,12 +356,12 @@ static void commandWhowas(uint id, char *params) {
static void commandNS(uint id, char *params) {
(void)id;
-- ircFormat("PRIVMSG NickServ :%s\r\n", (params ?: "HELP"));
-+ ircFormat("PRIVMSG NickServ :%s\r\n", (params ? params : "HELP"));
+- ircFormat("NS %s\r\n", (params ?: "HELP"));
++ ircFormat("NS %s\r\n", (params ? params : "HELP"));
}
static void commandCS(uint id, char *params) {
(void)id;
-- ircFormat("PRIVMSG ChanServ :%s\r\n", (params ?: "HELP"));
-+ ircFormat("PRIVMSG ChanServ :%s\r\n", (params ? params : "HELP"));
+- ircFormat("CS %s\r\n", (params ?: "HELP"));
++ ircFormat("CS %s\r\n", (params ? params : "HELP"));
}
static void commandQuery(uint id, char *params) {
-@@ -425,7 +425,8 @@ static void commandFilter(enum Heat heat, uint id, char *params) {
+@@ -436,7 +436,8 @@ static void commandFilter(enum Heat heat, uint id, char *params) {
uiFormat(
id, Cold, NULL, "%sing \3%02d%s %s %s %s",
(heat == Hot ? "Highlight" : "Ignor"), Brown, filter.mask,
@@ -95,7 +95,7 @@ index 4c290fc..e566a13 100644
);
} else {
for (size_t i = 0; i < FilterCap && filters[i].mask; ++i) {
-@@ -433,8 +434,9 @@ static void commandFilter(enum Heat heat, uint id, char *params) {
+@@ -444,8 +445,9 @@ static void commandFilter(enum Heat heat, uint id, char *params) {
uiFormat(
Network, Warm, NULL, "%sing \3%02d%s %s %s %s",
(heat == Hot ? "Highlight" : "Ignor"), Brown, filters[i].mask,
@@ -107,7 +107,7 @@ index 4c290fc..e566a13 100644
);
}
}
-@@ -447,8 +449,8 @@ static void commandUnfilter(enum Heat heat, uint id, char *params) {
+@@ -458,8 +460,8 @@ static void commandUnfilter(enum Heat heat, uint id, char *params) {
uiFormat(
id, Cold, NULL, "%s %sing \3%02d%s %s %s %s",
(found ? "No longer" : "Not"), (heat == Hot ? "highlight" : "ignor"),
@@ -118,22 +118,18 @@ index 4c290fc..e566a13 100644
);
}
-@@ -472,11 +474,12 @@ static void commandExec(uint id, char *params) {
- if (pid < 0) err(EX_OSERR, "fork");
- if (pid) return;
-
-+ const char *shell = getenv("SHELL");
-+ if (!shell) shell = "/bin/sh";
-+
- close(STDIN_FILENO);
+@@ -488,7 +490,9 @@ static void commandExec(uint id, char *params) {
dup2(execPipe[1], STDOUT_FILENO);
dup2(utilPipe[1], STDERR_FILENO);
--
+
- const char *shell = getenv("SHELL") ?: "/bin/sh";
++ const char *shell = getenv("SHELL");
++ if (!shell)
++ shell = "/bin/sh";
execl(shell, shell, "-c", params, NULL);
warn("%s", shell);
_exit(EX_UNAVAILABLE);
-@@ -501,7 +504,8 @@ static void commandHelp(uint id, char *params) {
+@@ -513,7 +517,8 @@ static void commandHelp(uint id, char *params) {
if (pid) return;
char buf[256];
@@ -144,7 +140,7 @@ index 4c290fc..e566a13 100644
execlp("man", "man", "1", "catgirl", NULL);
dup2(utilPipe[1], STDERR_FILENO);
diff --git a/complete.c b/complete.c
-index 5835926..0e1de47 100644
+index 9e59db5..9ea1192 100644
--- a/complete.c
+++ b/complete.c
@@ -71,7 +71,7 @@ static struct Node *prepend(struct Node *node) {
@@ -166,10 +162,10 @@ index 5835926..0e1de47 100644
}
diff --git a/handle.c b/handle.c
-index 2607420..c25c7c0 100644
+index a8f054c..1ace1b3 100644
--- a/handle.c
+++ b/handle.c
-@@ -295,9 +295,9 @@ static void handleReplyISupport(struct Message *msg) {
+@@ -299,9 +299,9 @@ static void handleReplyISupport(struct Message *msg) {
set(&network.setParamModes, setParam);
set(&network.channelModes, channel);
} else if (!strcmp(key, "EXCEPTS")) {
@@ -181,7 +177,7 @@ index 2607420..c25c7c0 100644
}
}
}
-@@ -350,7 +350,7 @@ static void handleJoin(struct Message *msg) {
+@@ -354,7 +354,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] ? "(" : ""),
@@ -190,7 +186,7 @@ index 2607420..c25c7c0 100644
(msg->params[2] ? "\17) " : ""),
hash(msg->params[0]), msg->params[0]
);
-@@ -382,12 +382,14 @@ static void handlePart(struct Message *msg) {
+@@ -386,12 +386,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],
@@ -207,7 +203,7 @@ index 2607420..c25c7c0 100644
);
}
-@@ -404,12 +406,14 @@ static void handleKick(struct Message *msg) {
+@@ -408,12 +410,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],
@@ -224,7 +220,7 @@ index 2607420..c25c7c0 100644
);
completeRemove(id, msg->params[1]);
if (kicked) completeClear(id);
-@@ -460,13 +464,15 @@ static void handleQuit(struct Message *msg) {
+@@ -464,13 +468,15 @@ static void handleQuit(struct Message *msg) {
id, heat, tagTime(msg),
"\3%02d%s\3\tleaves%s%s",
hash(msg->user), msg->nick,
@@ -242,32 +238,32 @@ index 2607420..c25c7c0 100644
);
}
completeRemove(None, msg->nick);
-@@ -718,7 +724,7 @@ static void handleReplyUserModeIs(struct Message *msg) {
- for (char *ch = msg->params[1]; *ch; ++ch) {
+@@ -732,7 +738,7 @@ static void handleReplyUserModeIs(struct Message *msg) {
if (*ch == '+') continue;
const char *name = UserModes[(byte)*ch];
-- catf(&cat, ", +%c%s%s", *ch, (name ? " " : ""), (name ?: ""));
-+ catf(&cat, ", +%c%s%s", *ch, (name ? " " : ""), (name ? name : ""));
+ ptr = seprintf(
+- ptr, end, ", +%c%s%s", *ch, (name ? " " : ""), (name ?: "")
++ ptr, end, ", +%c%s%s", *ch, (name ? " " : ""), (name ? name : "")
+ );
}
uiFormat(
- Network, Warm, tagTime(msg),
-@@ -757,13 +763,13 @@ static void handleReplyChannelModeIs(struct Message *msg) {
+@@ -772,13 +778,13 @@ static void handleReplyChannelModeIs(struct Message *msg) {
assert(param < ParamCap);
- catf(
- &cat, ", +%c%s%s %s",
+ ptr = seprintf(
+ ptr, end, ", +%c%s%s %s",
- *ch, (name ? " " : ""), (name ?: ""),
+ *ch, (name ? " " : ""), (name ? name : ""),
msg->params[param++]
);
} else {
- catf(
- &cat, ", +%c%s%s",
+ ptr = seprintf(
+ ptr, end, ", +%c%s%s",
- *ch, (name ? " " : ""), (name ?: "")
+ *ch, (name ? " " : ""), (name ? name : "")
);
}
}
-@@ -790,7 +796,7 @@ static void handleMode(struct Message *msg) {
+@@ -805,7 +811,7 @@ static void handleMode(struct Message *msg) {
hash(msg->user), msg->nick,
(set ? "" : "un"),
self.color, msg->params[0],
@@ -276,7 +272,7 @@ index 2607420..c25c7c0 100644
);
}
return;
-@@ -947,7 +953,7 @@ static void handleErrorBanListFull(struct Message *msg) {
+@@ -962,7 +968,7 @@ static void handleErrorBanListFull(struct Message *msg) {
require(msg, false, 4);
uiFormat(
idFor(msg->params[1]), Warm, tagTime(msg),
@@ -285,7 +281,7 @@ index 2607420..c25c7c0 100644
);
}
-@@ -1052,14 +1058,15 @@ static void handleReplyWhoisIdle(struct Message *msg) {
+@@ -1067,14 +1073,15 @@ static void handleReplyWhoisIdle(struct Message *msg) {
}
}
char signon[sizeof("0000-00-00 00:00:00")];
@@ -303,7 +299,7 @@ index 2607420..c25c7c0 100644
);
}
-@@ -1090,7 +1097,9 @@ static void handleReplyWhoisGeneric(struct Message *msg) {
+@@ -1109,7 +1116,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],
@@ -314,7 +310,7 @@ index 2607420..c25c7c0 100644
);
}
-@@ -1157,7 +1166,7 @@ static bool isMention(const struct Message *msg) {
+@@ -1184,7 +1193,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] : ' ');
@@ -324,10 +320,10 @@ index 2607420..c25c7c0 100644
return true;
}
diff --git a/ui.c b/ui.c
-index 6449e27..aa8c376 100644
+index 1adcafe..2df8396 100644
--- a/ui.c
+++ b/ui.c
-@@ -476,7 +476,7 @@ static size_t windowTop(const struct Window *window) {
+@@ -495,7 +495,7 @@ static size_t windowTop(const struct Window *window) {
}
static size_t windowBottom(const struct Window *window) {
@@ -336,7 +332,7 @@ index 6449e27..aa8c376 100644
if (window->scroll) bottom -= SplitLines + MarkerLines;
return bottom;
}
-@@ -958,7 +958,6 @@ static void keyCode(int code) {
+@@ -978,7 +978,6 @@ static void keyCode(int code) {
break; case KeyMetaGt: scrollTo(window, 0);
break; case KeyMetaLt: scrollTop(window);
@@ -344,7 +340,7 @@ index 6449e27..aa8c376 100644
break; case KeyMetaA: showAuto();
break; case KeyMetaB: edit(id, EditPrevWord, 0);
break; case KeyMetaD: edit(id, EditDeleteNextWord, 0);
-@@ -988,6 +987,12 @@ static void keyCode(int code) {
+@@ -1008,6 +1007,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);
@@ -358,10 +354,10 @@ index 6449e27..aa8c376 100644
}
diff --git a/url.c b/url.c
-index 21f946c..1330d36 100644
+index 219a83c..9c721e0 100644
--- a/url.c
+++ b/url.c
-@@ -246,7 +246,7 @@ int urlSave(FILE *file) {
+@@ -249,7 +249,7 @@ int urlSave(FILE *file) {
if (!url->url) continue;
int error = 0
|| writeString(file, idNames[url->id])
@@ -371,5 +367,5 @@ index 21f946c..1330d36 100644
if (error) return error;
}
--
-2.31.1
+2.32.0