/* Copyright (c) 2014, Vsevolod Stakhov1* All rights reserved.2*3* Redistribution and use in source and binary forms, with or without4* modification, are permitted provided that the following conditions are met:5* * Redistributions of source code must retain the above copyright6* notice, this list of conditions and the following disclaimer.7* * Redistributions in binary form must reproduce the above copyright8* notice, this list of conditions and the following disclaimer in the9* documentation and/or other materials provided with the distribution.10*11* THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY12* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED13* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE14* DISCLAIMED. IN NO EVENT SHALL AUTHOR BE LIABLE FOR ANY15* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES16* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;17* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND18* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT19* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS20* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.21*/2223#include <pkg.h>2425int default_yes; /* Default always yes */26int yes; /* Assume always yes */27int dry_run; /* Do not perform any actions */28bool auto_update; /* Do not update repo */29int case_sensitive; /* Case sensitive queries */30int force; /* Forced operation */31int quiet; /* Silent output */32int newpkgversion; /* New package version is available */33int nbtodl;3435void36set_globals(void)37{38default_yes = pkg_object_bool(pkg_config_get("DEFAULT_ALWAYS_YES"));39yes = pkg_object_bool(pkg_config_get("ASSUME_ALWAYS_YES"));40dry_run = 0;41auto_update = pkg_object_bool(pkg_config_get("REPO_AUTOUPDATE"));42case_sensitive = pkg_object_bool(pkg_config_get("CASE_SENSITIVE_MATCH"));43force = 0;44quiet = 0;45newpkgversion = 0;46nbtodl = 0;47}48495051