FreeBSD/contrib/ntp/ntpd/refclock_wwv.c
/*
 * carry - process digit
 *
 * This routine rotates a likelihood vector one position and increments
 * the clock digit modulo the radix. It returns the new clock digit or
 * zero if a carry occurred. Once synchronized, the clock digit will
 * match the maximum-likelihood digit corresponding to that position.
 */
process digit
This routine rotates a likelihood vector one position and increments
the clock digit modulo the radix. It returns the new clock digit or
zero if a carry occurred. Once synchronized, the clock digit will
match the maximum-likelihood digit corresponding to that position.
process digit This routine rotates a likelihood vector one position and increments the clock digit modulo the radix . It returns the new clock digit or zero if a carry occurred . Once synchronized the clock digit will match the maximum - likelihood digit corresponding to that position .
static int
carry(
	struct decvec *dp	
	)
{
	int temp;
	int j;
	dp->digit++;
	if (dp->digit == dp->radix)
		dp->digit = 0;
	temp = dp->like[dp->radix - 1];
	for (j = dp->radix - 1; j > 0; j--)
		dp->like[j] = dp->like[j - 1];
	dp->like[0] = temp;
	return (dp->digit);
}
static int carry ( struct decvec * dp ) { int temp ; int j ; dp -> digit ++ ; if ( dp -> digit == dp -> radix ) dp -> digit = 0 ; temp = dp -> like [ dp -> radix - 1 ] ; for ( j = dp -> radix - 1 ; j > 0 ; j -- ) dp -> like [ j ] = dp -> like [ j - 1 ] ; dp -> like [ 0 ] = temp ; return ( dp -> digit ) ; }
carry - process digit
 This routine rotates a likelihood vector one position and increments
 the clock digit modulo the radix.
carry - process digit This routine rotates a likelihood vector one position and increments the clock digit modulo the radix .
/* decoding table pointer */