Printer = popen(screen->printer_command, "w");
if (pipe(my_pipe)) SysError (ERROR_FORK); if ((my_pid = fork()) < 0) SysError (ERROR_FORK);  if (my_pid == 0) { close(my_pipe[1]);	 setgid (screen->gid); setuid (screen->uid); Printer = popen(screen->printer_command, "w"); input = fdopen(my_pipe[0], "r"); while ((c = fgetc(input)) != EOF) { fputc(c, Printer); if (isForm(c)) fflush(Printer); } exit(0); } else { close(my_pipe[0]);	 Printer = fdopen(my_pipe[1], "w"); }
static void charToPrinter(chr)	int chr;{	static int initialized;	if (!initialized) {		register TScreen *screen = &term->screen;		Printer = popen(screen->printer_command, "w");		initialized++;	}	if (Printer != 0) {		fputc(chr, Printer);		if (chr == '\r' || chr == '\n' || chr == '\f')			fflush(Printer);	}}