diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2014-07-16 23:53:30 +0200 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2014-07-16 23:53:30 +0200 |
commit | 71234ec0bd16c490239eefcf98069ceb7a7f7618 (patch) | |
tree | 96700d7cbdf97ca7f1906948be66548712b15226 /src/calcurse.c | |
parent | b37ed2fcc8a4c64419cf066d3c940fc29b7a2d73 (diff) | |
download | calcurse-71234ec0bd16c490239eefcf98069ceb7a7f7618.zip |
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>
Diffstat (limited to 'src/calcurse.c')
-rw-r--r-- | src/calcurse.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/calcurse.c b/src/calcurse.c index cfe8298..e31770c 100644 --- a/src/calcurse.c +++ b/src/calcurse.c @@ -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); |