LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Regarding buffering with streams (https://www.linuxquestions.org/questions/programming-9/regarding-buffering-with-streams-89098/)

karthikvina 09-04-2003 02:48 AM

Regarding buffering with streams
 
Hai,
I could able to do the follwoing thing in linux, aix but not in IRIX.

cat testfile.dat | testprog

testfile.dat is the input to testprog.

testprog could able to get all the input properly in Linux without using setbuf in "testprog"but failed in IRIX. So when I used

setbuf(stdin, NULL) in "testprog" where I am opening stdin explicitly it worked well. Can anyone explain me what is going on explaining me the usage of setbuf, setvbuf with clear understanding using streams. I jst hve a vague idea and made it work.

with regards,
Karthik.


All times are GMT -5. The time now is 07:24 AM.