From 084749132bb9b50e94f4925e0dd68066f91b198f Mon Sep 17 00:00:00 2001 From: goodale Date: Tue, 29 Sep 1998 16:20:02 +0000 Subject: Keyed data routines. git-svn-id: http://svn.cactuscode.org/flesh/trunk@18 17b73243-c579-4c4c-a9d2-2d5706c11dac --- src/include/StoreKeyedData.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/include/StoreKeyedData.h (limited to 'src/include/StoreKeyedData.h') diff --git a/src/include/StoreKeyedData.h b/src/include/StoreKeyedData.h new file mode 100644 index 00000000..fbb8a78d --- /dev/null +++ b/src/include/StoreKeyedData.h @@ -0,0 +1,39 @@ + /*@@ + @header StoreKeyedData.h + @date Tue Sep 1 10:45:08 1998 + @author Tom Goodale + @desc + Contains structures and function prototypes necessary to use + the StoreKeyedData routines. + @enddesc + + @version $Id$ + @@*/ + +#ifndef _STOREKEYEDDATA_H_ + +#define _STOREKEYEDDATA_H_ + +/* Define a data type for the storage. */ +typedef struct PKeyedData +{ + struct PKeyedData *last; + struct PKeyedData *next; + + int key; + + void *data; +} pKeyedData; + +/* Function prototypes. */ + +/* Store the data. */ +int StoreKeyedData(pKeyedData **storage, int key , void *data); + +/* Fet the data. */ +void *GetKeyedData(pKeyedData *storage, int key); + +/* destroy the data. */ +void DestroyKeyedData(pKeyedData *storage); + +#endif -- cgit v1.2.3