about summary refs log tree commit diff
path: root/tag.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-09-02 16:13:00 -0400
committerJune McEnroe <june@causal.agency>2018-09-02 16:13:00 -0400
commit240f9ebf8445c6e9a569b40876db0681ffc8a1d0 (patch)
tree63dbb1ae562c3eec80d46d0eba85a8ea11086f85 /tag.c
parentAdd status indicators (diff)
downloadcatgirl-240f9ebf8445c6e9a569b40876db0681ffc8a1d0.tar.gz
catgirl-240f9ebf8445c6e9a569b40876db0681ffc8a1d0.zip
Use PascalCase for constants
Begone underscores.
Diffstat (limited to '')
-rw-r--r--tag.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/tag.c b/tag.c
index 4a89d31..52a82f8 100644
--- a/tag.c
+++ b/tag.c
@@ -21,12 +21,12 @@
 
 #include "chat.h"
 
-const struct Tag TAG_NONE    = { 0, "" };
-const struct Tag TAG_STATUS  = { 1, "(status)" };
-const struct Tag TAG_VERBOSE = { 2, "(irc)" };
+const struct Tag TagNone    = { 0, "" };
+const struct Tag TagStatus  = { 1, "(status)" };
+const struct Tag TagVerbose = { 2, "(irc)" };
 
 static struct {
-	char *name[TAGS_LEN];
+	char *name[TagsLen];
 	size_t len;
 } tags = {
 	.name = { "", "(status)", "(irc)" },
@@ -42,13 +42,13 @@ struct Tag tagFind(const char *name) {
 		if (strcmp(tags.name[id], name)) continue;
 		return Tag(id);
 	}
-	return TAG_NONE;
+	return TagNone;
 }
 
 struct Tag tagFor(const char *name) {
 	struct Tag tag = tagFind(name);
-	if (tag.id != TAG_NONE.id) return tag;
-	if (tags.len == TAGS_LEN) return TAG_STATUS;
+	if (tag.id != TagNone.id) return tag;
+	if (tags.len == TagsLen) return TagStatus;
 	size_t id = tags.len++;
 	tags.name[id] = strdup(name);
 	if (!tags.name[id]) err(EX_OSERR, "strdup");