FreeBSD/contrib/ntp/ntpq/ntpq.c
/*
 * ntpq_custom_opt_handler - autoopts handler for -c and -p
 *
 * By default, autoopts loses the relative order of -c and -p options
 * on the command line.  This routine replaces the default handler for
 * those routines and builds a list of commands to execute preserving
 * the order.
 */
autoopts handler for -c and -p
By default, autoopts loses the relative order of -c and -p options
on the command line.  This routine replaces the default handler for
those routines and builds a list of commands to execute preserving
the order.
autoopts handler for - c and - p By default autoopts loses the relative order of - c and - p options on the command line . This routine replaces the default handler for those routines and builds a list of commands to execute preserving the order .
void
ntpq_custom_opt_handler(
	tOptions *pOptions,
	tOptDesc *pOptDesc
	)
{
	switch (pOptDesc->optValue) {
	default:
		fprintf(stderr,
			"ntpq_custom_opt_handler unexpected option '%c' (%d)\n",
			pOptDesc->optValue, pOptDesc->optValue);
		exit(1);
	case 'c':
		ADDCMD(pOptDesc->pzLastArg);
		break;
	case 'p':
		ADDCMD("peers");
		break;
	}
}
void ntpq_custom_opt_handler ( tOptions * pOptions , tOptDesc * pOptDesc ) { switch ( pOptDesc -> optValue ) { default : fprintf ( stderr , " \n " , pOptDesc -> optValue , pOptDesc -> optValue ) ; exit ( 1 ) ; case ' ' : ADDCMD ( pOptDesc -> pzLastArg ) ; break ; case ' ' : ADDCMD ( " " ) ; break ; } }
ntpq_custom_opt_handler - autoopts handler for -c and -p
 By default, autoopts loses the relative order of -c and -p options
 on the command line.
ntpq_custom_opt_handler - autoopts handler for - c and - p By default autoopts loses the relative order of - c and - p options on the command line .