Re: line buffered stdin

Manish Katiyar <[email protected]>
Newsgroups org.kernel.vger.linux-c-programming
Message-ID <[email protected]>
On Mon, Jan 11, 2010 at 9:57 PM, Bastian Ruppert <[email protected]> wrote:
> Hello,
>
> under Linux stdin is line buffered, that means you can read one byte with
> following statement:
>
> read(0,&myvar,1);
>
> You get the byte after typing one or more chars AND return.
>
> But i need this function to return after every char entered in stdin.
>
> Is there a function that reads stdin without line buffering?
>
> Is it possible to disable the linebuffer or to reduce the buffersize to one?
First two links in google search.

http://www.linux.org/docs/ldp/howto/NCURSES-Programming-HOWTO/init.html
http://www.flipcode.com/archives/_kbhit_for_Linux.shtml
> Does this kind of manupilation have consequences for the hole system or just
> for
> the app
> doing this?
>
> Any Ideas are very welcome,
> thank you.
>
> Regards
> Bastian.
> --
> To unsubscribe from this list: send the line "unsubscribe
> linux-c-programming" in
> the body of a message to [email protected]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>



-- 
Thanks -
Manish
==================================
[$\*.^ -- I miss being one of them
==================================
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.