Refactor wins_launch_external()

Allow for passing an arbitrary number of arguments. This also allows us
to remove wins_launch_external2() and use wins_launch_external() at all
call sites instead.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
Lukas Fleischer
2014-07-16 23:53:30 +02:00
parent b37ed2fcc8
commit 71234ec0bd
6 changed files with 20 additions and 29 deletions

View File

@@ -290,10 +290,13 @@ static inline void key_generic_reload(void)
io_save_todo(path_todo_backup);
io_save_mutex_unlock();
wins_launch_external2(path_apts, path_apts_backup,
conf.mergetool);
wins_launch_external2(path_todo, path_todo_backup,
conf.mergetool);
const char *arg_apts[] = { conf.mergetool, path_apts,
path_apts_backup, NULL };
wins_launch_external(arg_apts);
const char *arg_todo[] = { conf.mergetool, path_todo,
path_todo_backup, NULL };
wins_launch_external(arg_todo);
xfree(path_apts_backup);
xfree(path_todo_backup);