1 /* This file is part of the Project Athena Zephyr Notification System.
2 * It is one of the source files comprising zwgc, the Zephyr WindowGram
5 * Created by: Marc Horowitz <marc@athena.mit.edu>
9 * Copyright (c) 1989 by the Massachusetts Institute of Technology.
10 * For copying and distribution information, see the file
14 #ifndef string_dictionary_aux_MODULE
15 #define string_dictionary_aux_MODULE
17 #include "new_memory.h"
18 #include "string_dictionary.h"
21 * void string_dictionary_Set(string_dictionary d, string key,string value):
23 * Effects: Binds key to value in d. Automatically free's the
24 * previous value of key, if any. Value is copied on the
28 extern void string__dictionary_Set(string_dictionary, string, string);
30 #define string_dictionary_Set(a,b,c) (set_module(__FILE__,__LINE__),\
31 string__dictionary_Set(a,b,c))
33 #define string_dictionary_Set(a,b,c) string__dictionary_Set(a,b,c)
37 * char *string_dictionary_Fetch(string_dictionary d, string key)
38 * Effects: If key is not bound in d, returns 0. Otherwise,
39 * returns the value that key is bound to.
40 * Note that the returned string if any should not be
41 * freed or modified in any way. Note also that it may
42 * disappear later if key is rebound.
45 extern char *string_dictionary_Fetch(string_dictionary,
49 * void string_dictionary_SafeDestroy(string_dictionary d)
51 * Effects: Like string_dictionary_Destroy except first frees
52 * all value's in the dictionary.
55 extern void string_dictionary_SafeDestroy(string_dictionary);