FreeBSD/contrib/ntp/ntpq/ntpq.c
/*
 * output - output a variable=value combination
 */
output a variable=value combination
output a variable = value combination
static void
output(
	FILE *fp,
	const char *name,
	const char *value
	)
{
	int len;
	len = size2int_sat(strlen(name) + 1 + strlen(value));
	if (out_chars != 0) {
		out_chars += 2;
		if ((out_linecount + len + 2) > MAXOUTLINE) {
			fputs(",\n", fp);
			out_linecount = 0;
		} else {
			fputs(", ", fp);
			out_linecount += 2;
		}
	}
	fputs(name, fp);
	putc('=', fp);
	fputs(value, fp);
	out_chars += len;
	out_linecount += len;
}
static void output ( FILE * fp , const char * name , const char * value ) { int len ; len = size2int_sat ( strlen ( name ) + 1 + strlen ( value ) ) ; if ( out_chars != 0 ) { out_chars += 2 ; if ( ( out_linecount + len + 2 ) > MAXOUTLINE ) { fputs ( " \n " , fp ) ; out_linecount = 0 ; } else { fputs ( " " , fp ) ; out_linecount += 2 ; } } fputs ( name , fp ) ; putc ( ' ' , fp ) ; fputs ( value , fp ) ; out_chars += len ; out_linecount += len ; }
output - output a variable=value combination
output - output a variable = value combination
/* strlen of "name=value" */