pull-prototypes-to-head-20020821
[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 <afsconfig.h>
17 #include <afs/param.h>
18
19 RCSID("$Header$");
20
21 #include "gtxobjdict.h"                 /*Interface for this module*/
22 #include <stdio.h>                      /*Standard I/O package*/
23
24 static char mn[] = "gator_objdict";     /*Module name*/
25 static int objdict_debug;               /*Is debugging turned on?*/
26
27 /*------------------------------------------------------------------------
28  * gator_objdict_init
29  *
30  * Description:
31  *      Initialize the gator object dictionary package.
32  *
33  * Arguments:
34  *      int adebug: Is debugging turned on?
35  *
36  * Returns:
37  *      0 on success,
38  *      Error value otherwise.
39  *
40  * Environment:
41  *      *** MUST BE THE FIRST ROUTINE CALLED FROM
42  *            THIS PACKAGE ***
43  *
44  * Side Effects:
45  *      As advertised.
46  *------------------------------------------------------------------------*/
47
48 int gator_objdict_init(adebug)
49     int adebug;
50
51 { /*gator_objdict_init*/
52
53     static char rn[] = "gator_objdict_init";    /*Routine name*/
54
55     /*
56       * Remember what our debugging setting is.
57       */
58     objdict_debug = adebug;
59
60     if (objdict_debug)
61       fprintf(stderr, "[%s:%s] Called\n", mn, rn);
62
63     /*
64      * Finally, return the good news.
65      */
66     return(0);
67
68 } /*gator_objdict_init*/
69
70 /*------------------------------------------------------------------------
71  * gator_objdict_add
72  *
73  * Description:
74  *      Add an entry to the gator object dictionary.
75  *
76  * Arguments:
77  *      struct onode *objtoadd: Ptr to object to add.
78  *
79  * Returns:
80  *      0 on success,
81  *      Error value otherwise.
82  *
83  * Environment:
84  *      Nothing interesting.
85  *
86  * Side Effects:
87  *      As advertised.
88  *------------------------------------------------------------------------*/
89
90 int gator_objdict_add(objtoadd)
91     struct onode *objtoadd;
92
93 { /*gator_objdict_add*/
94
95     static char rn[] = "gator_objdict_add"; /*Routine name*/
96
97     if (objdict_debug)
98       fprintf(stderr, "[%s:%s] Called\n", mn, rn);
99
100     /*
101      * Finally, return the good news.
102      */
103     return(0);
104
105 } /*gator_objdict_add*/
106
107 /*------------------------------------------------------------------------
108  * gator_objdict_delete
109  *
110  * Description:
111  *      Delete an entry from the gator object dictionary.
112  *
113  * Arguments:
114  *      struct onode *objtodelete: Ptr to object to delete.
115  *
116  * Returns:
117  *      0 on success,
118  *      Error value otherwise.
119  *
120  * Environment:
121  *      Nothing interesting.
122  *
123  * Side Effects:
124  *      As advertised.
125  *------------------------------------------------------------------------*/
126
127 int gator_objdict_delete(objtodelete)
128     struct onode *objtodelete;
129
130 { /*gator_objdict_delete*/
131
132     static char rn[] = "gator_objdict_delete";  /*Routine name*/
133
134     if (objdict_debug)
135       fprintf(stderr, "[%s:%s] Called\n", mn, rn);
136
137     /*
138      * Finally, return the good news.
139      */
140     return(0);
141
142 } /*gator_objdict_delete*/
143
144 /*------------------------------------------------------------------------
145  * gator_objdict_lookup
146  *
147  * Description:
148  *      Look up a gator object by name.
149  *
150  * Arguments:
151  *      char *nametofind: String name of desired onode.
152  *
153  * Returns:
154  *      Ptr to desired onode if successful,
155  *      Null pointer otherwise.
156  *
157  * Environment:
158  *      Nothing interesting.
159  *
160  * Side Effects:
161  *      As advertised.
162  *------------------------------------------------------------------------*/
163
164 struct onode *gator_objdict_lookup(nametofind)
165     char *nametofind;
166
167 { /*gator_objdict_lookup*/
168
169     static char rn[] = "gator_objdict_lookup";  /*Routine name*/
170
171     if (objdict_debug)
172       fprintf(stderr, "[%s:%s] Called\n", mn, rn);
173
174     /*
175      * Finally, return the good news.
176      */
177     return(NULL);
178
179 } /*gator_objdict_lookup*/