turns buffering back on?

This is a discussion on turns buffering back on? within the Linux Programming forums, part of the Platform Specific Boards category; hi guys
I have a this code below:
Code:
#include <stdio.h>
#include <ctype.h>
int main()
{
int c;
while (( ...

Your code has multiple typos. Always copy and paste working code. If you don't make a reasonable effort, why should we?

Your question is not well-worded. If "the text includes code to turn off disk buffering for a file descriptor" and your task is to "write a function that turns buffering back on" then presumably you should start with the given code and modify it to turn buffering back on.

Yes, disk buffering should already be on.

What does the tty mode have to do with it? The quoted text seems to deal with disk buffering, not terminal I/O.

I don't know where you got it, but that code has absolutely zero to do with turning on/off buffering for a file descriptor. it doesn't mention files or descriptors at all, and if you don't realize that simply from looking at it, you need to go back and spend some more time learning c/linux programming. I've never done anything like what you're talking about, but I suspect it would involve calls to ioctl or fcntl, so I'd suggest looking up those functions.