added res_get_def
[idzebra-moved-to-github.git] / include / res.h
1 /*
2  * Copyright (C) 1994, Index Data I/S 
3  * All rights reserved.
4  * Sebastian Hammer, Adam Dickmeiss
5  *
6  * $Log: res.h,v $
7  * Revision 1.5  1994-09-16 14:37:46  quinn
8  * added res_get_def
9  *
10  * Revision 1.4  1994/09/06  13:02:29  quinn
11  * Removed const from res_get
12  *
13  * Revision 1.3  1994/08/18  09:43:04  adam
14  * Added res_trav. Major changes of prototypes.
15  *
16  * Revision 1.2  1994/08/18  08:22:26  adam
17  * Res.h modified. xmalloc now declares xstrdup.
18  *
19  */
20
21 #ifndef RES_H
22 #define RES_H
23
24 struct res_entry {
25     char *name;
26     char *value;
27     struct res_entry *next;
28 };
29
30 typedef struct res_struct {
31     struct res_entry *first, *last;
32     char *name;
33     int  init;
34 } *Res;
35
36 Res res_open (const char *name);
37 void res_close (Res r);
38 char *res_get (Res r, const char *name);
39 char *res_get_def (Res r, const char *name, char *def);
40 void res_put (Res r, const char *name, const char *value);
41 void res_trav (Res r, const char *prefix, 
42                void (*f)(const char *name, const char *value));
43 int res_write (Res r);
44 #endif