7 /* dictionary manager interface to static variables
9 /* #include <dict_static.h>
11 /* DICT *dict_static_open(name, dummy, dict_flags)
16 /* dict_static_open() implements a dummy dictionary that returns
17 /* as lookup result the dictionary name, regardless of the lookup
20 /* The \fIdummy\fR argument is ignored.
22 /* dict(3) generic dictionary manager
26 /* The Secure Mailer license must be distributed with this software.
35 #include <stdio.h> /* sprintf() prototype */
40 /* Utility library. */
45 #include "dict_static.h"
47 /* dict_static_lookup - access static value*/
49 static const char *dict_static_lookup(DICT
*dict
, const char *unused_name
)
56 /* dict_static_close - close static dictionary */
58 static void dict_static_close(DICT
*dict
)
63 /* dict_static_open - make association with static variable */
65 DICT
*dict_static_open(const char *name
, int unused_flags
, int dict_flags
)
69 dict
= dict_alloc(DICT_TYPE_STATIC
, name
, sizeof(*dict
));
70 dict
->lookup
= dict_static_lookup
;
71 dict
->close
= dict_static_close
;
72 dict
->flags
= dict_flags
| DICT_FLAG_FIXED
;
73 return (DICT_DEBUG (dict
));