Rename C variables in formatting.c, for clarity

Also add C comments.  This should help future debugging of this
notorious file.