|
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 i
Length: 1943 (0x797) Types: TextFile Names: »isobject.c«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0 └─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z« └─⟦de7628f85⟧ └─⟦this⟧ »isode-6.0/psap/isobject.c«
/* isobject.c - lookup Object IDentifiers/DEscriptors */ #ifndef lint static char *rcsid = "$Header: /f/osi/psap/RCS/isobject.c,v 7.0 89/11/23 22:12:40 mrose Rel $"; #endif /* * $Header: /f/osi/psap/RCS/isobject.c,v 7.0 89/11/23 22:12:40 mrose Rel $ * * * $Log: isobject.c,v $ * Revision 7.0 89/11/23 22:12:40 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 <ctype.h> #include <stdio.h> #include "psap.h" #include "tailor.h" /* \f DATA */ static char *isobjects = "isobjects"; static FILE *servf = NULL; static int stayopen = 0; static struct isobject ios; /* \f */ int setisobject (f) int f; { if (servf == NULL) servf = fopen (isodefile (isobjects, 0), "r"); else rewind (servf); stayopen |= f; return (servf != NULL); } int endisobject () { if (servf && !stayopen) { (void) fclose (servf); servf = NULL; } return 1; } /* \f */ struct isobject *getisobject () { register int i; register struct isobject *io = &ios; register char *cp; static char buffer[BUFSIZ + 1]; static char *vec[NVEC + NSLACK + 1]; static unsigned int elements[NELEM + 1]; if (servf == NULL && (servf = fopen (isodefile (isobjects, 0), "r")) == NULL) return NULL; bzero ((char *) io, sizeof *io); while (fgets (buffer, sizeof buffer, servf) != NULL) { if (*buffer == '#') continue; if (cp = index (buffer, '\n')) *cp = NULL; if (str2vec (buffer, vec) < 2) continue; if ((i = str2elem (vec[1], elements)) <= 1) continue; io -> io_descriptor = vec[0]; io -> io_identity.oid_elements = elements; io -> io_identity.oid_nelem = i; return io; } return NULL; }