How to get the size of the stdin buffer
I need to get the size of the stdin buffer, (or any FILE buffer),
but can''t find any information on how, is it even possiable?
Jason Mickela
ICQ : 873518
E-Mail: jmickela@pacbell.net
------------------------------
"Evil attacks from all sides
but the greatest evil attacks
from within." Me
------------------------------
I don''t know if this works with stdin (or other redirections and pipes) but it works with normal files:
[Resist Windows XP''s Invasive Production Activation Technology!]
FILE *File = ...;long Filesize;fseek(File,SEEK_END,0);Filesize = ftell(File);fseek(File,SEEK_SET,0);
[Resist Windows XP''s Invasive Production Activation Technology!]
IIRC all stdio buffers are BUFSIZ bytes large initially. BUFSIZ is declared in stdio.h
You can change the buffering for a FILE* file with the functions setbuf() and setvbuf()
You can change the buffering for a FILE* file with the functions setbuf() and setvbuf()
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement