Annotation of researchv10no/cmd/upas/misc/mail.c, revision 1.1

1.1     ! root        1: /*
        !             2:  * #!/bin/sh
        !             3:  * case $1 in
        !             4:  * -n)
        !             5:  *     exit 0 ;;
        !             6:  * -m*|-f*|-r*|-p*|-e*|"")
        !             7:  *     exec /usr/lib/upas/edmail $*
        !             8:  *     exit $? ;;
        !             9:  * *)
        !            10:  *     exec /usr/lib/upas/send $*
        !            11:  *     exit $? ;;
        !            12:  * esac
        !            13:  */
        !            14: 
        !            15: #include <stdio.h>
        !            16: 
        !            17: extern *UPASROOT;
        !            18: 
        !            19: #define        EDMAIL  "edmail"
        !            20: #define        SEND    "send"
        !            21: 
        !            22: main (argc, argv)
        !            23:        int argc;
        !            24:        char **argv;
        !            25: {
        !            26:        char *progname = SEND;
        !            27:        char realprog[500];
        !            28: 
        !            29:        if (argc > 1) {
        !            30:                if (argv[1][0] == '-') {
        !            31:                        switch (argv[1][1]) {
        !            32:                        case 'n':
        !            33:                                exit (0);
        !            34: 
        !            35:                        case 'm':
        !            36:                        case 'f':
        !            37:                        case 'r':
        !            38:                        case 'p':
        !            39:                        case 'e':
        !            40:                        case '\0':
        !            41:                                progname = EDMAIL;
        !            42:                        }
        !            43:                }
        !            44:        } else
        !            45:                progname = EDMAIL;
        !            46: 
        !            47:        sprintf(realprog, "%s/%s", UPASROOT, progname);
        !            48:        execv (realprog, argv);
        !            49:        perror (realprog);
        !            50:        exit (1);
        !            51: }
        !            52: 

unix.superglobalmegacorp.com

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