mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
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>
This commit is contained in:
parent
496643291e
commit
4d7ac43ff7
3 changed files with 150 additions and 1 deletions
|
@ -148,6 +148,9 @@ char **strsplit (char *string, char delim, char replacement, int *count);
|
|||
/* Tokenize STRING using the set of delimiters in DELIM. */
|
||||
char **strtokenize (const char *string, const char *delim);
|
||||
|
||||
/* Return True if MYVERSION is greater or equal than REQ_VERSION. */
|
||||
int compare_version_strings (const char *my_version, const char *req_version);
|
||||
|
||||
/* Format a string so that it fits within about TARGET_COLS columns. */
|
||||
char *format_text (char *text, int in_place, int target_cols, int max_cols);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue