/* Copyright (c) 1979 Regents of the University of California */
* iul - a cat like program to indicate underlining for graphic terminals
* Bill Joy UCB June 22, 1977
* This program was a piece of the editor ex.
char linebuf
[LBSIZE
], genbuf
[LBSIZE
];
if (freopen(argv
[0], "r", stdin
) == NULL
) {
while (fgets(linebuf
, sizeof linebuf
, stdin
) != 0) {
for (lp
= linebuf
; *lp
; lp
++)
for (lp
= linebuf
; c
= *lp
++;) {
if (c
< ' ' || c
== 0177)
for (lp
= linebuf
; c
= *lp
++;) {
if (gp
>= &genbuf
[LBSIZE
- 2])
if (gp
>= &genbuf
[LBSIZE
- 2]) {
fprintf(stderr
, "Line too long\n");
for (lp
= linebuf
, gp
= genbuf
; c
= *lp
; gp
++, lp
++)
while (gp
>= genbuf
&& *gp
== ' ')