Commit Briefs
move 'struct range' and related functions into the diff_ namespace
no functional change
Fix macro diff_atom_*idx return value types
The macros sometimes returned unsigned int (atoms.len) or long int ((ATOM) - head). Make that always unsigned int, with some range checks against negative values.