/* calc reverse path for wheel this simplifies the reverse path calculation Return: 1:ok -1 error  */
int calc_rev_wheel(BYTE *wheel, BYTE *backpath)
/* calc reverse path for wheel this simplifies the reverse path calculation Return: 1:ok -1 error  */
int calc_rev_wheel(BYTE *wheel, BYTE *backpath)
{
	int i;
	for (i = 0; i < WHEEL_SIZE; i++) {
		if (wheel[i] >= WHEEL_SIZE) {
			return -1;
		}
		backpath[wheel[i]] = i;
	}
	return 1;
}