|
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: 1521 (0x5f1) Types: TextFile Names: »psap2dse.c«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0 └─⟦041b9c0f8⟧ »EurOpenD22/isode/pepsy.system-6.0.Z« └─⟦d49939f05⟧ └─⟦6a28ec38e⟧ »pepsy.tar« └─⟦this⟧ »acsap/psap2dse.c«
/* Copyright 1989 CSIRO Division of Information Technology * May be given away but not sold for profit - See Copyright file for details */ /* * Routine to convert a PSAPaddr structure into type_DSE_PSAPaddr structure * which pepsy generated encoder accepts */ #include <stdio.h> #include "psap.h" #include "isoaddrs.h" #include "tailor.h" #include "DSE-types.h" #define advise PY_advise #define new(x) (x *) malloc(sizeof (x)) struct type_DSE_PSAPaddr * psap2dse(psap) struct PSAPaddr *psap; { struct type_DSE_PSAPaddr *dse; register struct NSAPaddr *na, *ca; struct member_DSE_0 *nDSE, *oDSE; int n; if ((dse = new(struct type_DSE_PSAPaddr)) == NULL) return (NULL); if (psap->pa_selectlen > 0) dse->pSelector = str2qb(psap->pa_selector, psap->pa_selectlen, 1); if (psap->pa_addr.sa_selectlen > 0) dse->sSelector = str2qb(psap->pa_addr.sa_selector, psap->pa_addr.sa_selectlen, 1); if (psap->pa_addr.sa_addr.ta_selectlen > 0) dse->tSelector = str2qb(psap->pa_addr.sa_addr.ta_selector, psap->pa_addr.sa_addr.ta_selectlen, 1); na = psap->pa_addr.sa_addr.ta_addrs; oDSE = NULL; for (n = psap->pa_addr.sa_addr.ta_naddr; n > 0; na++, n--) { if ((nDSE = new(struct member_DSE_0)) == NULL) return (NULL); if ((ca = na2norm (na)) == NULLNA) { advise (NULLCP, "unable to normalize address"); /* ?? */ return NULL; } nDSE->member_DSE_1 = str2qb(ca->na_address, ca->na_addrlen, 1); nDSE->next = oDSE; } return (dse); }