]> diplodocus.org Git - nmh/commitdiff
mhl() needs to set invo_name, too.
authorDavid Levine <levinedl@acm.org>
Tue, 28 Jan 2014 00:56:20 +0000 (18:56 -0600)
committerDavid Levine <levinedl@acm.org>
Tue, 28 Jan 2014 00:56:20 +0000 (18:56 -0600)
uip/mhlsbr.c
uip/whatnowsbr.c

index f4df180..3ebfa69 100644 (file)
@@ -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;
 
index 58c3cd4..f0f9a2c 100644 (file)
@@ -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);