|
|
1.1 ! root 1: /* objectbyname.c - getisobjectbyname */ ! 2: ! 3: #ifndef lint ! 4: static char *rcsid = "$Header: /f/osi/psap/RCS/objectbyname.c,v 7.0 89/11/23 22:12:47 mrose Rel $"; ! 5: #endif ! 6: ! 7: /* ! 8: * $Header: /f/osi/psap/RCS/objectbyname.c,v 7.0 89/11/23 22:12:47 mrose Rel $ ! 9: * ! 10: * ! 11: * $Log: objectbyname.c,v $ ! 12: * Revision 7.0 89/11/23 22:12:47 mrose ! 13: * Release 6.0 ! 14: * ! 15: */ ! 16: ! 17: /* ! 18: * NOTICE ! 19: * ! 20: * Acquisition, use, and distribution of this module and related ! 21: * materials are subject to the restrictions of a license agreement. ! 22: * Consult the Preface in the User's Manual for the full terms of ! 23: * this agreement. ! 24: * ! 25: */ ! 26: ! 27: ! 28: /* LINTLIBRARY */ ! 29: ! 30: #include <stdio.h> ! 31: #include "psap.h" ! 32: #include "tailor.h" ! 33: ! 34: /* */ ! 35: ! 36: struct isobject *getisobjectbyname (descriptor) ! 37: char *descriptor; ! 38: { ! 39: register struct isobject *io; ! 40: ! 41: isodetailor (NULLCP, 0); ! 42: #ifdef DEBUG ! 43: SLOG (addr_log, LLOG_TRACE, NULLCP, ! 44: ("getisobjectbyname \"%s\"", descriptor)); ! 45: #endif ! 46: ! 47: (void) setisobject (0); ! 48: while (io = getisobject ()) ! 49: if (strcmp (descriptor, io -> io_descriptor) == 0) ! 50: break; ! 51: (void) endisobject (); ! 52: ! 53: if (io) { ! 54: #ifdef DEBUG ! 55: SLOG (addr_log, LLOG_DEBUG, NULLCP, ! 56: ("\tODE: \"%s\"\tOID: %s", ! 57: io -> io_descriptor, sprintoid (&io -> io_identity))); ! 58: #endif ! 59: } ! 60: else ! 61: SLOG (addr_log, LLOG_EXCEPTIONS, NULLCP, ! 62: ("lookup of object \"%s\" failed", descriptor)); ! 63: ! 64: return io; ! 65: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.