FreeBSD/sys/ddb/db_output.c
/*
 * Output character.  Buffer whitespace.
 */
Output character.  Buffer whitespace.
Output character . Buffer whitespace .
static void
db_putchar(int c, void *arg)
{
	struct dbputchar_arg *dap = arg;
	if (dap->da_pbufr == NULL) {
		db_putc(c);
	} else {
		*dap->da_pnext++ = c;
		dap->da_remain--;
		*dap->da_pnext = '\0';
		if (dap->da_remain < 2 || c == '\n') {
			db_puts(dap->da_pbufr);
			dap->da_pnext = dap->da_pbufr;
			dap->da_remain = dap->da_nbufr;
			*dap->da_pnext = '\0';
		}
	}
}
static void db_putchar ( int c , void * arg ) { struct dbputchar_arg * dap = arg ; if ( dap -> da_pbufr == NULL ) { db_putc ( c ) ; } else { * dap -> da_pnext ++ = c ; dap -> da_remain -- ; * dap -> da_pnext = ' \0 ' ; if ( dap -> da_remain < 2 || c == ' \n ' ) { db_puts ( dap -> da_pbufr ) ; dap -> da_pnext = dap -> da_pbufr ; dap -> da_remain = dap -> da_nbufr ; * dap -> da_pnext = ' \0 ' ; } } }
Output character.
Output character .
/* No bufferized output is provided. */ /* Leave always the buffer 0 terminated. */ /* Check if the buffer needs to be flushed. */