Use -Wall, -Werror, -pedantic

Follow std=c99
Use defines instead of constants