Changed prototype for chr_map_input - added const.
[idzebra-moved-to-github.git] / include / res.h
1 /*
2  * Copyright (C) 1994-1997, Index Data I/S 
3  * All rights reserved.
4  * Sebastian Hammer, Adam Dickmeiss
5  *
6  * $Log: res.h,v $
7  * Revision 1.7  1997-09-05 15:30:02  adam
8  * Changed prototype for chr_map_input - added const.
9  * Added support for C++, headers uses extern "C" for public definitions.
10  *
11  * Revision 1.6  1996/10/29 13:44:12  adam
12  * Added res_get_match.
13  *
14  * Revision 1.5  1994/09/16 14:37:46  quinn
15  * added res_get_def
16  *
17  * Revision 1.4  1994/09/06  13:02:29  quinn
18  * Removed const from res_get
19  *
20  * Revision 1.3  1994/08/18  09:43:04  adam
21  * Added res_trav. Major changes of prototypes.
22  *
23  * Revision 1.2  1994/08/18  08:22:26  adam
24  * Res.h modified. xmalloc now declares xstrdup.
25  *
26  */
27
28 #ifndef RES_H
29 #define RES_H
30
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34
35 struct res_entry {
36     char *name;
37     char *value;
38     struct res_entry *next;
39 };
40
41 typedef struct res_struct {
42     struct res_entry *first, *last;
43     char *name;
44     int  init;
45 } *Res;
46
47 Res res_open (const char *name);
48 void res_close (Res r);
49 char *res_get (Res r, const char *name);
50 char *res_get_def (Res r, const char *name, char *def);
51 int res_get_match (Res r, const char *name, const char *value, const char *s);
52 void res_put (Res r, const char *name, const char *value);
53 void res_trav (Res r, const char *prefix, 
54                void (*f)(const char *name, const char *value));
55 int res_write (Res r);
56
57 #ifdef __cplusplus
58 }
59 #endif
60
61 #endif