FreeBSD/contrib/ntp/ntpq/ntpq-subs.c
/*
 * doprintvlist - print the variables on a list
 */
print the variables on a list
print the variables on a list
static void
doprintvlist(
	struct varlist *vlist,
	FILE *fp
	)
{
	size_t n;
	if (NULL == vlist->name) {
		fprintf(fp, "No variables on list\n");
		return;
	}
	for (n = 0; n < MAXLIST && vlist[n].name != NULL; n++) {
		if (NULL == vlist[n].value)
			fprintf(fp, "%s\n", vlist[n].name);
		else
			fprintf(fp, "%s=%s\n", vlist[n].name,
				vlist[n].value);
	}
}
static void doprintvlist ( struct varlist * vlist , FILE * fp ) { size_t n ; if ( NULL == vlist -> name ) { fprintf ( fp , " \n " ) ; return ; } for ( n = 0 ; n < MAXLIST && vlist [ n ] . name != NULL ; n ++ ) { if ( NULL == vlist [ n ] . value ) fprintf ( fp , " \n " , vlist [ n ] . name ) ; else fprintf ( fp , " \n " , vlist [ n ] . name , vlist [ n ] . value ) ; } }
doprintvlist - print the variables on a list
doprintvlist - print the variables on a list