add new prototypes
correct used prototypes
reformat header files
use bool where appropriate
macro correction to be more portable