X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=gui.c;h=a2d3e6cd5b63c5d867d793939dbae219196b6bab;hp=d2a5fdccc5c1ccd1f92ada797302ffa566c13702;hb=64e19e1bdabc9bb04941f285fb828a8317359816;hpb=48107fb4b9ad286edc38bc336a8703eea7048f88 diff --git a/gui.c b/gui.c index d2a5fdcc..a2d3e6cd 100644 --- a/gui.c +++ b/gui.c @@ -1,25 +1,14 @@ /* * Copyright (C) 1998-2007 Andre Noll * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + * Licensed under the GPL v2. For licencing details see COPYING. */ /** \file gui.c ncurses-based interface for paraslash */ #include "gui.cmdline.h" #include "para.h" +#include "gui.h" #include #include "ringbuffer.h" #include "string.h" @@ -1160,6 +1149,12 @@ static void com_ll_incr(void) static void com_reread_conf(void) { char *cf =configfile_exists(); + struct gui_cmdline_parser_params params = { + .override = 1, + .initialize = 1, + .check_required = 0, + .check_ambiguity = 0 + }; if (!cf) { PARA_WARNING_LOG("%s", "there is no configuration to read"); @@ -1167,7 +1162,7 @@ static void com_reread_conf(void) } PARA_INFO_LOG("%s", "rereading command line options and config file"); gui_cmdline_parser(_argc, _argv, &conf); - gui_cmdline_parser_configfile(cf, &conf, 1, 1, 0); + gui_cmdline_parser_config_file(cf, &conf, ¶ms); PARA_NOTICE_LOG("%s", "config file reloaded"); if (check_key_map_args() < 0) finish(EXIT_FAILURE); @@ -1342,8 +1337,15 @@ int main(int argc, char *argv[]) conf.config_file_arg); exit(EXIT_FAILURE); } - if (cf) - gui_cmdline_parser_configfile(cf, &conf, 0, 0, 0); + if (cf) { + struct gui_cmdline_parser_params params = { + .override = 0, + .initialize = 0, + .check_required = 0, + .check_ambiguity = 0 + }; + gui_cmdline_parser_config_file(cf, &conf, ¶ms); + } if (check_key_map_args() < 0) { fprintf(stderr, "invalid key map in config file\n"); exit(EXIT_FAILURE);