about summary refs log tree commit diff
path: root/chat.h
diff options
context:
space:
mode:
Diffstat (limited to 'chat.h')
-rw-r--r--chat.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/chat.h b/chat.h
index 39be36e..4e9a230 100644
--- a/chat.h
+++ b/chat.h
@@ -194,8 +194,22 @@ void completeClear(size_t id);
 size_t completeID(const char *str);
 enum Color completeColor(size_t id, const char *str);
 
-extern const char *urlOpenUtil;
-extern const char *urlCopyUtil;
+enum { UtilCap = 16 };
+struct Util {
+	size_t argc;
+	const char *argv[UtilCap];
+};
+
+static inline void utilPush(struct Util *util, const char *arg) {
+	if (1 + util->argc < UtilCap) {
+		util->argv[util->argc++] = arg;
+	} else {
+		errx(EX_CONFIG, "too many utility arguments");
+	}
+}
+
+extern struct Util urlOpenUtil;
+extern struct Util urlCopyUtil;
 void urlScan(size_t id, const char *nick, const char *mesg);
 void urlOpenCount(size_t id, size_t count);
 void urlOpenMatch(size_t id, const char *str);
db6e6e31091bc7b68&follow=1'>Don't do carriage return on line feedJune McEnroe 2019-07-11Interpret 256color-style SGRsJune McEnroe 2019-07-11Use inline style rather than <b>, <i>, <u>June McEnroe 2019-07-11Factor out clearJune McEnroe 2019-07-11Add bright option to shottyJune McEnroe 2019-07-11Output <b>, <i>, <u> in shottyJune McEnroe 2019-07-10Ignore SM and RMJune McEnroe 2019-07-09Add shotty man page and build itJune McEnroe 2019-07-09Add up -cJune McEnroe 2019-07-09Add options for default colors to shottyJune McEnroe 2019-07-08Use char literals consistentlyJune McEnroe