Annotation of 43BSDReno/contrib/isode-beta/psap/qbuf2pe.c, revision 1.1

1.1     ! root        1: /* qbuf2pe.c - read a PE from a SSDU */
        !             2: 
        !             3: #ifndef        lint
        !             4: static char *rcsid = "$Header: /f/osi/psap/RCS/qbuf2pe.c,v 7.0 89/11/23 22:13:32 mrose Rel $";
        !             5: #endif
        !             6: 
        !             7: /* 
        !             8:  * $Header: /f/osi/psap/RCS/qbuf2pe.c,v 7.0 89/11/23 22:13:32 mrose Rel $
        !             9:  *
        !            10:  *
        !            11:  * $Log:       qbuf2pe.c,v $
        !            12:  * Revision 7.0  89/11/23  22:13:32  mrose
        !            13:  * Release 6.0
        !            14:  * 
        !            15:  */
        !            16: 
        !            17: /*
        !            18:  *                               NOTICE
        !            19:  *
        !            20:  *    Acquisition, use, and distribution of this module and related
        !            21:  *    materials are subject to the restrictions of a license agreement.
        !            22:  *    Consult the Preface in the User's Manual for the full terms of
        !            23:  *    this agreement.
        !            24:  *
        !            25:  */
        !            26: 
        !            27: 
        !            28: /* LINTLIBRARY */
        !            29: 
        !            30: #include <stdio.h>
        !            31: #include "psap.h"
        !            32: #include "tailor.h"
        !            33: 
        !            34: /*  */
        !            35: 
        !            36: #ifndef        DEBUG
        !            37: /* ARGSUSED */
        !            38: #endif
        !            39: 
        !            40: PE     qbuf2pe (qb, len, result)
        !            41: register struct qbuf *qb;
        !            42: int    len;
        !            43: int    *result;
        !            44: {
        !            45: #ifdef notdef
        !            46:     register struct qbuf *qp;
        !            47: #endif
        !            48:     register PE            pe;
        !            49:     register PS            ps;
        !            50: 
        !            51: #ifdef notdef          /* "inline" nonsense too difficult to handle */
        !            52:     if ((qp = qb -> qb_forw) != qb && qp -> qb_forw == qb) {
        !            53:        remque (qp);
        !            54: 
        !            55:        return ssdu2pe (qp -> qb_data, qp -> qb_len, (char *) qp, result);
        !            56:     }
        !            57: #endif
        !            58: 
        !            59:     if ((ps = ps_alloc (qbuf_open)) == NULLPS) {
        !            60:        *result = PS_ERR_NMEM;
        !            61:        return NULLPE;
        !            62:     }
        !            63:     if (qbuf_setup (ps, qb) == NOTOK || (pe = ps2pe (ps)) == NULLPE) {
        !            64:        if (ps -> ps_errno == PS_ERR_NONE)
        !            65:            ps -> ps_errno = PS_ERR_EOF;
        !            66:        *result = ps -> ps_errno;
        !            67:        ps_free (ps);
        !            68:        return NULLPE;
        !            69:     }
        !            70: 
        !            71:     *result = PS_ERR_NONE;
        !            72:     ps_free (ps);
        !            73: 
        !            74: #ifdef DEBUG
        !            75:     if (psap_log -> ll_events & LLOG_PDUS)
        !            76:        pe2text (psap_log, pe, 1, len);
        !            77: #endif
        !            78: 
        !            79:     return pe;
        !            80: }

unix.superglobalmegacorp.com

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