getdigit
*r++ = getdigit(&q, 16, 2);
*r++ = getdigit(&q, 8, 3);
static int getdigit(unsigned char **, int, int);