so here's a little tale of why you should always open files as binary.
so I'm parsing text files for a little something I'm doing to fill time, and I start noticing the parsing catching in an infinite loop on windows, part of the parsing is looking ahead in the file for newlines(\n) so I'm not ending up with half a line in the buffer and having to deal with it.
the problem is how windows handles \n, when you open a file as just "r" (like fopen(file, "r");) windows expands \n to CR''LF on writes and compresses it to \n on reads (that's what bottom poster here says)
damn annoying!
I didn't have this problem on nix (linux, mac) because there's no expanion.
fsckin windows
Moderator: Talkative People
- M_D_K
- Chaos Rift Demigod
- Posts: 1087
- Joined: Tue Oct 28, 2008 10:33 am
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C/++
- Location: UK
fsckin windows
Gyro Sheen wrote:you pour their inventory onto my life
IRC wrote: <sparda> The routine had a stack overflow, sorry.
<sparda> Apparently the stack was full of shit.