about summary refs log tree commit diff
path: root/tag.c
diff options
context:
space:
mode:
Diffstat (limited to 'tag.c')
-rw-r--r--tag.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tag.c b/tag.c
index 397c191..4a89d31 100644
--- a/tag.c
+++ b/tag.c
@@ -37,11 +37,17 @@ static struct Tag Tag(size_t id) {
 	return (struct Tag) { id, tags.name[id] };
 }
 
-struct Tag tagFor(const char *name) {
+struct Tag tagFind(const char *name) {
 	for (size_t id = 0; id < tags.len; ++id) {
 		if (strcmp(tags.name[id], name)) continue;
 		return Tag(id);
 	}
+	return TAG_NONE;
+}
+
+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;
 	size_t id = tags.len++;
 	tags.name[id] = strdup(name);
src/commit/www/photo.causal.agency/generate.sh?id=6f35229b87e64472805ba83e70bac5d8f90cb3e0&follow=1'>Use monospace on photo pagesJune McEnroe 2024-06-09Put lens and (future) film at the tops of photo pagesJune McEnroe 2024-05-22Remove use of sysexits.hJune McEnroe 2024-05-22Add photo descriptions from 05-03 and 05-06June McEnroe 2024-05-21Fix = precedence in whenJune McEnroe