summaryrefslogtreecommitdiff
path: root/cd/src/intcgm/list.h
blob: c661a7c489d7aeba1c62daff63bc90812871a70e (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

/*
* list.h
* prototipos das funcoes de manipulacao de lista
* TeCGraf
* 27 Ago 93
*/

#ifndef __LIST_H__
#define __LIST_H__

typedef struct TList_
	{
	 void **h;     /* head */
         int nba;
         int n;     /* Numero de elementos na lista */
	} TList;

#define list_head(l)	    ((l)->h)
#define list_n(l)        ((l)->n)
#define list_nba(l)        ((l)->nba)

TList *cgm_NewList    ( void );
TList *cgm_AppendList ( TList *, void * );
TList *cgm_AddList    ( TList *, int, void * );
TList *cgm_DelList    ( TList *, int );
void  *cgm_GetList    ( TList *, int );
int   cgm_DelEntry    ( TList *, void * );

#endif