diff --git a/configure.ac b/configure.ac index 4993c36..9f96d73 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([dfshow], [0.8.0], [https://github.com/roberthawdon/dfshow/issues]) +AC_INIT([dfshow], [0.8.1], [https://github.com/roberthawdon/dfshow/issues]) AC_GNU_SOURCE AM_INIT_AUTOMAKE([subdir-objects]) AC_PROG_CC diff --git a/docs/source/conf.py b/docs/source/conf.py index 051d530..3f8ee5e 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -26,7 +26,7 @@ # The short X.Y version version = '' # The full version, including alpha/beta/rc tags -release = '0.8.0-beta' +release = '0.8.1-beta' # -- General configuration --------------------------------------------------- diff --git a/src/showfunctions.c b/src/showfunctions.c index 0e7e720..d8b8b56 100644 --- a/src/showfunctions.c +++ b/src/showfunctions.c @@ -1275,32 +1275,56 @@ int cmp_dflist_name(const void *lhs, const void *rhs) int cmp_dflist_date(const void *lhs, const void *rhs) { + time_t compare; + int output; results *dforderA = (results *)lhs; results *dforderB = (results *)rhs; if (reverse){ // Oldest to Newest - return (dforderA->date - dforderB->date); + compare = (dforderA->date - dforderB->date); } else { // Newest to Oldest - return (dforderB->date - dforderA->date); + compare = (dforderB->date - dforderA->date); } + if (compare > 0){ + output = 1; + } else if (compare < 0) { + output = -1; + } else { + output = 0; + } + + return output; + } int cmp_dflist_size(const void *lhs, const void *rhs) { + ptrdiff_t compare; + int output; results *dforderA = (results *)lhs; results *dforderB = (results *)rhs; - if (reverse) { - // Smallest to largest - return (dforderA->size - dforderB->size); + if (reverse){ + // Smallest to Largest + compare = (dforderA->size - dforderB->size); } else { - // Largest to smallest - return (dforderB->size - dforderA->size); + // Largest to Smallest + compare = (dforderB->size - dforderA->size); } + if (compare > 0){ + output = 1; + } else if (compare < 0) { + output = -1; + } else { + output = 0; + } + + return output; + } int check_object(const char *object){