table.h

00001 /***************************************************************************
00002     begin                : Wed Dec 20 2006
00003     copyright            : (C) 2006 by Alper Akcan
00004     email                : distchx@yahoo.com
00005   ***************************************************************************/
00006 
00007 /***************************************************************************
00008  *                                                                         *
00009  *   This program is free software; you can redistribute it and/or modify  *
00010  *   it under the terms of the GNU Lesser General Public License as        *
00011  *   published by the Free Software Foundation; either version 2.1 of the  *
00012  *   License, or (at your option) any later version.                       *
00013  *                                                                         *
00014  ***************************************************************************/
00015 
00016 #ifndef TABLE_H_
00017 #define TABLE_H_
00018 
00019 typedef struct w_node_s w_node_t;
00020 typedef struct w_table_s w_table_t;
00021 
00022 struct w_node_s {
00023         unsigned long int key;
00024         char *name;
00025         w_node_t *next;
00026         w_node_t *prev;
00027         w_table_t *table;
00028         void *data;
00029 };
00030 
00031 struct w_table_s {
00032         w_table_t *table;
00033         w_node_t *node;
00034 };
00035 
00036 int table_add (w_table_t *table, unsigned int tlen, unsigned int mask, char *name, void *data);
00037 w_node_t * table_get_node (w_table_t *table, unsigned int tlen, unsigned int mask, char *name);
00038 void * table_get_data (w_table_t *table, unsigned int tlen, unsigned int mask, char *name);
00039 int table_del (w_table_t *table, unsigned int tlen, unsigned int mask, char *name);
00040 int table_print (w_table_t *table, unsigned int len);
00041 int table_init (w_table_t **table, unsigned int size);
00042 int table_uninit (w_table_t *table, unsigned int len);
00043 
00044 #endif /*TABLE_H_*/

Generated on Wed Dec 27 17:53:06 2006 for xynth-0.8.40 by  doxygen 1.4.7