Annotation of 43BSDReno/contrib/isode-beta/psap/pe2ssdu.c, revision 1.1.1.1

1.1       root        1: /* pe2ssdu.c - write a PE to a SSDU */
                      2: 
                      3: #ifndef        lint
                      4: static char *rcsid = "$Header: /f/osi/psap/RCS/pe2ssdu.c,v 7.0 89/11/23 22:12:57 mrose Rel $";
                      5: #endif
                      6: 
                      7: /* 
                      8:  * $Header: /f/osi/psap/RCS/pe2ssdu.c,v 7.0 89/11/23 22:12:57 mrose Rel $
                      9:  *
                     10:  *
                     11:  * $Log:       pe2ssdu.c,v $
                     12:  * Revision 7.0  89/11/23  22:12:57  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: int    pe2ssdu (pe, base, len)
                     37: register PE pe;
                     38: char  **base;
                     39: int    *len;
                     40: {
                     41:     register PS ps;
                     42: 
                     43:     *base = NULL, *len = 0;
                     44: 
                     45:     if ((ps = ps_alloc (str_open)) == NULLPS)
                     46:        return NOTOK;
                     47:     if (str_setup (ps, NULLCP, ps_get_abs (pe), 0) == NOTOK
                     48:            || pe2ps_aux (ps, pe, 0) == NOTOK) {
                     49:        ps_free (ps);
                     50:        return NOTOK;
                     51:     }
                     52: 
                     53:     *len = ps -> ps_ptr - (*base = ps -> ps_base);
                     54: 
                     55:     ps -> ps_base = ps -> ps_ptr = NULL;
                     56:     ps_free (ps);
                     57: 
                     58: #ifdef DEBUG
                     59:     if (psap_log -> ll_events & LLOG_PDUS)
                     60:        pe2text (psap_log, pe, 0, *len);
                     61: #endif
                     62: 
                     63:     return OK;
                     64: }

unix.superglobalmegacorp.com

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