Annotation of 43BSD/contrib/mh/sbr/refile.c, revision 1.1.1.1

1.1       root        1: /* refile.c - refile the draft into another folder */
                      2: 
                      3: 
                      4: #include "../h/mh.h"
                      5: #include <stdio.h>
                      6: 
                      7: int     refile (arg, file)
                      8: register char **arg,
                      9:                *file;
                     10: {
                     11:     int     pid;
                     12:     register int    vecp;
                     13:     char   *vec[MAXARGS];
                     14: 
                     15:     vecp = 0;
                     16:     vec[vecp++] = r1bindex (fileproc, '/');
                     17:     vec[vecp++] = "-file";
                     18:     vec[vecp++] = file;
                     19: 
                     20:     if (arg)
                     21:        while (*arg)
                     22:            vec[vecp++] = *arg++;
                     23:     vec[vecp] = NULL;
                     24: 
                     25:     m_update ();
                     26:     (void) fflush (stdout);
                     27: 
                     28:     switch (pid = vfork ()) {
                     29:        case NOTOK: 
                     30:            advise ("fork", "unable to");
                     31:            return NOTOK;
                     32: 
                     33:        case OK: 
                     34:            execvp (fileproc, vec);
                     35:            fprintf (stderr, "unable to exec ");
                     36:            perror (fileproc);
                     37:            _exit (-1);
                     38: 
                     39:        default: 
                     40:            return (pidwait (pid, NOTOK));
                     41:     }
                     42: }

unix.superglobalmegacorp.com

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