changed printf_t typedef to "struct printf_state"