summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_string.h
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2017-10-05 16:46:18 +0300
committerValentin Bartenev <vbart@nginx.com>2017-10-05 16:46:18 +0300
commit096562c0b14656354fcb0eb7b7c6d524f5fb1f1d (patch)
treeefd6dd7b94951778e132d84591d77ae8d7ecf469 /src/nxt_string.h
parent653e9854637e129cd6a92adaff96784220165eea (diff)
downloadunit-096562c0b14656354fcb0eb7b7c6d524f5fb1f1d.tar.gz
unit-096562c0b14656354fcb0eb7b7c6d524f5fb1f1d.tar.bz2
Improved applications versions handling.
Diffstat (limited to 'src/nxt_string.h')
-rw-r--r--src/nxt_string.h9
1 files changed, 9 insertions, 0 deletions
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_ */