Standardize License information
[openafs.git] / src / gtx / objdict.c
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  * 
5  * This software has been released under the terms of the IBM Public
6  * License.  For details, see the LICENSE file in the top-level source
7  * directory or online at http://www.openafs.org/dl/license10.html
8  */
9
10 /*
11  * Description:
12  *      Implementation of the gator object dictionary.
13  *
14  *------------------------------------------------------------------------*/
15
16 #include "gtxobjdict.h"                 /*Interface for this module*/
17 #include <stdio.h>                      /*Standard I/O package*/
18
19 static char mn[] = "gator_objdict";     /*Module name*/
20 static int objdict_debug;               /*Is debugging turned on?*/
21
22 /*------------------------------------------------------------------------
23  * gator_objdict_init
24  *
25  * Description:
26  *      Initialize the gator object dictionary package.
27  *
28  * Arguments:
29  *      int adebug: Is debugging turned on?
30  *
31  * Returns:
32  *      0 on success,
33  *      Error value otherwise.
34  *
35  * Environment:
36  *      *** MUST BE THE FIRST ROUTINE CALLED FROM
37  *            THIS PACKAGE ***
38  *
39  * Side Effects:
40  *      As advertised.
41  *------------------------------------------------------------------------*/
42
43 int gator_objdict_init(adebug)
44     int adebug;
45
46 { /*gator_objdict_init*/
47
48     static char rn[] = "gator_objdict_init";    /*Routine name*/
49
50     /*
51       * Remember what our debugging setting is.
52       */
53     objdict_debug = adebug;
54
55     if (objdict_debug)
56       fprintf(stderr, "[%s:%s] Called\n", mn, rn);
57
58     /*
59      * Finally, return the good news.
60      */
61     return(0);
62
63 } /*gator_objdict_init*/
64
65 /*------------------------------------------------------------------------
66  * gator_objdict_add
67  *
68  * Description:
69  *      Add an entry to the gator object dictionary.
70  *
71  * Arguments:
72  *      struct onode *objtoadd: Ptr to object to add.
73  *
74  * Returns:
75  *      0 on success,
76  *      Error value otherwise.
77  *
78  * Environment:
79  *      Nothing interesting.
80  *
81  * Side Effects:
82  *      As advertised.
83  *------------------------------------------------------------------------*/
84
85 int gator_objdict_add(objtoadd)
86     struct onode *objtoadd;
87
88 { /*gator_objdict_add*/
89
90     static char rn[] = "gator_objdict_add"; /*Routine name*/
91
92     if (objdict_debug)
93       fprintf(stderr, "[%s:%s] Called\n", mn, rn);
94
95     /*
96      * Finally, return the good news.
97      */
98     return(0);
99
100 } /*gator_objdict_add*/
101
102 /*------------------------------------------------------------------------
103  * gator_objdict_delete
104  *
105  * Description:
106  *      Delete an entry from the gator object dictionary.
107  *
108  * Arguments:
109  *      struct onode *objtodelete: Ptr to object to delete.
110  *
111  * Returns:
112  *      0 on success,
113  *      Error value otherwise.
114  *
115  * Environment:
116  *      Nothing interesting.
117  *
118  * Side Effects:
119  *      As advertised.
120  *------------------------------------------------------------------------*/
121
122 int gator_objdict_delete(objtodelete)
123     struct onode *objtodelete;
124
125 { /*gator_objdict_delete*/
126
127     static char rn[] = "gator_objdict_delete";  /*Routine name*/
128
129     if (objdict_debug)
130       fprintf(stderr, "[%s:%s] Called\n", mn, rn);
131
132     /*
133      * Finally, return the good news.
134      */
135     return(0);
136
137 } /*gator_objdict_delete*/
138
139 /*------------------------------------------------------------------------
140  * gator_objdict_lookup
141  *
142  * Description:
143  *      Look up a gator object by name.
144  *
145  * Arguments:
146  *      char *nametofind: String name of desired onode.
147  *
148  * Returns:
149  *      Ptr to desired onode if successful,
150  *      Null pointer otherwise.
151  *
152  * Environment:
153  *      Nothing interesting.
154  *
155  * Side Effects:
156  *      As advertised.
157  *------------------------------------------------------------------------*/
158
159 struct onode *gator_objdict_lookup(nametofind)
160     char *nametofind;
161
162 { /*gator_objdict_lookup*/
163
164     static char rn[] = "gator_objdict_lookup";  /*Routine name*/
165
166     if (objdict_debug)
167       fprintf(stderr, "[%s:%s] Called\n", mn, rn);
168
169     /*
170      * Finally, return the good news.
171      */
172     return((struct onode *)0);
173
174 } /*gator_objdict_lookup*/