diff options
Diffstat (limited to 'utils/utils.h')
-rw-r--r-- | utils/utils.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/utils/utils.h b/utils/utils.h index 8f3516e1d..4eb921e3f 100644 --- a/utils/utils.h +++ b/utils/utils.h @@ -40,6 +40,14 @@ #define max(x,y) (((x)>(y))?(x):(y)) #endif +/** + * Calculate length of constant C string. + * + * \param x a constant C string. + * \return the length of C string without its terminating NUL accounted. + */ +#define SLEN(x) (sizeof((x)) - 1) + enum query_response { QUERY_CONTINUE, QUERY_YES, |