fixed all to be C89 compliant, added -pedantic to makefile