+
+ print_puzzle (p);
+ char ch = getchar ();
+}
+
+/* set the password for the puzzle */
+void do_set_password (Puzzle *p)
+{
+ printf (INPUT_PASSWORD);
+ char password[256];
+ fgets (password, 256, stdin);
+ /* if empty reset the password to nothing */
+ if (strlen (password) == 1)
+ {
+ set_puzzle_password (p, "\0");
+ printf (PASSWORD_RESET);
+ char ch = getchar ();
+ }
+ /* set the password */
+ else
+ {
+ char *passwd = strtok (password, "\n");
+
+ set_puzzle_password (p, (const char* )passwd);
+ printf (PASSWORD_SET);
+ char ch = getchar ();
+ }