Update legacy.c

修改12-15,23-48，66，78,90-92
Merge pull request #113 from 520060628/master

Update legacy.c