list.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 LIST_H_
00017 #define LIST_H_
00018 
00019 typedef struct list_s list_t;
00020 typedef struct list_node_s list_node_t;
00021 
00022 struct list_node_s {
00023         void *next;
00024         void *element;
00025 };
00026 
00027 struct list_s {
00028         int nb_elt;
00029         list_node_t *node;
00030 };
00031 
00032 int list_init (list_t **li);
00033 int list_uninit (list_t *li);
00034 int list_eol (list_t *li, int i);
00035 void * list_get (list_t *li, int pos);
00036 int list_remove (list_t *li, int pos);
00037 int list_add (list_t *li, void *el, int pos);
00038 
00039 #endif /*LIST_H_*/

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