Made library code C99 compliant