+/* export the clues to a text file */
+void do_export_clues (Puzzle *p)
+{
+ if (p->grid_frozen == false)
+ {
+ printf (UNFROZEN_GRID);
+ char ch = getchar ();
+ return;
+ }
+ char fname[256];
+ printf (INPUT_FILE);
+ fgets (fname, 256, stdin);
+ if (strlen(fname) == 1)
+ return;
+ char *filename = strtok (fname, "\n");
+
+ export_clues (p, filename);
+ printf (FILE_SAVED);
+ char ch = getchar ();
+}
+
+/* export the puzzle to a png file */
+void do_export_puzzle (Puzzle *p)
+{
+ if (p->grid_frozen == false)
+ {
+ printf (UNFROZEN_GRID);
+ char ch = getchar ();
+ return;
+ }
+ char fname[256];
+ printf (INPUT_FILE);
+ fgets (fname, 256, stdin);
+ if (strlen (fname) == 1)
+ return;
+ char* filename = strtok (fname, "\n");
+
+ printf (INPUT_EXPORT_ANSWERS);
+ char ans[3];
+ fgets (ans, 3, stdin);
+ bool solution;
+ solution = (toupper (ans[0]) == 'Y') ? true : false;
+
+ export_grid_image (p, filename, solution);
+ printf (FILE_SAVED);
+ char ch = getchar ();
+}
+
+/* reset the grid */
+void do_reset_puzzle (Puzzle *p)
+{
+ int grid_size = p->grid_size;
+ printf (INPUT_CONFIRM_RESET);
+ char conf[3];
+ fgets (conf, 3, stdin);
+ if (toupper (conf[0]) == 'Y')
+ init_puzzle (p, grid_size);
+
+ print_puzzle (p);
+ char ch = getchar ();
+}
+
+/* set the password for the puzzle */
+void do_set_password (Puzzle *p)
+{
+ char* password;
+ password = getpass (INPUT_PASSWORD);
+ /* if empty reset the password to nothing */
+ if (strlen(password) == 0)
+ {
+ set_puzzle_password (p, "\0");
+ printf (PASSWORD_RESET);
+ char ch = getchar ();
+ }
+ /* set the password */
+ else
+ {
+ set_puzzle_password (p, (const char* )password);
+ printf (PASSWORD_SET);
+ char ch = getchar ();
+ }
+}
+
+/* set clue for a word - only for frozen grid */
+void do_set_clue_word (Puzzle *p, enum ORIENTATION orient)