X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fwhatnowsbr.c;h=c0f331a2e96b4f5efe4fa1f11e6f439d215636d1;hp=afc56fd2f3048054811ecbde495b1ff2453ed301;hb=18017df38ebb626f6eed6f339641fd1298c326e7;hpb=51cb63baa791f6ba84c0a7f8538ecfd00b013bcb diff --git a/uip/whatnowsbr.c b/uip/whatnowsbr.c index afc56fd..c0f331a 100644 --- a/uip/whatnowsbr.c +++ b/uip/whatnowsbr.c @@ -83,8 +83,6 @@ static struct swit aleqs[] = { { "send []", 0 }, #define PUSHSW 6 { "push []", 0 }, -#define WHOMSW 7 - { "whom []", 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