- tp->rot = make_rotator (do_spin ? spin_speed : 0,
- do_spin ? spin_speed : 0,
- do_spin ? spin_speed : 0,
+ char *s = do_spin;
+ while (*s)
+ {
+ if (*s == 'x' || *s == 'X') spinx = True;
+ else if (*s == 'y' || *s == 'Y') spiny = True;
+ else if (*s == 'z' || *s == 'Z') spinz = True;
+ else
+ {
+ fprintf (stderr,
+ "%s: spin must contain only the characters X, Y, or Z (not \"%s\")\n",
+ progname, do_spin);
+ exit (1);
+ }
+ s++;
+ }
+
+ tp->rot = make_rotator (spinx ? spin_speed : 0,
+ spiny ? spin_speed : 0,
+ spinz ? spin_speed : 0,