fixed compile error and more sed replaces for typedef names