From 2f39eabb2ddc945217a92247724e65f4eb485656 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Sat, 9 Nov 2019 08:44:23 -0500 Subject: Define macro for bit flag enums --- bounce.h | 1 + client.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/bounce.h b/bounce.h index 2c997c3..c523227 100644 --- a/bounce.h +++ b/bounce.h @@ -30,6 +30,7 @@ #define SOURCE_URL "https://code.causal.agency/june/pounce" #define ORIGIN "irc.invalid" +#define BIT(x) x##Bit, x = 1 << x##Bit, _##x##Bit = x##Bit #define ARRAY_LEN(a) (sizeof(a) / sizeof(a[0])) typedef unsigned char byte; diff --git a/client.c b/client.c index 32b5b0f..6ac0869 100644 --- a/client.c +++ b/client.c @@ -31,10 +31,10 @@ static size_t count; enum Need { - NeedNick = 1 << 0, - NeedUser = 1 << 1, - NeedPass = 1 << 2, - NeedCapEnd = 1 << 3, + BIT(NeedNick), + BIT(NeedUser), + BIT(NeedPass), + BIT(NeedCapEnd), }; struct Client { -- cgit 1.4.1 rc/'>summary refs log tree commit diff
path: root/bin/pbd.c (unfollow)
Commit message (Expand)Author
2020-07-08Add facebook and twitter to title user-agentJune McEnroe
2020-06-30Tweak causal.agency for mostly no reasonJune McEnroe
2020-06-30Add Ancillary JusticeJune McEnroe
2020-06-26Add password non-manager to planJune McEnroe
2020-06-26Tweak TF2 sensitivities once moreJune McEnroe
2020-06-19Add note about litterbox bot useJune McEnroe
2020-06-19Publish "IRC suite"June McEnroe
2020-06-17Add errors to link.shJune McEnroe