Example #1
0
/*
** Add a single character to the output buffer.
**
** non-TBCP version
*/
static void raw_printer_putc(int c)
	{
	if(wbuf_space == 0)			/* if the buffer is full, */
		printer_flush();		/* write it out */

	*(bptr++) = c;				/* otherwise, store it in the buffer */
	wbuf_space--;				/* and reduce buffer empty space count */
	} /* end of raw_printer_putc() */
Example #2
0
void printer_close(void) {
	/* flush stream, but destroy stream_dest so it won't be reopened */
	printer_flush();
	if (stream_dest) free(stream_dest);
	stream_dest = NULL;
	is_pipe = 0;
	busy = 1;
	bp_remove_list(coco_print_breakpoint);
}