- const uint16_t nchar = UCHAR_MAX + 1;
- unsigned char a = x / (nchar * nchar * nchar);
- unsigned char b = (x - (a * nchar * nchar * nchar)) / (nchar * nchar);
- unsigned char c = (x - ((a * nchar * nchar * nchar) + (b * nchar * nchar))) / nchar;
- unsigned char d = x % nchar;
+ unsigned char a = x / (UCHARSIZE * UCHARSIZE * UCHARSIZE);
+ unsigned char b = (x - (a * UCHARSIZE * UCHARSIZE * UCHARSIZE)) / (UCHARSIZE * UCHARSIZE);
+ unsigned char c = (x - ((a * UCHARSIZE * UCHARSIZE * UCHARSIZE) + (b * UCHARSIZE * UCHARSIZE))) / UCHARSIZE;
+ unsigned char d = x % UCHARSIZE;