X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fsend.c;h=84e05dfb31386d64a6d1b312c8156e945bbba8ef;hp=a2e9932956805c47f65574703617c50f037c1d60;hb=32b2354dbaf4bf934936eb5b102a4a3d2fdd209a;hpb=b3628819b4ab903269cd83cc68e453b13534346c diff --git a/uip/send.c b/uip/send.c index a2e9932..84e05df 100644 --- a/uip/send.c +++ b/uip/send.c @@ -22,8 +22,6 @@ #include int debugsw = 0; /* global */ -int forwsw = 1; -int pushsw = 0; int verbsw = 0; char *altmsg = NULL; char *annotext = NULL; @@ -44,10 +42,8 @@ static FILE *composition_file; /* composition file pointer */ /* ** static prototypes */ -static int sendsbr(char **, int, char *, struct stat *, int); +static int sendsbr(char **, int, char *, struct stat *); static void armed_done(int) NORETURN; -static void alert(char *, int); -static int tmp_fd(void); static void anno(struct stat *); static int sendaux(char **, int, char *, struct stat *); static int attach(char *); @@ -61,25 +57,17 @@ static struct swit switches[] = { { "alias aliasfile", 0 }, #define DEBUGSW 1 { "debug", -5 }, -#define FORWSW 2 - { "forward", 0 }, -#define NFORWSW 3 - { "noforward", 0 }, -#define PUSHSW 4 - { "push", 0 }, -#define NPUSHSW 5 - { "nopush", 0 }, -#define VERBSW 6 +#define VERBSW 2 { "verbose", 0 }, -#define NVERBSW 7 +#define NVERBSW 3 { "noverbose", 0 }, -#define WATCSW 8 +#define WATCSW 4 { "watch", 0 }, -#define NWATCSW 9 +#define NWATCSW 5 { "nowatch", 0 }, -#define VERSIONSW 10 - { "version", 0 }, -#define HELPSW 11 +#define VERSIONSW 6 + { "Version", 0 }, +#define HELPSW 7 { "help", 0 }, { NULL, 0 } }; @@ -134,20 +122,6 @@ main(int argc, char **argv) print_version(invo_name); done(1); - case PUSHSW: - pushsw++; - continue; - case NPUSHSW: - pushsw = 0; - continue; - - case FORWSW: - forwsw++; - continue; - case NFORWSW: - forwsw = 0; - continue; - case VERBSW: verbsw++; vec[vecp++] = --cp; @@ -267,36 +241,6 @@ main(int argc, char **argv) st.st_dev = 0; st.st_ino = 0; } - if (pushsw) { - /* push a fork into the background */ - pid_t pid; - - switch (pid = fork()) { - case -1: - /* fork error */ - advise(NULL, "unable to fork, so can't push..."); - break; - - default: - /* parent, just exit */ - done(0); - - case 0: - /* child, block a few signals and continue */ - SIGNAL(SIGHUP, SIG_IGN); - SIGNAL(SIGINT, SIG_IGN); - SIGNAL(SIGQUIT, SIG_IGN); - SIGNAL(SIGTERM, SIG_IGN); -#ifdef SIGTSTP - SIGNAL(SIGTSTP, SIG_IGN); - SIGNAL(SIGTTIN, SIG_IGN); - SIGNAL(SIGTTOU, SIG_IGN); -#endif - freopen("/dev/null", "r", stdin); - freopen("/dev/null", "w", stdout); - break; - } - } status = 0; vec[0] = "spost"; for (n=3; n