summaryrefslogtreecommitdiff
path: root/src/include/StoreNamedData.h
blob: 4437ed273770ed578899e4ee006e3e2bea573998 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
 /*@@
   @header    StoreNamedData.h
   @date      Tue Sep  1 10:45:08 1998
   @author    Tom Goodale
   @desc 
   Contains structures and function prototypes necessary to use
   the StoreNamedData routines.
   @enddesc 

   @version $Id$
 @@*/

#ifndef _STORENAMEDDATA_H_

#define _STORENAMEDDATA_H_

/* Define a data type for the storage. */
typedef struct PNamedData
{
  struct PNamedData *last;
  struct PNamedData *next;

  char *name;

  void *data;
} pNamedData;

/* Function prototypes. */

#ifdef __cplusplus
extern "C" {
#endif

/* Store the data. */
int StoreNamedData(pNamedData **list, const char *name, void *data);

/* Fetch the data. */
void *GetNamedData(pNamedData *list, const char *name);

/* destroy the data. */
void DestroyNamedDataList(pNamedData *list);

#ifdef __cplusplus
}
#endif

#endif