Add copyright message to all C files.

Also fixes some formatting and reverts some function parameter definitions
to the more conventional format.