LCOV - code coverage report
Current view: top level - util - taler-merchant-config.c (source / functions) Coverage Total Hit
Test: coverage.info Lines: 84.6 % 13 11
Test Date: 2025-10-31 14:20:14 Functions: 100.0 % 1 1

            Line data    Source code
       1              : /*
       2              :      This file is part of Taler.
       3              :      Copyright (C) 2012-2024 Taler Systems SA
       4              : 
       5              :      Taler is free software: you can redistribute it and/or modify it
       6              :      under the terms of the GNU Affero General Public License as published
       7              :      by the Free Software Foundation, either version 3 of the License,
       8              :      or (at your option) any later version.
       9              : 
      10              :      Taler is distributed in the hope that it will be useful, but
      11              :      WITHOUT ANY WARRANTY; without even the implied warranty of
      12              :      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      13              :      Affero General Public License for more details.
      14              : 
      15              :      You should have received a copy of the GNU Affero General Public License
      16              :      along with this program.  If not, see <http://www.gnu.org/licenses/>.
      17              : 
      18              :      SPDX-License-Identifier: AGPL3.0-or-later
      19              :  */
      20              : 
      21              : /**
      22              :  * @file util/taler-merchant-config.c
      23              :  * @brief tool to access and manipulate Taler merchant configuration files
      24              :  * @author Christian Grothoff
      25              :  */
      26              : #include "platform.h"
      27              : #include "taler_merchant_util.h"
      28              : 
      29              : 
      30              : /**
      31              :  * Program to manipulate configuration files.
      32              :  *
      33              :  * @param argc number of arguments from the command line
      34              :  * @param argv command line arguments
      35              :  * @return 0 ok, 1 on error
      36              :  */
      37              : int
      38           50 : main (int argc,
      39              :       char *const *argv)
      40              : {
      41           50 :   struct GNUNET_CONFIGURATION_ConfigSettings cs = {
      42              :     .api_version = GNUNET_UTIL_VERSION,
      43              :     .global_ret = EXIT_SUCCESS
      44              :   };
      45           50 :   struct GNUNET_GETOPT_CommandLineOption options[] = {
      46           50 :     GNUNET_GETOPT_option_help (TALER_MERCHANT_project_data (),
      47              :                                "taler-merchant-config [OPTIONS]"),
      48           50 :     GNUNET_GETOPT_option_version (TALER_MERCHANT_project_data ()->version),
      49           50 :     GNUNET_CONFIGURATION_CONFIG_OPTIONS (&cs),
      50              :     GNUNET_GETOPT_OPTION_END
      51              :   };
      52              :   enum GNUNET_GenericReturnValue ret;
      53              : 
      54           50 :   ret = GNUNET_PROGRAM_run (
      55              :     TALER_MERCHANT_project_data (),
      56              :     argc,
      57              :     argv,
      58              :     "taler-merchant-config [OPTIONS]",
      59              :     gettext_noop (
      60              :       "Manipulate taler-merchant configuration files"),
      61              :     options,
      62              :     &GNUNET_CONFIGURATION_config_tool_run,
      63              :     &cs);
      64           50 :   GNUNET_CONFIGURATION_config_settings_free (&cs);
      65           50 :   if (GNUNET_NO == ret)
      66            0 :     return 0;
      67           50 :   if (GNUNET_SYSERR == ret)
      68            0 :     return EXIT_INVALIDARGUMENT;
      69           50 :   return cs.global_ret;
      70              : }
      71              : 
      72              : 
      73              : /* end of taler-merchant-config.c */
        

Generated by: LCOV version 2.0-1