[refact] some errors reported by viva64
reformat source code
added copyright to hge.h