Removed the whom program, which relayed on post(8) functionality.
[mmh] / uip / whatnowsbr.c
index afc56fd..c0f331a 100644 (file)
@@ -83,8 +83,6 @@ static struct swit aleqs[] = {
        { "send [<switches>]", 0 },
 #define PUSHSW  6
        { "push [<switches>]", 0 },
-#define WHOMSW  7
-       { "whom [<switches>]", 0 },
 #define QUITSW  8
        { "quit [-delete]", 0 },
 #define DELETESW  9
@@ -115,7 +113,6 @@ static int sendfile (char **, char *, int);
 static void sendit (char *, char **, char *, int);
 static int buildfile (char **, char *);
 static int check_draft (char *);
-static int whomfile (char **, char *);
 static int removefile (char *);
 static void writelscmd(char *, int, char **);
 static void writesomecmd(char *buf, int bufsz, char *cmd, char *trailcmd, char **argp);
@@ -275,11 +272,6 @@ WhatNow (int argc, char **argv)
                        showfile (++argp, drft);
                        break;
 
-               case WHOMSW:
-                       /* Check to whom the draft would be sent */
-                       whomfile (++argp, drft);
-                       break;
-
                case QUITSW:
                        /* Quit, and possibly delete the draft */
                        if (*++argp && (*argp[0] == 'd' ||
@@ -1326,44 +1318,6 @@ sendit (char *sp, char **arg, char *file, int pushed)
                done (0);
 }
 
-/*
- * WHOM
- */
-
-static int
-whomfile (char **arg, char *file)
-{
-       pid_t pid;
-       int vecp;
-       char *vec[MAXARGS];
-
-       context_save ();  /* save the context file */
-       fflush (stdout);
-
-       switch (pid = vfork ()) {
-               case NOTOK:
-                       advise ("fork", "unable to");
-                       return 1;
-
-               case OK:
-                       vecp = 0;
-                       vec[vecp++] = r1bindex (whomproc, '/');
-                       vec[vecp++] = file;
-                       if (arg)
-                               while (*arg)
-                                       vec[vecp++] = *arg++;
-                       vec[vecp] = NULL;
-
-                       execvp (whomproc, vec);
-                       fprintf (stderr, "unable to exec ");
-                       perror (whomproc);
-                       _exit (-1);  /* NOTREACHED */
-
-               default:
-                       return (pidwait (pid, NOTOK) & 0377 ? 1 : 0);
-       }
-}
-
 
 /*
  * Remove the draft file