FreeBSD/contrib/ntp/ntpdate/ntpdate.c
/*
 * This fuction is not the same as lib/systime step_systime!!!
 */
This fuction is not the same as lib/systime step_systime
This fuction is not the same as lib / systime step_systime
static int
l_step_systime(
	l_fp *ts
	)
{
	double dtemp;
#ifdef SLEWALWAYS
#ifdef STEP_SLEW
	l_fp ftmp;
	int isneg;
	int n;
	if (debug) return 1;
	ftmp = *ts;
	if (L_ISNEG(&ftmp)) {
		L_NEG(&ftmp);
		isneg = 1;
	} else
		isneg = 0;
	if (ftmp.l_ui >= 3) {		
		LFPTOD(ts, dtemp);
		n = step_systime(dtemp);
		if (!n)
			return n;
		if (isneg)
			ts->l_ui = ~0;
		else
			ts->l_ui = ~0;
	}
#endif
	if (debug)
		return 1;
#ifdef FORCE_NTPDATE_STEP
	LFPTOD(ts, dtemp);
	return step_systime(dtemp);
#else
	l_adj_systime(ts);
	return 1;
#endif
#else 
	if (debug)
		return 1;
	LFPTOD(ts, dtemp);
	return step_systime(dtemp);
#endif	
}
static int l_step_systime ( l_fp * ts ) { double dtemp ; #ifdef SLEWALWAYS #ifdef STEP_SLEW l_fp ftmp ; int isneg ; int n ; if ( debug ) return 1 ; ftmp = * ts ; if ( L_ISNEG ( & ftmp ) ) { L_NEG ( & ftmp ) ; isneg = 1 ; } else isneg = 0 ; if ( ftmp . l_ui >= 3 ) { LFPTOD ( ts , dtemp ) ; n = step_systime ( dtemp ) ; if ( ! n ) return n ; if ( isneg ) ts -> l_ui = ~ 0 ; else ts -> l_ui = ~ 0 ; } #endif if ( debug ) return 1 ; #ifdef FORCE_NTPDATE_STEP LFPTOD ( ts , dtemp ) ; return step_systime ( dtemp ) ; #else l_adj_systime ( ts ) ; return 1 ; #endif #else if ( debug ) return 1 ; LFPTOD ( ts , dtemp ) ; return step_systime ( dtemp ) ; #endif }
This fuction is not the same as lib/systime step_systime!!
This fuction is not the same as lib / systime step_systime!!
/*
	 * Take the absolute value of the offset
	 */ /* Step it and slew - we might win */ /*
	 * Just add adjustment into the current offset.  The update
	 * routine will take care of bringing the system clock into
	 * line.
	 */ /* SLEWALWAYS */ /* SLEWALWAYS */