FreeBSD/contrib/ntp/ntpq/ntpq-subs.c
/*
 * clockvar - send a clock variables request with the specified variables
 */
send a clock variables request with the specified variables
send a clock variables request with the specified variables
static void
clockvar(
	struct parse *pcmd,
	FILE *fp
	)
{
	associd_t associd;
	struct varlist tmplist[MAXLIST];
	if (pcmd->nargs == 0 || pcmd->argval[0].uval == 0)
		associd = 0;
	else if ((associd = checkassocid(pcmd->argval[0].uval)) == 0)
		return;
	ZERO(tmplist);
	if (pcmd->nargs >= 2)
		doaddvlist(tmplist, pcmd->argval[1].string);
	dolist(tmplist, associd, CTL_OP_READCLOCK, TYPE_CLOCK, fp);
	doclearvlist(tmplist);
}
static void clockvar ( struct parse * pcmd , FILE * fp ) { associd_t associd ; struct varlist tmplist [ MAXLIST ] ; if ( pcmd -> nargs == 0 || pcmd -> argval [ 0 ] . uval == 0 ) associd = 0 ; else if ( ( associd = checkassocid ( pcmd -> argval [ 0 ] . uval ) ) == 0 ) return ; ZERO ( tmplist ) ; if ( pcmd -> nargs >= 2 ) doaddvlist ( tmplist , pcmd -> argval [ 1 ] . string ) ; dolist ( tmplist , associd , CTL_OP_READCLOCK , TYPE_CLOCK , fp ) ; doclearvlist ( tmplist ) ; }
clockvar - send a clock variables request with the specified variables
clockvar - send a clock variables request with the specified variables
/* HMS: uval? */