From 1f457376b478257b88d4a857f5ec1b6155442dd7 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sun, 20 Sep 2020 03:03:26 +0000 Subject: CTAN sync 202009200303 --- support/dktools/dk4ufic.ctr | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) (limited to 'support/dktools/dk4ufic.ctr') 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 +#endif +#endif + #ifndef DK4UFIT_H_INCLUDED +#if DK4_BUILDING_DKTOOLS4 #include "dk4ufit.h" +#else +#include +#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; } -- cgit v1.2.3