Reading long lines from TTY

Doug Gwyn gwyn at smoke.BRL.MIL
Fri Feb 3 22:46:20 AEST 1989


In article <3134 at uhccux.uhcc.hawaii.edu> david at uhccux.uhcc.hawaii.edu (David Lassner) writes:
>Any suggestions on using standard utilities to read VERY
>long lines from the TTY using Unix (Ultrix 2.2).

So long as you're letting the terminal handler canonicalize input,
there will be an input line length limit imposed.  You have to turn
off input canonicalization (erase/kill processing).  Also be aware
that some characters (input byte values) may cause special actions,
and that probably needs to be disabled also.  Finally, the high-order
bit of each input byte may be automatically cleared by the handler.
Putting the handler into so-called "raw" mode solves most such
problems, but it leaves you with the new problem of how to terminate
the input (there is no longer an EOF character!).

You should really use a genuine protocol instead of a kludge.



More information about the Comp.unix.questions mailing list