From dfc3ac95c1a59a9a593bd9ec08dbc99e03d4b7d2 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Wed, 9 Jun 2021 11:56:49 -0400 Subject: Remove catf --- chat.h | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'chat.h') diff --git a/chat.h b/chat.h index b82c4c9..e75112a 100644 --- a/chat.h +++ b/chat.h @@ -56,22 +56,6 @@ static inline char *seprintf(char *ptr, char *end, const char *fmt, ...) { return (ptr > end ? end : ptr); } -struct Cat { - char *buf; - size_t cap; - size_t len; -}; -static inline void __attribute__((format(printf, 2, 3))) -catf(struct Cat *cat, const char *format, ...) { - va_list ap; - va_start(ap, format); - int len = vsnprintf(&cat->buf[cat->len], cat->cap - cat->len, format, ap); - assert(len >= 0); - va_end(ap); - cat->len += len; - if (cat->len >= cat->cap) cat->len = cat->cap - 1; -} - enum Attr { BIT(Bold), BIT(Reverse), -- cgit 1.4.1