Annotation of researchv8dc/cmd/upas/rfc822/tommdf.c, revision 1.1

1.1     ! root        1: #include <stdio.h>
        !             2: #include "mail.h"
        !             3: 
        !             4: int rmail = 0;
        !             5: int onatty = 0;
        !             6: 
        !             7: /* imports */
        !             8: extern FILE *popen();
        !             9: extern char *convertaddr();
        !            10: extern void to822();
        !            11: 
        !            12: main(ac, av)
        !            13: int ac;
        !            14: char *av[];
        !            15: {
        !            16:        char buf[FROMLINESIZE];
        !            17:        int status;
        !            18:        FILE *fp;
        !            19: 
        !            20:        if (ac != 3)
        !            21:                exit(1);
        !            22:        /* start up the mailer and pipe mail into it */
        !            23:        fp = (FILE *)popen("/usr/mmdf/lib/submit -stmlrxto", getuid(), getgid());
        !            24:        if (fp == NULL)
        !            25:                exit(1);
        !            26:        fprintf(fp, "To: %s\n", convertaddr(av[1]));
        !            27:        (void)to822(fp, av[2]); 
        !            28: 
        !            29:        /* return any errors */
        !            30:        status = pclose(fp, buf, sizeof(buf));
        !            31:        if (status)
        !            32:                write(2, buf, strlen(buf));
        !            33:        return status;
        !            34: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.