How does the C runtime library do file i/o in a windows app? The WinAPI has only the CreateFile and ReadFile as far as I can see where ReadFile reads a specified number of bytes rather than until lineend. So if one uses fgets to get a line at the time, does it use a 1-sized buffer until newline is detected? Does it use DOS routines? I'd like to use those funcs as described directly myself unless that's a terribly inefficient way to do it.