trans to unix format and remove useless files
change declaration of type lock_stat
remove unnecessary code