* 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
* and it is written with some style.
* modified by kls to use register references instead of arrays
* to try to gain a little speed.
char buf
[MAXREP
][MAXWIDTH
];
int maxcol
[MAXREP
] = {-1};
register FILE *p
= stdin
, *o
= stdout
;
int done
, linedone
, maxrep
;
for (cp
= buf
[0], limit
= buf
[MAXREP
]; cp
< limit
; *cp
++ = ' ');
* 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') {
for (i
= 0; i
< MAXREP
; i
++) {
for (i
= 0; i
<= maxrep
; i
++) {
for (cp
= buf
[i
], limit
= cp
+maxcol
[i
]; cp
<= limit
;) {