|
|
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 a
Length: 2534 (0x9e6)
Types: TextFile
Names: »aetseq.c«
└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape
└─⟦eba4602b1⟧ »./isode-5.0.tar.Z«
└─⟦d3ac74d73⟧
└─⟦this⟧ »isode-5.0/acsap/aetseq.c«
/* aetseq.c - application entity titles -- sequential lookup */
#ifndef lint
static char *rcsid = "$Header: /f/osi/acsap/RCS/aetseq.c,v 6.0 89/03/18 23:24:36 mrose Rel $";
#endif
/*
* $Header: /f/osi/acsap/RCS/aetseq.c,v 6.0 89/03/18 23:24:36 mrose Rel $
*
*
* $Log: aetseq.c,v $
* Revision 6.0 89/03/18 23:24:36 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"
#include "isoaddrs.h"
/* \f
DATA */
static char objent[BUFSIZ];
static struct isoentity ies;
/* \f
*/
int str2aet_seq (designator, qualifier, iep)
char *designator,
*qualifier;
struct isoentity *iep;
{
int hitdes,
hitqual;
char descriptor[BUFSIZ],
desdflt[BUFSIZ],
qualdflt[BUFSIZ];
register struct isoentity *ie;
struct isoentity ids,
iqs;
(void) sprintf (objent, "%s-%s", designator, qualifier);
(void) sprintf (desdflt, "%s-%s", designator, "default");
(void) sprintf (qualdflt, "%s-%s", "default", qualifier);
hitdes = hitqual = 0;
bzero ((char *) &ids, sizeof ids);
bzero ((char *) &iqs, sizeof iqs);
ie = NULL;
if (!setisoentity (0))
return NOTOK;
while (_startisoentity (descriptor) == OK) {
if (strcmp (descriptor, objent) == 0) {
if (_stopisoentity (descriptor, &ies) != OK)
continue;
ie = &ies;
break;
}
if (!hitdes && strcmp (descriptor, desdflt) == 0) {
if (_stopisoentity (descriptor, &ies) != OK)
continue;
ies.ie_descriptor = objent;
hitdes++;
ids = ies; /* struct copy */
continue;
}
if (!hitqual && strcmp (descriptor, qualdflt) == 0) {
if (_stopisoentity (descriptor, &ies) != OK)
continue;
ies.ie_descriptor = objent;
hitqual++;
iqs = ies; /* struct copy */
continue;
}
_scanisoentity ();
}
(void) endisoentity ();
if (!ie && hitqual) {
ie = &ies;
*ie = iqs; /* struct copy */
if (hitdes) {
bcopy ((char *) ids.ie_addr.pa_addr.sa_addr.ta_addrs,
(char *) ie -> ie_addr.pa_addr.sa_addr.ta_addrs,
sizeof ie -> ie_addr.pa_addr.sa_addr.ta_addrs);
ie -> ie_addr.pa_addr.sa_addr.ta_naddr =
ids.ie_addr.pa_addr.sa_addr.ta_naddr;
}
}
if (ie) {
*iep = *ie; /* struct copy */
return OK;
}
return NOTOK;
}