__FBSDID, ANSIfy function definitions, staticize functions and globals, don't initialize globals to 0, some reindentation of declarations, some comments added or reworded.
__FBSDID, ANSIfy function definitions, staticize functions and globals,
don't initialize globals to 0, some reindentation of declarations, some
comments added or reworded.

jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase