extern void authtrust P((keyid_t, u_long));
extern int authusekey P((keyid_t, int, const u_char *));
-extern u_long calleapwhen P((u_long));
extern u_long calyearstart P((u_long));
extern const char *clockname P((int));
extern int clocktime P((int, int, int, int, int, u_long, u_long *, u_int32 *));
EXTRA_LIBRARIES = libntpsim.a
libntp_a_SRCS = a_md5encrypt.c adjtime.c atoint.c atolfp.c atouint.c \
audio.c authkeys.c authreadkeys.c authusekey.c buftvtots.c \
- caljulian.c calleapwhen.c caltontp.c calyearstart.c clocktime.c \
+ caljulian.c caltontp.c calyearstart.c clocktime.c \
clocktypes.c decodenetnum.c dofptoa.c dolfptoa.c emalloc.c \
findconfig.c fptoa.c fptoms.c getopt.c hextoint.c \
hextolfp.c humandate.c icom.c inttoa.c iosignal.c \
+++ /dev/null
-/*
- * calleapwhen - determine the number of seconds to the next possible
- * leap occurance.
- */
-#include <sys/types.h>
-
-#include "ntp_types.h"
-#include "ntp_calendar.h"
-#include "ntp_stdlib.h"
-
-/*
- * calleaptab - leaps occur at the end of December and June
- */
-long calleaptab[10] = {
- -(JAN+FEBLEAP)*SECSPERDAY, /* leap previous to cycle */
- (MAR+APR+MAY+JUN)*SECSPERDAY, /* end of June */
- (MAR+APR+MAY+JUN+JUL+AUG+SEP+OCT+NOV+DEC)*SECSPERDAY, /* end of Dec */
- (MAR+APR+MAY+JUN)*SECSPERDAY + SECSPERYEAR,
- (MAR+APR+MAY+JUN+JUL+AUG+SEP+OCT+NOV+DEC)*SECSPERDAY + SECSPERYEAR,
- (MAR+APR+MAY+JUN)*SECSPERDAY + 2*SECSPERYEAR,
- (MAR+APR+MAY+JUN+JUL+AUG+SEP+OCT+NOV+DEC)*SECSPERDAY + 2*SECSPERYEAR,
- (MAR+APR+MAY+JUN)*SECSPERDAY + 3*SECSPERYEAR,
- (MAR+APR+MAY+JUN+JUL+AUG+SEP+OCT+NOV+DEC)*SECSPERDAY + 3*SECSPERYEAR,
- (MAR+APR+MAY+JUN+JUL+AUG+SEP+OCT+NOV+DEC+JAN+FEBLEAP+MAR+APR+MAY+JUN)
- *SECSPERDAY + 3*SECSPERYEAR, /* next after current cycle */
-};
-
-u_long
-calleapwhen(
- u_long ntpdate
- )
-{
- register u_long dateincycle;
- register int i;
-
- /*
- * Find the offset from the start of the cycle
- */
- dateincycle = ntpdate;
- if (dateincycle >= MAR1988)
- dateincycle -= MAR1988;
- else
- dateincycle -= MAR1900;
-
- while (dateincycle >= SECSPERCYCLE)
- dateincycle -= SECSPERCYCLE;
-
- /*
- * Find where we are with respect to the leap events.
- */
- for (i = 1; i < 9; i++)
- if (dateincycle < (u_long)calleaptab[i])
- break;
-
- /*
- * i points at the next leap. Compute the last and the next.
- */
- return (u_long)(calleaptab[i] - (long)dateincycle);
-}