-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFileHandle.h
More file actions
24 lines (20 loc) · 736 Bytes
/
FileHandle.h
File metadata and controls
24 lines (20 loc) · 736 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
* FileHandle.h:
* This module supports loading and saving a board, i.e. implements solve, edit, save.
*/
#ifndef FILEHANDLE_H_
#define FILEHANDLE_H_
/*
* Loads a board from <fileName>, if it is in the correct format.
* If the file or board format (in the file) are invalid, prints appropriate message
* and returns the original board (@param sudoku).
* Used for solve and edit commands.
*/
SudokuBoard* load(SudokuBoard *sudoku, char *fileName, int *success);
/*
* Saves a board to <fileName>.
* If the file path is invalid or the board has no solution and in edit mode, prints appropriate
* message and exits without saving.
*/
void save(SudokuBoard *sudoku, char *fileName, Status mode);
#endif /* FILEHANDLE_H_ */