SCCS-vsn: usr.sbin/lpr/filters/lpf.c 4.6
SCCS-vsn: usr.sbin/lpr/lpr/lpr.c 4.9
* filter which reads the output of nroff and converts lines
* with ^H's to overwritten lines. Thus this works like 'ul'
* but is much better: it can handle more than 2 overwrites
* filter which reads the output of nroff and converts lines
* with ^H's to overwritten lines. Thus this works like 'ul'
* but is much better: it can handle more than 2 overwrites
- case '\031':
- fflush(stdout);
- kill(getpid(), SIGSTOP);
- break;
-
case '\f':
case '\n':
linedone = 1;
case '\f':
case '\n':
linedone = 1;
col = (col | 07) + 1;
break;
col = (col | 07) + 1;
break;
+#ifdef WAITCHAR
+ case '\031':
+ /*
+ * lpd needs to use a different filter to
+ * print data so stop what we are doing and
+ * wait for lpd to restart us.
+ */
+ if ((ch = getchar()) == '\1') {
+ fflush(stdout);
+ kill(getpid(), SIGSTOP);
+ break;
+ } else {
+ ungetc(ch, stdin);
+ ch = '\031';
+ }
+#endif
+
default:
if (col >= MAXWIDTH)
break;
default:
if (col >= MAXWIDTH)
break;
char lpr_id[] = "~|^`lpr.c:\t4.2\t1 May 1981\n";
char lpr_id[] = "~|^`lpr.c:\t4.2\t1 May 1981\n";
-/* lpr.c 4.8 83/02/11 */
+/* lpr.c 4.9 83/03/01 */
/*
* lpr -- off line print
*
/*
* lpr -- off line print
*