From a70733d9a64320eac8038d733df67467cd97976c Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Fri, 22 Jul 2022 20:17:29 -0400 Subject: Implement test harnass * Fix various memory leaks * Fix off by one error in rsplit * main program is a wrapper for the vcmp library entry() function * Implement basic CI --- version_compare.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 version_compare.h (limited to 'version_compare.h') diff --git a/version_compare.h b/version_compare.h new file mode 100644 index 0000000..a951e53 --- /dev/null +++ b/version_compare.h @@ -0,0 +1,18 @@ +#ifndef VERSION_COMPARE_VERSION_COMPARE_H +#define VERSION_COMPARE_VERSION_COMPARE_H + +#define GT 1 << 1 +#define LT 1 << 2 +#define EQ 1 << 3 +#define NOT 1 << 4 + +int isempty(char *str); +char *lstrip(char **s); +char *rstrip(char **s); +char *collapse_whitespace(char **s); +int version_sum(const char *str); +int version_parse_operator(char *str); +int version_compare(int flags, const char *aa, const char *bb); +int entry(int argc, char *argv[]); + +#endif //VERSION_COMPARE_VERSION_COMPARE_H \ No newline at end of file -- cgit