sendfile.c

来自「AUPE的源代码」· C语言 代码 · 共 18 行

C
18
字号
#include	"lprps.h"

void
send_file(void)		/* called by main() to copy stdin to printer */
{
	int		c;

	init_input(1);
	set_intr();				/* we catch SIGINT */

	while ( (c = getchar()) != EOF)		/* main loop of program */
		out_char(c);		/* output each character */
	out_char(EOF);			/* output final buffer */

	block_write(&eofc, 1); 	/* send EOF to printer */
	proc_upto_eof(0);		/* wait for printer to send EOF back */
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?