Tomohiro KUBOTA <[EMAIL PROTECTED]>:
> > > When a program does not use readline or equivalent, e.g. ash (because
> > > it wants to be small), Oracle (because readline is GPL), nslookup
> > > (because nobody bothered to implement it).
> >
> > Or cat, as in "cat > /tmp/file".
>
> I see. I understand the importance of the kernel's line editor.
> Then, since "cat > /tmp/file" can be done on any terminals (XTerm
> in any modes, bare console, kon2, jfbterm, Kterm, Hanterm, Txiterm
> [Thai XTerm], and so on so on), the behavior of backspace key on
> kernel's line editor should be configurable and should follow
> wcwidth() of the library by default.
>
> How about the _libc_, instead of kernel, has the line editor and
> getchar() use it? Then the kernel's line editor can be simple
> (can assume 1byte = 1character = 1column) because it is rarely used.
I think this is basically because the program and the C library don't
know whether input is from a terminal or from a file or a socket or a
pipe or whatever. So the line-buffering has to happen on the other
side of the "read" system call.
Of course, this doesn't really mean that line-buffering has to be in
the kernel. It could be handled by a server. Maybe it is in the Hurd.
Edmund
-
Linux-UTF8: i18n of Linux on all levels
Archive: http://mail.nl.linux.org/lists/