How to get the size of the stdin buffer

Started by
1 comment, last by griffenjam 22 years, 6 months ago
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 ------------------------------
"The paths of glory lead but to the grave." - Thomas GrayMy Stupid BlogMy Online Photo Gallery
Advertisement
I don''t know if this works with stdin (or other redirections and pipes) but it works with normal files:
  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()

This topic is closed to new replies.

Advertisement