semimarkov.c made compilable