docs: function translateDigit(d)
  {
  	if (d >= CP_0 && d <= CP_9) {
  		/* '0' to '9' -> 0 to 9 */
  		return (d - PI_CONV_DEC);
  	} else if (d >= CP_A && d <= CP_Z) {
  		/* 'A' - 'Z' -> 10 to 35 */
  		return (d - PI_CONV_UC);
  	} else if (d >= CP_a && d <= CP_z) {
  		/* 'a' - 'z' -> 10 to 35 */
  		return (d - PI_CONV_LC);
  	} else {
  		/* Invalid character code */
  		return (-1);
  	}
  }