Line data Source code
1 : #include "precizer.h"
2 :
3 : /**
4 : *
5 : * Reflect global change status against database
6 : *
7 : */
8 178 : Return status_of_changes(void)
9 : {
10 : /** @var Return status
11 : * @brief The status that will be passed to return() before exiting
12 : * @details By default, the function worked without errors
13 : */
14 178 : Return status = SUCCESS;
15 :
16 178 : if(config->compare != true && global_interrupt_flag == false)
17 : {
18 146 : if(config->db_primary_file_exists == true)
19 : {
20 68 : status = db_check_changes();
21 :
22 : } else {
23 78 : if(config->db_primary_file_modified == false)
24 : {
25 2 : slog(EVERY,BOLD "Nothing has changed in the primary database since the program was launched (no files were added, updated, or deleted)" RESET "\n");
26 : } else {
27 76 : slog(EVERY,BOLD "The brand-new primary database file %s was created and modified since the program started (files were added, removed, or updated)" RESET "\n",config->db_file_name);
28 : }
29 : }
30 : }
31 :
32 178 : provide(status);
33 : }
|