|
|
1.1 root 1: /* ryfind.c - ROSY: find operations and errors by numbers and names */
2:
3: #ifndef lint
4: static char *rcsid = "$Header: /f/osi/rosy/RCS/ryfind.c,v 6.0 89/03/18 23:42:52 mrose Rel $";
5: #endif
6:
7: /*
8: * $Header: /f/osi/rosy/RCS/ryfind.c,v 6.0 89/03/18 23:42:52 mrose Rel $
9: *
10: *
11: * $Log: ryfind.c,v $
12: * Revision 6.0 89/03/18 23:42:52 mrose
13: * Release 5.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 "rosy.h"
32:
33: /* */
34:
35: struct RyOperation *findopbyop (ryo, op)
36: register struct RyOperation *ryo;
37: int op;
38: {
39: if (!ryo)
40: return NULL;
41:
42: for (; ryo -> ryo_name; ryo++)
43: if (ryo -> ryo_op == op)
44: return ryo;
45:
46: return NULL;
47: }
48:
49:
50: struct RyOperation *findopbyname (ryo, name)
51: register struct RyOperation *ryo;
52: char *name;
53: {
54: if (!ryo)
55: return NULL;
56:
57: for (; ryo -> ryo_name; ryo++)
58: if (strcmp (ryo -> ryo_name, name) == 0)
59: return ryo;
60:
61: return NULL;
62: }
63:
64:
65: struct RyError *finderrbyerr (rye, err)
66: register struct RyError *rye;
67: int err;
68: {
69: if (!rye)
70: return NULL;
71:
72: for (; rye -> rye_name; rye++)
73: if (rye -> rye_err == err)
74: return rye;
75:
76: return NULL;
77: }
78:
79:
80: struct RyError *finderrbyname (rye, name)
81: register struct RyError *rye;
82: char *name;
83: {
84: if (!rye)
85: return NULL;
86:
87: for (; rye -> rye_name; rye++)
88: if (strcmp (rye -> rye_name, name) == 0)
89: return rye;
90:
91: return NULL;
92: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.