commit: d84567a754d6c012868f61d0e4e6e59c70fc23d8
parent a8000bc6ccf99a89d2cb62ebddc1dff06df571a5
Author: Michael Forney <mforney@mforney.org>
Date: Thu, 9 Jul 2020 13:08:55 -0700
catgirl: Update to latest git
Diffstat:
2 files changed, 46 insertions(+), 31 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
@@ -1,4 +1,4 @@
-From bd523867fe3b82fe34d63969d8785113f19eee41 Mon Sep 17 00:00:00 2001
+From 5fdca38ab8e393ff4e20a9331754363e499d314e 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
@@ -10,8 +10,9 @@ This reverts commit 75a6aa9258270169f43f56e063f1bfb57eebe56b.
command.c | 19 ++++++++++---------
complete.c | 4 ++--
handle.c | 45 +++++++++++++++++++++++++++------------------
+ ignore.c | 2 +-
ui.c | 7 ++++++-
- 5 files changed, 46 insertions(+), 32 deletions(-)
+ 6 files changed, 47 insertions(+), 33 deletions(-)
diff --git a/Makefile b/Makefile
index 8bf93ab..553eda9 100644
@@ -28,10 +29,10 @@ index 8bf93ab..553eda9 100644
-include config.mk
diff --git a/command.c b/command.c
-index b041e41..4393cf5 100644
+index ac83f3f..05fc16e 100644
--- a/command.c
+++ b/command.c
-@@ -58,8 +58,8 @@ static void splitMessage(char *cmd, uint id, char *params) {
+@@ -69,8 +69,8 @@ static void splitMessage(char *cmd, uint id, char *params) {
int overhead = snprintf(
NULL, 0, ":%s!%*s@%*s %s %s :\r\n",
self.nick,
@@ -42,7 +43,7 @@ index b041e41..4393cf5 100644
cmd, idNames[id]
);
assert(overhead > 0 && overhead < 512);
-@@ -98,7 +98,7 @@ static void commandNotice(uint id, char *params) {
+@@ -109,7 +109,7 @@ static void commandNotice(uint id, char *params) {
static void commandMe(uint id, char *params) {
char buf[512];
@@ -51,7 +52,7 @@ index b041e41..4393cf5 100644
echoMessage("PRIVMSG", id, buf);
}
-@@ -129,7 +129,7 @@ static void commandPart(uint id, char *params) {
+@@ -140,7 +140,7 @@ static void commandPart(uint id, char *params) {
static void commandQuit(uint id, char *params) {
(void)id;
@@ -60,7 +61,7 @@ index b041e41..4393cf5 100644
}
static void commandNick(uint id, char *params) {
-@@ -215,7 +215,7 @@ static void commandOp(uint id, char *params) {
+@@ -226,7 +226,7 @@ static void commandOp(uint id, char *params) {
}
static void commandDeop(uint id, char *params) {
@@ -69,7 +70,7 @@ index b041e41..4393cf5 100644
}
static void commandVoice(uint id, char *params) {
-@@ -227,7 +227,7 @@ static void commandVoice(uint id, char *params) {
+@@ -238,7 +238,7 @@ static void commandVoice(uint id, char *params) {
}
static void commandDevoice(uint id, char *params) {
@@ -78,7 +79,7 @@ index b041e41..4393cf5 100644
}
static void commandBan(uint id, char *params) {
-@@ -388,11 +388,12 @@ static void commandExec(uint id, char *params) {
+@@ -399,11 +399,12 @@ static void commandExec(uint id, char *params) {
if (pid < 0) err(EX_OSERR, "fork");
if (pid) return;
@@ -93,7 +94,7 @@ index b041e41..4393cf5 100644
execlp(shell, shell, "-c", params, NULL);
warn("%s", shell);
_exit(EX_UNAVAILABLE);
-@@ -407,7 +408,7 @@ static void commandHelp(uint id, char *params) {
+@@ -418,7 +419,7 @@ static void commandHelp(uint id, char *params) {
if (pid) return;
char buf[256];
@@ -103,10 +104,10 @@ index b041e41..4393cf5 100644
execlp("man", "man", "1", "catgirl", NULL);
dup2(utilPipe[1], STDERR_FILENO);
diff --git a/complete.c b/complete.c
-index 86846f4..5e4d773 100644
+index d320035..1da169e 100644
--- a/complete.c
+++ b/complete.c
-@@ -60,7 +60,7 @@ static struct Node *prepend(struct Node *node) {
+@@ -71,7 +71,7 @@ static struct Node *prepend(struct Node *node) {
node->next = head;
if (head) head->prev = node;
head = node;
@@ -115,7 +116,7 @@ index 86846f4..5e4d773 100644
return node;
}
-@@ -69,7 +69,7 @@ static struct Node *append(struct Node *node) {
+@@ -80,7 +80,7 @@ static struct Node *append(struct Node *node) {
node->prev = tail;
if (tail) tail->next = node;
tail = node;
@@ -125,10 +126,10 @@ index 86846f4..5e4d773 100644
}
diff --git a/handle.c b/handle.c
-index ef3f2b5..1410acc 100644
+index 4383cb0..53f8016 100644
--- a/handle.c
+++ b/handle.c
-@@ -269,9 +269,9 @@ static void handleReplyISupport(struct Message *msg) {
+@@ -280,9 +280,9 @@ static void handleReplyISupport(struct Message *msg) {
set(&network.setParamModes, setParam);
set(&network.channelModes, channel);
} else if (!strcmp(key, "EXCEPTS")) {
@@ -140,7 +141,7 @@ index ef3f2b5..1410acc 100644
}
}
}
-@@ -318,7 +318,7 @@ static void handleJoin(struct Message *msg) {
+@@ -329,7 +329,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] ? "(" : ""),
@@ -149,7 +150,7 @@ index ef3f2b5..1410acc 100644
(msg->params[2] ? ") " : ""),
hash(msg->params[0]), msg->params[0]
);
-@@ -349,12 +349,14 @@ static void handlePart(struct Message *msg) {
+@@ -360,12 +360,14 @@ static void handlePart(struct Message *msg) {
id, ignoreCheck(Cold, id, msg), 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],
@@ -166,7 +167,7 @@ index ef3f2b5..1410acc 100644
);
}
-@@ -371,12 +373,14 @@ static void handleKick(struct Message *msg) {
+@@ -382,12 +384,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],
@@ -183,7 +184,7 @@ index ef3f2b5..1410acc 100644
);
completeRemove(id, msg->params[1]);
if (kicked) completeClear(id);
-@@ -414,13 +418,15 @@ static void handleQuit(struct Message *msg) {
+@@ -425,13 +429,15 @@ static void handleQuit(struct Message *msg) {
id, ignoreCheck(Cold, id, msg), tagTime(msg),
"\3%02d%s\3\tleaves%s%s",
hash(msg->user), msg->nick,
@@ -201,7 +202,7 @@ index ef3f2b5..1410acc 100644
);
}
completeRemove(None, msg->nick);
-@@ -579,7 +585,7 @@ static void handleReplyUserModeIs(struct Message *msg) {
+@@ -590,7 +596,7 @@ static void handleReplyUserModeIs(struct Message *msg) {
const char *name = UserModes[(byte)*ch];
catf(
buf, sizeof(buf), ", +%c%s%s",
@@ -210,7 +211,7 @@ index ef3f2b5..1410acc 100644
);
}
uiFormat(
-@@ -621,13 +627,13 @@ static void handleReplyChannelModeIs(struct Message *msg) {
+@@ -632,13 +638,13 @@ static void handleReplyChannelModeIs(struct Message *msg) {
assert(param < ParamCap);
catf(
buf, sizeof(buf), ", +%c%s%s %s",
@@ -226,7 +227,7 @@ index ef3f2b5..1410acc 100644
);
}
}
-@@ -654,7 +660,7 @@ static void handleMode(struct Message *msg) {
+@@ -665,7 +671,7 @@ static void handleMode(struct Message *msg) {
hash(msg->user), msg->nick,
(set ? "" : "un"),
self.color, msg->params[0],
@@ -235,7 +236,7 @@ index ef3f2b5..1410acc 100644
);
}
return;
-@@ -811,7 +817,7 @@ static void handleErrorBanListFull(struct Message *msg) {
+@@ -822,7 +828,7 @@ static void handleErrorBanListFull(struct Message *msg) {
require(msg, false, 4);
uiFormat(
idFor(msg->params[1]), Cold, tagTime(msg),
@@ -244,7 +245,7 @@ index ef3f2b5..1410acc 100644
);
}
-@@ -944,14 +950,15 @@ static void handleReplyWhoisIdle(struct Message *msg) {
+@@ -955,14 +961,15 @@ static void handleReplyWhoisIdle(struct Message *msg) {
}
}
char signon[sizeof("0000-00-00 00:00:00")];
@@ -262,7 +263,7 @@ index ef3f2b5..1410acc 100644
);
}
-@@ -986,7 +993,9 @@ static void handleReplyWhoisGeneric(struct Message *msg) {
+@@ -997,7 +1004,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],
@@ -273,7 +274,7 @@ index ef3f2b5..1410acc 100644
);
}
-@@ -1039,7 +1048,7 @@ static bool isMention(const struct Message *msg) {
+@@ -1050,7 +1059,7 @@ static bool isMention(const struct Message *msg) {
const char *match = msg->params[1];
while (NULL != (match = strcasestr(match, self.nick))) {
char a = (match > msg->params[1] ? match[-1] : ' ');
@@ -282,11 +283,24 @@ index ef3f2b5..1410acc 100644
if ((isspace(a) || ispunct(a)) && (isspace(b) || ispunct(b))) {
return true;
}
+diff --git a/ignore.c b/ignore.c
+index 7fecb16..5f463b8 100644
+--- a/ignore.c
++++ b/ignore.c
+@@ -77,7 +77,7 @@ enum Heat ignoreCheck(enum Heat heat, uint id, const struct Message *msg) {
+ snprintf(
+ match, sizeof(match), "%s!%s@%s %s %s %s",
+ msg->nick, msg->user, msg->host,
+- msg->cmd, idNames[id], (msg->params[1] ?: "")
++ msg->cmd, idNames[id], msg->params[1] ? msg->params[1] : ""
+ );
+ for (size_t i = 0; i < ignore.len; ++i) {
+ if (fnmatch(ignore.patterns[i], match, FNM_CASEFOLD)) continue;
diff --git a/ui.c b/ui.c
-index fd9bfab..be1c17a 100644
+index 23f98a0..2f52711 100644
--- a/ui.c
+++ b/ui.c
-@@ -960,7 +960,6 @@ static void keyCode(int code) {
+@@ -971,7 +971,6 @@ static void keyCode(int code) {
break; case KeyMetaGt: windowScroll(window, -WindowLines);
break; case KeyMetaLt: windowScroll(window, +WindowLines);
@@ -294,7 +308,7 @@ index fd9bfab..be1c17a 100644
break; case KeyMetaA: showAuto();
break; case KeyMetaB: edit(id, EditPrevWord, 0);
break; case KeyMetaD: edit(id, EditDeleteNextWord, 0);
-@@ -984,6 +983,12 @@ static void keyCode(int code) {
+@@ -995,6 +994,12 @@ static void keyCode(int code) {
break; case KEY_SEND: windowScroll(window, -WindowLines);
break; case KEY_SHOME: windowScroll(window, +WindowLines);
break; case KEY_UP: windowScroll(window, +1);
@@ -308,5 +322,5 @@ index fd9bfab..be1c17a 100644
}
--
-2.26.2
+2.27.0
diff --git a/pkg/catgirl/ver b/pkg/catgirl/ver
@@ -1 +1 @@
-1.0 r0
+1.0-13-g28c40bd r0
+\ No newline at end of file