From 747e296ff656813340c9355d98b0a13cba8473bc Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Tue, 4 Dec 2018 21:29:51 -0600 Subject: Add FLAG(x) macro, expanding to (toys.optflags & FLAG_##x) --- toys.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'toys.h') diff --git a/toys.h b/toys.h index 5e71e3fe..4083725a 100644 --- a/toys.h +++ b/toys.h @@ -119,6 +119,8 @@ extern char toybuf[4096], libbuf[4096]; extern char **environ; +#define FLAG(x) (toys.optflags&FLAG_##x) + #define GLOBALS(...) #define ARRAY_LEN(array) (sizeof(array)/sizeof(*array)) #define TAGGED_ARRAY(X, ...) {__VA_ARGS__} -- cgit v1.2.3