changed c++ obj parser to c