|
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 p
Length: 1523 (0x5f3) Types: TextFile Names: »pe_cpy.c«
└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape └─⟦eba4602b1⟧ »./isode-5.0.tar.Z« └─⟦d3ac74d73⟧ └─⟦this⟧ »isode-5.0/psap/pe_cpy.c«
/* pe_cpy.c - copy a presentation element */ #ifndef lint static char *rcsid = "$Header: /f/osi/psap/RCS/pe_cpy.c,v 6.0 89/03/18 23:38:42 mrose Rel $"; #endif /* * $Header: /f/osi/psap/RCS/pe_cpy.c,v 6.0 89/03/18 23:38:42 mrose Rel $ * * * $Log: pe_cpy.c,v $ * Revision 6.0 89/03/18 23:38:42 mrose * Release 5.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" /* \f */ PE pe_cpy (pe) register PE pe; { register PE p, *q, r; if ((p = pe_alloc (pe -> pe_class, pe -> pe_form, pe -> pe_id)) == NULLPE) return NULLPE; p -> pe_context = pe -> pe_context; p -> pe_len = pe -> pe_len; switch (p -> pe_form) { case PE_FORM_ICONS: p -> pe_ilen = pe -> pe_ilen; /* and fall */ case PE_FORM_PRIM: if (pe -> pe_prim == NULLPED) break; if ((p -> pe_prim = PEDalloc (p -> pe_len)) == NULLPED) goto you_lose; PEDcpy (pe -> pe_prim, p -> pe_prim, p -> pe_len); break; case PE_FORM_CONS: for (q = &p -> pe_cons, r = pe -> pe_cons; r; q = &((*q) -> pe_next), r = r -> pe_next) if ((*q = pe_cpy (r)) == NULLPE) goto you_lose; break; } p -> pe_nbits = pe -> pe_nbits; return p; you_lose: ; pe_free (p); return NULLPE; }