summaryrefslogtreecommitdiffstats
path: root/lib/libfetch
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2000-10-29 15:45:31 +0000
committerdes <des@FreeBSD.org>2000-10-29 15:45:31 +0000
commitf8eaa3d8016b5b89b5f98f3e579e75ed926fc118 (patch)
treea25413f3ebb96db8f9355c8de4934ff671b86df4 /lib/libfetch
parentfdc38d445ee2556fe89b3cd95927d79e50816b92 (diff)
downloadFreeBSD-src-f8eaa3d8016b5b89b5f98f3e579e75ed926fc118.zip
FreeBSD-src-f8eaa3d8016b5b89b5f98f3e579e75ed926fc118.tar.gz
Add CHECK_FLAGS, a macro for (safely) checking if a particular flag is set.
Diffstat (limited to 'lib/libfetch')
-rw-r--r--lib/libfetch/common.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libfetch/common.h b/lib/libfetch/common.h
index 393010b..4470c5b 100644
--- a/lib/libfetch/common.h
+++ b/lib/libfetch/common.h
@@ -71,4 +71,9 @@ int _fetch_add_entry(struct url_ent **p, int *size, int *len,
FILE *_http_request(struct url *URL, char *op, struct url_stat *us,
struct url *purl, char *flags);
+/*
+ * Check whether a particular flag is set
+ */
+#define CHECK_FLAG(x) (flags && strchr(flags, (x)))
+
#endif
OpenPOWER on IntegriCloud