/*
* Copyright (C) 1998-2005, 2007, 2009-2012, 2014, 2016, 2017 Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/* $Id$ */
/*! \file */
#include <config.h>
#include <stdio.h>
#include <time.h>
#include <ctype.h>
int secs;
unsigned int l;
/*
* Warning. Do NOT use arguments with side effects with these macros.
*/
while (t < 0) {
return (ISC_R_RANGE);
t += secs;
}
t -= secs;
return (ISC_R_RANGE);
}
t -= secs;
}
while (86400 <= t) {
t -= 86400;
}
while (3600 <= t) {
t -= 3600;
}
while (60 <= t) {
t -= 60;
}
/* yyyy mm dd HH MM SS */
return (ISC_R_NOSPACE);
isc_buffer_add(target, l);
return (ISC_R_SUCCESS);
}
isc_int64_t t;
/*
* Adjust the time to the closest epoch. This should be changed
* to use a 64-bit counterpart to isc_stdtime_get() if one ever
* is defined, but even the current code is good until the year
* 2106.
*/
else
return (t);
}
}
int secs;
int i;
do { \
return (ISC_R_RANGE); \
} while (0)
return (DNS_R_SYNTAX);
/*
* Confirm the source only consists digits. sscanf() allows some
* minor exceptions.
*/
for (i = 0; i < 14; i++) {
return (DNS_R_SYNTAX);
}
return (DNS_R_SYNTAX);
#ifdef __COVERITY__
/*
* Use a simplified range to silence Coverity warning (in
* arithmetic with day below).
*/
#endif /* __COVERITY__ */
/*
* Calculate seconds from epoch.
* Note: this uses a idealized calendar.
*/
for (i = 0; i < (month - 1); i++)
value += 86400;
if (year < 1970) {
for (i = 1969; i >= year; i--) {
}
} else {
for (i = 1970; i < year; i++) {
}
}
return (ISC_R_SUCCESS);
}
if (result != ISC_R_SUCCESS)
return (result);
return (ISC_R_SUCCESS);
}