use NULL not 0 for c-functions (even in c++ code)

4.3 KBytes less compiler warnings.
-Wunused-function on windows