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