From 096562c0b14656354fcb0eb7b7c6d524f5fb1f1d Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Thu, 5 Oct 2017 16:46:18 +0300 Subject: Improved applications versions handling. --- src/nxt_string.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/nxt_string.h') diff --git a/src/nxt_string.h b/src/nxt_string.h index 56dc18d7..2a3d55ea 100644 --- a/src/nxt_string.h +++ b/src/nxt_string.h @@ -16,6 +16,10 @@ nxt_lowcase(c) \ nxt_upcase(c) \ (u_char) ((c >= 'a' && c <= 'z') ? c & ~0x20 : c) +#define \ +nxt_isdigit(c) \ + ((u_char) ((c) - '0') <= 9) + #define NXT_CR (u_char) 13 #define NXT_LF (u_char) 10 @@ -171,4 +175,9 @@ nxt_strchr_start(s, c) \ (((s)->length != 0) && ((s)->start[0] == c)) +NXT_EXPORT nxt_int_t nxt_strverscmp(const u_char *s1, const u_char *s2); +NXT_EXPORT nxt_bool_t nxt_strvers_match(u_char *version, u_char *prefix, + size_t length); + + #endif /* _NXT_STRING_H_INCLUDED_ */ -- cgit