/*this struct creates the spindle which houses the reflector and all * three rotors. Also keeps track of rotor positions to track the * stepping of the rotors */ typedef struct { char rotor1[26]; char rotor2[26]; char rotor3[26]; char reflector[26]; int rotpos1; int rotpos2; int rotpos3; } Spindle; void rotor_init (char arr[] , char rotor[]); void reflector_init (char arr[], char * reflector); int rotor_step ( Spindle *, int * check ); void substitution ( Spindle *, char * letter ); int char_to_int ( char * letter ); char int_to_char ( int * x );