X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fwhatnowsbr.c;h=c0f331a2e96b4f5efe4fa1f11e6f439d215636d1;hp=a41ee46a004cd3189b787117de75101b58b61469;hb=18017df38ebb626f6eed6f339641fd1298c326e7;hpb=a485ed478abbd599d8c9aab48934e7a26733ecb1 diff --git a/uip/whatnowsbr.c b/uip/whatnowsbr.c index a41ee46..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' || @@ -1017,8 +1009,6 @@ static struct swit sendswitches[] = { { "push", 0 }, #define NSPSHSW 13 { "nopush", 0 }, -#define SPLITSW 14 - { "split seconds", 0 }, #define UNIQSW 15 { "unique", -6 }, #define NUNIQSW 16 @@ -1075,7 +1065,6 @@ extern int debugsw; /* from sendsbr.c */ extern int forwsw; extern int inplace; extern int pushsw; -extern int splitsw; extern int unique; extern int verbsw; @@ -1173,13 +1162,6 @@ sendit (char *sp, char **arg, char *file, int pushed) pushed = 0; continue; - case SPLITSW: - if (!(cp = *argp++) || sscanf (cp, "%d", &splitsw) != 1) { - advise (NULL, "missing argument to %s", argp[-2]); - return; - } - continue; - case UNIQSW: unique++; continue; @@ -1336,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