diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2022-07-22 20:17:29 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2022-07-22 20:17:29 -0400 |
commit | a70733d9a64320eac8038d733df67467cd97976c (patch) | |
tree | 767c0edc76bafc42e27a23ddad7ff9054d7e5728 /version_compare.h | |
parent | 4a196857e13bd65ef982fe90dae1a1865985ee94 (diff) | |
download | version_compare-a70733d9a64320eac8038d733df67467cd97976c.tar.gz |
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
Diffstat (limited to 'version_compare.h')
-rw-r--r-- | version_compare.h | 18 |
1 files changed, 18 insertions, 0 deletions
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 |