FreeBSD/contrib/ntp/ntpdc/ntpdc.c
/*
 * printusage - print usage information for a command
 */
print usage information for a command
print usage information for a command
static void
printusage(
	struct xcmd *xcp,
	FILE *fp
	)
{
	int i, opt46;
	opt46 = 0;
	(void) fprintf(fp, "usage: %s", xcp->keyword);
	for (i = 0; i < MAXARGS && xcp->arg[i] != NO; i++) {
		if (opt46 == 0 && (xcp->arg[i] & ~OPT) == NTP_ADD) {
			(void) fprintf(fp, " [ -4|-6 ]");
			opt46 = 1;
		}
		if (xcp->arg[i] & OPT)
		    (void) fprintf(fp, " [ %s ]", xcp->desc[i]);
		else
		    (void) fprintf(fp, " %s", xcp->desc[i]);
	}
	(void) fprintf(fp, "\n");
}
static void printusage ( struct xcmd * xcp , FILE * fp ) { int i , opt46 ; opt46 = 0 ; ( void ) fprintf ( fp , " " , xcp -> keyword ) ; for ( i = 0 ; i < MAXARGS && xcp -> arg [ i ] != NO ; i ++ ) { if ( opt46 == 0 && ( xcp -> arg [ i ] & ~ OPT ) == NTP_ADD ) { ( void ) fprintf ( fp , " " ) ; opt46 = 1 ; } if ( xcp -> arg [ i ] & OPT ) ( void ) fprintf ( fp , " " , xcp -> desc [ i ] ) ; else ( void ) fprintf ( fp , " " , xcp -> desc [ i ] ) ; } ( void ) fprintf ( fp , " \n " ) ; }
printusage - print usage information for a command
printusage - print usage information for a command