common: New function compare_version_strings.
authorWerner Koch <wk@gnupg.org>
Fri, 8 Jan 2016 07:58:21 +0000 (08:58 +0100)
committerWerner Koch <wk@gnupg.org>
Fri, 8 Jan 2016 07:58:21 +0000 (08:58 +0100)
commit4d7ac43ff71fdadfd2e04621f74840a82fbe788a
treeacdc15bbc063cec98d836327a8129ccbf0aaaef2
parent496643291e1e346434e9c98405c5a370957eb7d3
common: New function compare_version_strings.

* common/stringhelp.c (parse_version_number): New.
(parse_version_string): New.
(compare_version_strings): New.
* common/t-stringhelp.c (test_compare_version_strings): New.
(main): Call test.  Return ERRCOUNT instead of 0.
--

The code for that function is based on code from libgcrypt.  Similar
code is in all GnuPG related libraries this function is
a candidates for inclusion in libgpg-error.

Signed-off-by: Werner Koch <wk@gnupg.org>
common/stringhelp.c
common/stringhelp.h
common/t-stringhelp.c