assorted c changes based on PR40 posts