modify ts.c for lint, not finished