LCOV - code coverage report
Current view: top level - src - globals.c (source / functions) Hit Total Coverage
Test: rapport Lines: 13 13 100.0 %
Date: 2021-12-10 16:22:55 Functions: 1 1 100.0 %
Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /* Copyright (c) 2014, Vsevolod Stakhov
       2                 :            :  * All rights reserved.
       3                 :            :  *
       4                 :            :  * Redistribution and use in source and binary forms, with or without
       5                 :            :  * modification, are permitted provided that the following conditions are met:
       6                 :            :  *       * Redistributions of source code must retain the above copyright
       7                 :            :  *         notice, this list of conditions and the following disclaimer.
       8                 :            :  *       * Redistributions in binary form must reproduce the above copyright
       9                 :            :  *         notice, this list of conditions and the following disclaimer in the
      10                 :            :  *         documentation and/or other materials provided with the distribution.
      11                 :            :  *
      12                 :            :  * THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY
      13                 :            :  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
      14                 :            :  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
      15                 :            :  * DISCLAIMED. IN NO EVENT SHALL AUTHOR BE LIABLE FOR ANY
      16                 :            :  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
      17                 :            :  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
      18                 :            :  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
      19                 :            :  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
      20                 :            :  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
      21                 :            :  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
      22                 :            :  */
      23                 :            : 
      24                 :            : #include <pkg.h>
      25                 :            : 
      26                 :            : int default_yes; /* Default always yes */
      27                 :            : int yes; /* Assume always yes */
      28                 :            : int dry_run; /* Do not perform any actions */
      29                 :            : bool auto_update; /* Do not update repo */
      30                 :            : int case_sensitive; /* Case sensitive queries */
      31                 :            : int force; /* Forced operation */
      32                 :            : int quiet; /* Silent output */
      33                 :            : int newpkgversion; /* New package version is available */
      34                 :            : int nbactions;
      35                 :            : int nbdone;
      36                 :            : int nbtodl;
      37                 :            : 
      38                 :            : void
      39                 :       3459 : set_globals(void)
      40                 :            : {
      41                 :       3459 :         default_yes = pkg_object_bool(pkg_config_get("DEFAULT_ALWAYS_YES"));
      42                 :       3459 :         yes = pkg_object_bool(pkg_config_get("ASSUME_ALWAYS_YES"));
      43                 :       3459 :         dry_run = 0;
      44                 :       3459 :         auto_update = pkg_object_bool(pkg_config_get("REPO_AUTOUPDATE"));
      45                 :       3459 :         case_sensitive = pkg_object_bool(pkg_config_get("CASE_SENSITIVE_MATCH"));
      46                 :       3459 :         force = 0;
      47                 :       3459 :         quiet = 0;
      48                 :       3459 :         newpkgversion = 0;
      49                 :       3459 :         nbactions = 0;
      50                 :       3459 :         nbdone = 0;
      51                 :       3459 :         nbtodl = 0;
      52                 :       3459 : }
      53                 :            : 

Generated by: LCOV version 1.15