|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T q
Length: 1637 (0x665)
Types: TextFile
Names: »qb2prim.c«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
└─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z«
└─⟦de7628f85⟧
└─⟦this⟧ »isode-6.0/psap/qb2prim.c«
/* qb2prim.c - octet string to primitive */
#ifndef lint
static char *rcsid = "$Header: /f/osi/psap/RCS/qb2prim.c,v 7.0 89/11/23 22:13:29 mrose Rel $";
#endif
/*
* $Header: /f/osi/psap/RCS/qb2prim.c,v 7.0 89/11/23 22:13:29 mrose Rel $
*
*
* $Log: qb2prim.c,v $
* Revision 7.0 89/11/23 22:13:29 mrose
* Release 6.0
*
*/
/*
* NOTICE
*
* Acquisition, use, and distribution of this module and related
* materials are subject to the restrictions of a license agreement.
* Consult the Preface in the User's Manual for the full terms of
* this agreement.
*
*/
/* LINTLIBRARY */
#include <stdio.h>
#include "psap.h"
/* form: PRIMitive or CONStructor --
qb2prim - octet string (via qbufs) to presentation element
*/
/* \f
*/
PE qb2prim (qb, class, id)
register struct qbuf *qb;
PElementClass class;
PElementID id;
{
register PE pe,
p;
register struct qbuf *qp;
if (qb == NULL)
return NULLPE;
if ((qp = qb -> qb_forw) == qb || qp -> qb_forw == qb) {
if ((pe = pe_alloc (class, PE_FORM_PRIM, id)) == NULLPE)
return NULLPE;
if (pe -> pe_len = qp -> qb_len)
pe -> pe_prim = (PElementData) qp -> qb_data;
pe -> pe_inline = 1;
}
else {
if ((pe = pe_alloc (class, PE_FORM_CONS, id)) == NULLPE)
return NULLPE;
do {
if (seq_add (pe, p = pe_alloc (PE_CLASS_UNIV, PE_FORM_PRIM,
PE_PRIM_OCTS), -1) == NOTOK) {
pe_free (pe);
return NULLPE;
}
p -> pe_len = qp -> qb_len;
p -> pe_prim = (PElementData) qp -> qb_data;
p -> pe_inline = 1;
qp = qp -> qb_forw;
}
while (qp != qb);
}
return pe;
}