From: David Levine Date: Tue, 28 Jan 2014 00:56:20 +0000 (-0600) Subject: mhl() needs to set invo_name, too. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/e0c39ed52fa9c99b4591b5170354d8398ffd787b mhl() needs to set invo_name, too. --- diff --git a/uip/mhlsbr.c b/uip/mhlsbr.c index f4df180a..3ebfa69e 100644 --- a/uip/mhlsbr.c +++ b/uip/mhlsbr.c @@ -349,6 +349,9 @@ mhl (int argc, char **argv) char buf[BUFSIZ], *files[MAXARGS]; char **argp, **arguments; + /* Need this if called from main() of show(1). */ + invo_name = r1bindex (argv[0], '/'); + arguments = getarguments (invo_name, argc, argv, 1); argp = arguments; diff --git a/uip/whatnowsbr.c b/uip/whatnowsbr.c index 58c3cd47..f0f9a2c5 100644 --- a/uip/whatnowsbr.c +++ b/uip/whatnowsbr.c @@ -129,6 +129,7 @@ WhatNow (int argc, char **argv) char *l; /* set on -l to alist command */ int n; /* set on -n to alist command */ + /* Need this if called from what_now(). */ invo_name = r1bindex (argv[0], '/'); arguments = getarguments (invo_name, argc, argv, 1);