summaryrefslogtreecommitdiff
path: root/src/day.c
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2012-05-16 15:55:40 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2012-05-16 19:31:47 +0200
commitce13b70c5a0fae3788dc4d551fff24dd5c001649 (patch)
treef5b5960a32a9f5bcc127100daeeba1e3f62bd79e /src/day.c
parent2951cf832034053d02fee97cc8e4a1f5748578c8 (diff)
downloadcalcurse-ce13b70c5a0fae3788dc4d551fff24dd5c001649.zip
Allow passing additional parameters to shell_exec()
This allows for specifying multiple command line parameters to be passed on to the command in a way similar to fork_exec(). This is useful if we want to wrap editor or pager invocations in a shell. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/day.c')
-rw-r--r--src/day.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/day.c b/src/day.c
index 43a5aec..ab362c0 100644
--- a/src/day.c
+++ b/src/day.c
@@ -1180,6 +1180,7 @@ void
day_pipe_item (void)
{
char cmd[BUFSIZ] = "";
+ char const *arg[] = { cmd, NULL };
int pout;
int pid;
FILE *fpout;
@@ -1196,7 +1197,7 @@ day_pipe_item (void)
return;
wins_prepare_external ();
- if ((pid = shell_exec (NULL, &pout, cmd)))
+ if ((pid = shell_exec (NULL, &pout, *arg, arg)))
{
fpout = fdopen (pout, "w");