parses files correctly. ugh why am I parsing text in C without a library. when I say correctly I mean only for well-formed files. it probably crashes horribly in any number of cases.