Annotation of 43BSD/contrib/mh/zotnet/mf/mmdfI/src/uucp/ch_uucp.c, revision 1.1

1.1     ! root        1: #include "util.h"
        !             2: #include "mmdf.h"
        !             3: #include "ch.h"
        !             4: #include <signal.h>
        !             5: 
        !             6: /*
        !             7:  *                     C H _ U U C P . C
        !             8:  *
        !             9:  *             Take message and feed a request to UUX
        !            10:  *
        !            11:  *  qu2uu_send does the interesting work.  This interface was developed
        !            12:  *  for MMDF by Doug Kingston at the US Army Ballistics Research Lab,
        !            13:  *  Aberdeen, Maryland.    <dpk@brl>
        !            14:  *
        !            15:  *                 Original Version 21 Oct 81
        !            16:  *
        !            17:  *                     Revision History
        !            18:  *                     ================
        !            19:  *
        !            20:  *    27-Oct-82        Marshall T. Rose <mrose%uci@rand-relay>
        !            21:  *             Support proper munging by using the UCI mail filtering
        !            22:  *             routines (enabled by #ifdef MF)
        !            23:  *
        !            24:  *    17-Oct-83 Marshall T. Rose <mrose%uci@rand-relay>
        !            25:  *             Major re-organization and some new interfacing.
        !            26:  *
        !            27:  */
        !            28: 
        !            29: /*
        !            30:  *     MULTI-CHANNEL MEMO DISTRIBUTION FACILITY  (MMDF)
        !            31:  *     
        !            32:  *
        !            33:  *     Department of Electrical Engineering
        !            34:  *     University of Delaware
        !            35:  *     Newark, Delaware  19711
        !            36:  *
        !            37:  *     Phone:  (302) 738-1163
        !            38:  *     
        !            39:  *
        !            40:  */
        !            41: 
        !            42: /*  */
        !            43: 
        !            44: extern char logdfldir[];
        !            45: 
        !            46: extern struct ll_struct chanlog;
        !            47: struct ll_struct   *logptr = &chanlog;
        !            48: 
        !            49: char   *dupfpath ();
        !            50: 
        !            51: /*  */
        !            52: 
        !            53: main (argc, argv)
        !            54: int     argc;
        !            55: char  **argv;
        !            56: {
        !            57:     short   retval;
        !            58:     Chan * chanptr;
        !            59: 
        !            60:     ll_hdinit (logptr, "UU");
        !            61:     logptr -> ll_file = dupfpath (logptr -> ll_file, logdfldir);
        !            62: 
        !            63:     siginit ();
        !            64:     signal (SIGINT, SIG_IGN);
        !            65: 
        !            66:     if ((chanptr = ch_nm2struct (*argv)) == (Chan *) NOTOK)
        !            67:        err_abrt (RP_PARM, "unknown channel name '%s'", *argv);
        !            68: 
        !            69:     retval = ch_uucp (argc, argv, chanptr);
        !            70:     ll_close (logptr);
        !            71: 
        !            72:     exit (retval);
        !            73: }
        !            74: 
        !            75: /*  */
        !            76: 
        !            77: ch_uucp (argc, argv, chanptr)
        !            78: int     argc;
        !            79: char  **argv;
        !            80: Chan * chanptr;
        !            81: {
        !            82: #ifdef DEBUG
        !            83:     logptr -> ll_level = LLOGBTR;
        !            84:     ll_log (logptr, LLOGBTR, "ch_uucp(argc=%d,*argv='%s')", argc, *argv);
        !            85: #endif
        !            86: 
        !            87:     if (rp_isbad (qu_init (argc, argv)))
        !            88:        return RP_NO;
        !            89:     if (rp_isbad (uu_init (chanptr)))
        !            90:        return RP_NO;
        !            91: 
        !            92:     if (rp_isbad (qu2uu_send ()))
        !            93:        return RP_NO;
        !            94: 
        !            95:     qu_end (OK);
        !            96:     uu_end (OK);
        !            97: 
        !            98:     return RP_OK;
        !            99: }
        !           100: 
        !           101: /*  */
        !           102: 
        !           103: err_abrt (code, fmt, b, c, d)
        !           104: short   code;
        !           105: char    fmt[],
        !           106:         b[],
        !           107:         c[],
        !           108:         d[];
        !           109: {
        !           110:     char    linebuf[LINESIZE];
        !           111: 
        !           112:     qu_end (NOTOK);
        !           113:     uu_end (NOTOK);
        !           114: 
        !           115:     sprintf (linebuf, "%s%s", "[ABEND:  %s]", fmt);
        !           116:     ll_log (logptr, LLOGFAT, linebuf, rp_valstr (code), b, c, d);
        !           117:     ll_close (logptr);
        !           118: 
        !           119:     exit (code);
        !           120: }

unix.superglobalmegacorp.com

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