On Sat, 24 May 2008, John Tytgat wrote:

And a suitable digit2lowcase_hex():

static char digit2lowcase_hex(char digit)

This should probably be declared as "static inline ...".

{
 return (digit <= '9') ? (digit - 0)"0123456789" : (digit - 10)"abcdef";
}

What's wrong with:

  return "0123456789abcdef"[digit];

? (modulo some assertion on digit, to ensure it's in range)


J.

Reply via email to