|
Greenbone Vulnerability Management Libraries 22.20.0
|
Functions to handle version numbers / version strings. More...
#include "versionutils.h"#include <assert.h>#include <ctype.h>#include <errno.h>#include <glib.h>#include <string.h>Macros | |
| #define | G_LOG_DOMAIN "libgvm util" |
| GLib logging domain. More... | |
Functions | |
| static gchar * | prepare_version_string (const char *version) |
| Prepare the version string for comparison. More... | |
| static int | get_release_state (const char *version, int index) |
| Gets the release state of a specified part of the version string if any. More... | |
| static char * | get_part (const char *version, int index) |
| Gets the part of the version string that is specified by index. More... | |
| static gboolean | is_text (const char *part) |
| Checks if a given part of the version string is plain text. More... | |
| static char * | str_cpy (char *source, int size) |
| Copy size characters of a string to an newly allocated new string. More... | |
| int | cmp_versions (const char *version1, const char *version2) |
| Compare two version strings representing a software version to decide which version is newer. More... | |
Functions to handle version numbers / version strings.
Up to now this library provides a function to compare two version numbers / two version strings to decide which version is the newer one.
| #define G_LOG_DOMAIN "libgvm util" |
GLib logging domain.
| int cmp_versions | ( | const char * | version1, |
| const char * | version2 | ||
| ) |
Compare two version strings representing a software version to decide which version is newer.
| [in] | version1 | The first version string to compare. |
| [in] | version2 | The second version string to compare. |
|
static |
Gets the part of the version string that is specified by index.
| [in] | version | The version string to get the part from. |
| [in] | index | The part of the version string to return. |
|
static |
Gets the release state of a specified part of the version string if any.
| [in] | version | The version string to get the release state from. |
| [in] | index | The part of the version string to check. |
|
static |
Checks if a given part of the version string is plain text.
| [in] | part | The part of the version string to check. |
|
static |
Prepare the version string for comparison.
| [in] | version | The version string to generate the prepared version string from. |
|
static |
Copy size characters of a string to an newly allocated new string.
| [in] | src | The string the first size characters are to be copied from. |
| [in] | size | The number of characters to copy. |