/* Copyright (C) 2015-2020, Dirk Krause SPDX-License-Identifier: BSD-3-Clause */ /* WARNING: This file was generated by the dkct program (see http://dktools.sourceforge.net/ for details). Changes you make here will be lost if dkct is run again! You should modify the original source and run dkct on it. Original source: dk4ftime.ctr */ /** @file dk4ftime.c The dk4ftime module. */ #line 207 "dk4ftime.ctr" #include "dk4conf.h" #include "dk4ftime.h" #if !DK4_ON_WINDOWS #include "dk4timedk.h" #endif int dk4filetime_compare(const dk4_file_time_t *l, const dk4_file_time_t *r) { int back = 0; if (NULL != l) { if (NULL != r) { #if DK4_ON_WINDOWS if (l->dwHighDateTime > r->dwHighDateTime) { back = 1; } else { if (l->dwHighDateTime < r->dwHighDateTime) { back = -1; } else { if (l->dwLowDateTime > r->dwLowDateTime) { back = 1; } else { if (l->dwLowDateTime < r->dwLowDateTime) { back = -1; } } } } #else if (*l > *r) { back = 1; } else { if (*l < *r) { back = -1; } } #endif } else { back = 1; } } else { if (NULL != r) { back = -1; } } return back; }