Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Block-buffered input

Name: Anonymous 2012-03-22 14:14

When is block-buffered input passed on? Does it mirrors the rules governing block-buffered output? Since you can't flush an input buffer (the result is undefined) is it only passed on when it is filled?

Name: Anonymous 2012-03-22 15:13

Is it Haskell or Ruby?

Name: Anonymous 2012-03-22 15:18

I know you are probably kidding, but C using setvbuf.

Name: Anonymous 2012-03-22 15:25

Learn C++11

Name: Anonymous 2012-03-23 5:03

Anyone?

Name: Anonymous 2012-03-23 5:23

When the stream is closed or the OS buffer is full. Alternatively, when the process writing to the input stream calls flush. If you do not want to wait for the buffer to flush, consider referring to >>3.

Name: Anonymous 2012-03-23 5:38

>>6
Thank you.

I wrote message 3, which was a response to 2. I was wondering if I could use a block buffer with a limit on how many characters the user can input to censor input and limit line length.

Some documentation seems to imply input buffers operate significantly differently from output buffers and few even could be read as saying you can only store one character a time, which is why I asked.

Name: Anonymous 2012-03-23 5:43

>>7
Not sure if IHBT already, but consider this:
and few even could be read as saying you can only store one character a time
This is commonly referred to as "unbuffered mode", and commonly used in CLIs and curses applications. Since you explicitly state that you wrote >>3, I find it curious that you do not know the difference.

Name: Anonymous 2012-03-23 5:53

>>8
I am just learning this for the first time. I am very confused and likely very wrong about a lot of things.

Since fflush()ing an input buffer is undefined I thought other things could be significantly different between input and output streams. I do not understand the decision to not explicitly make fflush() work on input buffers.

Name: Anonymous 2012-03-23 16:42

>>11
nice dubs bro

Name: Anonymous 2012-03-23 20:21

>>10
Thanks but please don't bump the thread.

Don't change these.
Name: Email:
Entire Thread Thread List