[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] fgets
From: |
Joerg Wunsch |
Subject: |
Re: [avr-libc-dev] fgets |
Date: |
Mon, 2 Feb 2004 20:25:56 +0100 |
User-agent: |
Mutt/1.2.5i |
As Kang Tin LAI wrote:
> For stdin, says: fgets(buf, 128, stdin);
>
> Key in characters should be echo back to stdout?
Nope, this is not the responsibility of fgets(). Say, you've got a
different stream than stdin, how should fgets() decide where to echo
it to?
It has always been the responsibility of the underlying device driver
to perform an echo if desired.
You can find a simple `line-mode' input driver implementation in
http://www.ifbus.de/~joerg/inptest.c
This implementation provides the usual echo, and basic editing
functionality (erase last char, word, entire line) in the way done by
the common Unix tty drivers.
--
J"org Wunsch Unix support engineer
address@hidden http://www.interface-systems.de/~j/
- RE: [avr-libc-dev] [PATCH] printf: %s arguments with precision, (continued)
- RE: [avr-libc-dev] [PATCH] printf: %s arguments with precision, Christopher Hoover, 2004/02/02
- Re: [avr-libc-dev] [PATCH] printf: %s arguments with precision, Joerg Wunsch, 2004/02/12
- Re: [avr-libc-dev] [PATCH] printf: %s arguments with precision, Joerg Wunsch, 2004/02/12
- Re: [avr-libc-dev] [PATCH] printf: %s arguments with precision, Theodore A. Roth, 2004/02/12
- Re: [avr-libc-dev] [PATCH] printf: %s arguments with precision, Joerg Wunsch, 2004/02/15
Re: [avr-libc-dev] [PATCH] printf: %s arguments with precision, Joerg Wunsch, 2004/02/02