tobinhex
static int tobinhex(char, int);
if ((nbuf[i] = tobinhex(ibuf[i], 16)) == -1)
if ((nbuf[i] = tobinhex(ibuf[i], 2)) == -1)