summary refs log tree commit diff
path: root/tag.c
diff options
context:
space:
mode:
Diffstat (limited to 'tag.c')
-rw-r--r--tag.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/tag.c b/tag.c
index 649ac49..5b4232e 100644
--- a/tag.c
+++ b/tag.c
@@ -23,37 +23,31 @@
 
 static struct {
 	char *name[TagsLen];
-	enum IRCColor color[TagsLen];
 	size_t len;
 } tags = {
 	.name = { "<none>", "<status>", "<raw>" },
-	.color = { IRCBlack, IRCDefault, IRCRed },
 	.len = 3,
 };
 
-const struct Tag TagNone   = { 0, "<none>", IRCBlack };
-const struct Tag TagStatus = { 1, "<status>", IRCDefault };
-const struct Tag TagRaw    = { 2, "<raw>", IRCRed };
+const struct Tag TagNone   = { 0, "<none>" };
+const struct Tag TagStatus = { 1, "<status>" };
+const struct Tag TagRaw    = { 2, "<raw>" };
 
 struct Tag tagFind(const char *name) {
 	for (size_t id = 0; id < tags.len; ++id) {
 		if (strcmp(tags.name[id], name)) continue;
-		return (struct Tag) { id, tags.name[id], tags.color[id] };
+		return (struct Tag) { id, tags.name[id] };
 	}
 	return TagNone;
 }
 
-struct Tag tagFor(const char *name, enum IRCColor color) {
+struct Tag tagFor(const char *name) {
 	struct Tag tag = tagFind(name);
-	if (tag.id != TagNone.id) {
-		tag.color = tags.color[tag.id] = color;
-		return tag;
-	}
+	if (tag.id != TagNone.id) return tag;
 	if (tags.len == TagsLen) return TagStatus;
 
 	size_t id = tags.len++;
 	tags.name[id] = strdup(name);
-	tags.color[id] = color;
 	if (!tags.name[id]) err(EX_OSERR, "strdup");
-	return (struct Tag) { id, tags.name[id], color };
+	return (struct Tag) { id, tags.name[id] };
 }
-26 19:53:38 -0500'>2021-01-26Rename and move scroll functions closer to where they are usedJune McEnroe 2021-01-26Factor out windowReflowJune McEnroe 2021-01-26Use Warm heat for replies to user-initiated commandsJune McEnroe 2021-01-26Clarify configuration path interpretationsJune McEnroe 2021-01-26Tighten up XDG base directory path handlingJune McEnroe 2021-01-26Expand the opening paragraph of the manualJune McEnroe 2021-01-25Disable notify in restricted modeJune McEnroe 2021-01-25Don't print timestamps for blank lines in bufferListJune McEnroe 2021-01-25Do not copy time to wrapped linesJune McEnroe 2021-01-25Add protocol coverage to non-features listJune McEnroe 2021-01-25Move mention of pledge(2) and unveil(2) to READMEJune McEnroe 2021-01-23Preserve order of filters when removingJune McEnroe 2021-01-23Fix /unignore commandJune McEnroe 2021-01-23Remove use of "%n" to appease de RaadtJune McEnroe 2021-01-23Drop filesystem access iff possibleKlemens Nanni 2021-01-23Drop exec capability iff restrictedKlemens Nanni 2021-01-23Drop network capability after ircConnect()Klemens Nanni 2021-01-23Call pledge(2) after unveil(2)Klemens Nanni 2021-01-23Separate kiosk mode from restrict modeJune McEnroe 2021-01-21Simplify windowUpdate loops and factor out windowTopJune McEnroe 2021-01-21Document that M-l shows timestampsJune McEnroe 2021-01-19Don't lose swapped window when navigating to current bufferJeremy O'Brien 2021-01-19Use Warm heat for manually inserted blank linesJune McEnroe 2021-01-18Add example tmux(1) configKlemens Nanni 2021-01-17Use Warm heat for blank linesJune McEnroe 2021-01-16Add -I highlight option and /highlightJune McEnroe