From 08c3f380313a1262729bd0dbbbf5a85b6f695e81 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Thu, 16 Feb 2017 22:30:01 +0000 Subject: util: add a vercmp function to compare version numbers It is simple, supports simple x.y.z type numeric versions, and does not attempt any kind of validation --- src/common/util.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/common/util.h') diff --git a/src/common/util.h b/src/common/util.h index c2ffc44ca..bef4b6202 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -183,4 +183,5 @@ namespace tools unsigned get_max_concurrency(); bool is_local_address(const std::string &address); + int vercmp(const char *v0, const char *v1); // returns < 0, 0, > 0, similar to strcmp, but more human friendly than lexical - does not attempt to validate } -- cgit v1.2.3