From: Manish Katiyar <mkatiyar@gmail.com>
To: Bastian Ruppert <ng@max01.eu>
Cc: linux-c-programming@vger.kernel.org
Subject: Re: line buffered stdin
Date: Mon, 11 Jan 2010 22:06:26 +0530 [thread overview]
Message-ID: <ea11fea31001110836q5afe9dcn1022bd7d80228abe@mail.gmail.com> (raw)
In-Reply-To: <4B4B5173.20504@max01.eu>
On Mon, Jan 11, 2010 at 9:57 PM, Bastian Ruppert <ng@max01.eu> 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 majordomo@vger.kernel.org
> 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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-01-11 16:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-11 16:27 line buffered stdin Bastian Ruppert
2010-01-11 16:36 ` Manish Katiyar [this message]
2010-01-11 19:09 ` ern0
2010-01-11 20:51 ` Glynn Clements
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ea11fea31001110836q5afe9dcn1022bd7d80228abe@mail.gmail.com \
--to=mkatiyar@gmail.com \
--cc=linux-c-programming@vger.kernel.org \
--cc=ng@max01.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).