diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2000-10-29 15:45:31 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2000-10-29 15:45:31 +0000 |
commit | 1c2598aa2e9f2c09a7f6640589f2c13e07b777cc (patch) | |
tree | 295ac17f63334de5605fea9229d365b7c2c5868a /lib/libfetch | |
parent | badea70002db25126095d5a21d6aac4cfd90c7bf (diff) | |
download | src-1c2598aa2e9f2c09a7f6640589f2c13e07b777cc.tar.gz src-1c2598aa2e9f2c09a7f6640589f2c13e07b777cc.zip |
Add CHECK_FLAGS, a macro for (safely) checking if a particular flag is set.
Notes
Notes:
svn path=/head/; revision=67887
Diffstat (limited to 'lib/libfetch')
-rw-r--r-- | lib/libfetch/common.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libfetch/common.h b/lib/libfetch/common.h index 393010b4b820..4470c5ba9d97 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 |