diff options
Diffstat (limited to 'support/dktools/dk4ufic.ctr')
-rw-r--r-- | support/dktools/dk4ufic.ctr | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/support/dktools/dk4ufic.ctr b/support/dktools/dk4ufic.ctr index e32216d0a9..70d47eca2a 100644 --- a/support/dktools/dk4ufic.ctr +++ b/support/dktools/dk4ufic.ctr @@ -2,7 +2,7 @@ copyright owner = Dirk Krause copyright year = 2015-xxxx -license = bsd +SPDX-License-Identifier: BSD-3-Clause %% header @@ -11,8 +11,20 @@ license = bsd Compare unique file identifiers. */ +#ifndef DK4CONF_H_INCLUDED +#if DK4_BUILDING_DKTOOLS4 +#include "dk4conf.h" +#else +#include <dktools-4/dk4conf.h> +#endif +#endif + #ifndef DK4UFIT_H_INCLUDED +#if DK4_BUILDING_DKTOOLS4 #include "dk4ufit.h" +#else +#include <dktools-4/dk4ufit.h> +#endif #endif #ifdef __cplusplus @@ -34,11 +46,20 @@ dk4ufi_compare(const dk4_ufi_t *l, const dk4_ufi_t *r); %% module +#include "dk4conf.h" #include "dk4ufic.h" + + +$!trace-include + + + int dk4ufi_compare(const dk4_ufi_t *l, const dk4_ufi_t *r) { + int back = 0; + $? "+ dk4ufi_compare" if (NULL != l) { if (NULL != r) { #if DK4_ON_WINDOWS @@ -69,21 +90,22 @@ dk4ufi_compare(const dk4_ufi_t *l, const dk4_ufi_t *r) } #else if (l->dev > r->dev) { - back = 1; + back = 1; $? ". left dev larger" } else { if (l->dev < r->dev) { - back = -1; + back = -1; $? ". right dev larger" } } if (0 == back) { if (l->ino > r->ino) { - back = 1; + back = 1; $? ". left ino larger" } else { if (l->ino < r->ino) { - back = -1; + back = -1; $? ". right ino larger" } } } + $? ". %lu/%lu %lu/%lu", (unsigned long)(l->dev), (unsigned long)(l->ino), (unsigned long)(r->dev), (unsigned long)(r->ino) #endif } else { back = 1; @@ -93,5 +115,7 @@ dk4ufi_compare(const dk4_ufi_t *l, const dk4_ufi_t *r) back = -1; } } + $? "- dk4ufi_compare %d", back + return back; } |