/* automatically generated by pepy 8.0 #1 (big-screw), do not edit! */

#include "psap.h"

#define	advise	PY_advise

void	advise ();

/* Generated from module UNIV */

#ifndef	lint
static char *rcsid = "$Header: /xtel/isode/isode/pepsy/RCS/UNIV.py,v 9.0 1992/06/16 12:24:03 isode Rel $";
#endif

#ifndef PEPYPARM
#define PEPYPARM char *
#endif /* PEPYPARM */
extern PEPYPARM NullParm;

/* ARGSUSED */

int	build_UNIV_EXTERNAL (pe, explicit, len, buffer, parm)
register PE     *pe;
int	explicit;
int	len;
char   *buffer;
PEPYPARM parm;
{
    PE	p21_z = NULLPE;
    register PE *p21 = &p21_z;

    if (((*pe) = pe_alloc (PE_CLASS_UNIV, PE_FORM_CONS, 8)) == NULLPE) {
        advise (NULLCP, "EXTERNAL: %s", PEPY_ERR_NOMEM);
        return NOTOK;
    }
    (*p21) = NULLPE;

    if ((*p21) != NULLPE)
        if (seq_add ((*pe), (*p21), -1) == NOTOK) {
            advise (NULLCP, "EXTERNAL %s%s", PEPY_ERR_BAD_SEQ,
                    pe_error ((*pe) -> pe_errno));
            return NOTOK;
        }
    (*p21) = NULLPE;

    if ((*p21) != NULLPE)
        if (seq_add ((*pe), (*p21), -1) == NOTOK) {
            advise (NULLCP, "EXTERNAL %s%s", PEPY_ERR_BAD_SEQ,
                    pe_error ((*pe) -> pe_errno));
            return NOTOK;
        }
    (*p21) = NULLPE;

    if ((*p21) != NULLPE)
        if (seq_add ((*pe), (*p21), -1) == NOTOK) {
            advise (NULLCP, "EXTERNAL %s%s", PEPY_ERR_BAD_SEQ,
                    pe_error ((*pe) -> pe_errno));
            return NOTOK;
        }
    (*p21) = NULLPE;

    {	/* encoding */

#ifdef DEBUG
        (void) testdebug ((*p21), "encoding");
#endif

    }

    if ((*p21) != NULLPE)
        if (seq_add ((*pe), (*p21), -1) == NOTOK) {
            advise (NULLCP, "EXTERNAL %s%s", PEPY_ERR_BAD_SEQ,
                    pe_error ((*pe) -> pe_errno));
            return NOTOK;
        }

#ifdef DEBUG
    (void) testdebug ((*pe), "UNIV.EXTERNAL");
#endif


    return OK;
}
