LCOV - code coverage report
Current view: top level - src - status_of_changes.c (source / functions) Coverage Total Hit
Test: coverage.info Lines: 100.0 % 9 9
Test Date: 2026-01-12 05:34:38 Functions: 100.0 % 1 1

            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              : }
        

Generated by: LCOV version 2.0-1