Mercurial > hg > fxanalyse
diff utils.h @ 215:e925664b4b1b
Add streq() and strneq() definitions to utils.h
author | Daniele Nicolodi <daniele.nicolodi@obspm.fr> |
---|---|
date | Mon, 14 Apr 2014 12:46:14 +0200 |
parents | 97112b45b838 |
children |
line wrap: on
line diff
--- a/utils.h Mon Apr 14 12:45:23 2014 +0200 +++ b/utils.h Mon Apr 14 12:46:14 2014 +0200 @@ -12,6 +12,9 @@ #define MIN(x, y) (x) < (y) ? (x) : (y) #endif +#define streq(x, y) (strcmp((x), (y)) == 0) +#define strneq(x, y, n) (strncmp((x), (y), (n)) == 0) + /* format floating points numbers accordingly to fmt and asdd thousands separator */ const char * thousands(char *buffer, int size, char *fmt, double val);