Added const to variable to prevent warnings when compiling in c++ and as good practice.
Removed old style function definitions that are not c++ compatible.
Fixed most compiler errors when trying to compile as c++.
Changed name of type sun to Sun to prevent c++ compiler errors with name collisions.
Updated catalog type so to remove error when compiling as c++.
Renamed .c files to .cpp and updated build tools.