Removed the mhlproc profile entry. Call mhl directly.
[mmh] / sbr / ext_hook.c
index db7bcec..771d558 100644 (file)
@@ -19,20 +19,20 @@ ext_hook(char *hook_name, char *message_file_name_1, char *message_file_name_2)
 
        static int did_message = 0; /* set if we've already output a message */
 
-       if ((hook = context_find(hook_name)) == (char *)0)
+       if ((hook = context_find(hook_name)) == NULL)
                return (OK);
 
-       switch (pid = vfork()) {
+       switch (pid = fork()) {
        case -1:
                status = NOTOK;
                advise(NULL, "external database may be out-of-date.");
                break;
 
        case 0:
-               vec[0] = r1bindex(hook, '/');
+               vec[0] = mhbasename(hook);
                vec[1] = message_file_name_1;
                vec[2] = message_file_name_2;
-               vec[3] = (char *)0;
+               vec[3] = NULL;
                execvp(hook, vec);
                _exit(-1);
                /* NOTREACHED */
@@ -44,7 +44,7 @@ ext_hook(char *hook_name, char *message_file_name_1, char *message_file_name_2)
 
        if (status != OK) {
                if (did_message == 0) {
-                       if ((hook = context_find("msg-hook")) != (char *)0)
+                       if ((hook = context_find("msg-hook")) != NULL)
                                advise(NULL, hook);
                        else
                                advise(NULL, "external hook (%s) did not work properly.", hook);