ip2c: reformat code, get rid of 'local' keywords