diff options
author | Jim Meyering <meyering@redhat.com> | 2009-11-09 19:50:22 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2009-11-09 22:34:16 +0100 |
commit | 7cd4b6aeee3693463b03608a31cf53f21152c2e8 (patch) | |
tree | 4b05909a6d950e687088b4dfc238d80ac8b81acd /src/guestfs.h | |
parent | e645763007e7097c14c1c3ba94010f2e32e536bf (diff) | |
download | libguestfs-7cd4b6aeee3693463b03608a31cf53f21152c2e8.tar.gz libguestfs-7cd4b6aeee3693463b03608a31cf53f21152c2e8.tar.xz libguestfs-7cd4b6aeee3693463b03608a31cf53f21152c2e8.zip |
define STREQ, STRNEQ, STREQLEN, STRCASEQ, etc.
* src/guestfs.h: Define STREQ and company.
* daemon/daemon.h: Likewise.
* hivex/hivex.h: Likewise.
Diffstat (limited to 'src/guestfs.h')
-rw-r--r-- | src/guestfs.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/guestfs.h b/src/guestfs.h index 35f995d1..e89f7443 100644 --- a/src/guestfs.h +++ b/src/guestfs.h @@ -30,6 +30,16 @@ extern "C" { #endif +#define STREQ(a,b) (strcmp((a),(b)) == 0) +#define STRCASEEQ(a,b) (strcasecmp((a),(b)) == 0) +#define STRNEQ(a,b) (strcmp((a),(b)) != 0) +#define STRCASENEQ(a,b) (strcasecmp((a),(b)) != 0) +#define STREQLEN(a,b,n) (strncmp((a),(b),(n)) == 0) +#define STRCASEEQLEN(a,b,n) (strncasecmp((a),(b),(n)) == 0) +#define STRNEQLEN(a,b,n) (strncmp((a),(b),(n)) != 0) +#define STRCASENEQLEN(a,b,n) (strncasecmp((a),(b),(n)) != 0) +#define STRPREFIX(a,b) (strncmp((a),(b),strlen((b))) == 0) + typedef struct guestfs_h guestfs_h; /* Connection management. */ |