Fix bracing style

Make the mklock() function definition match other functions.
Fix unset $retval
Escape carat symbols in documentation

AsciiDoc interprets these as superscript symbols and errors out
otherwise.
Update copyright