pdeq.h 1.02 KB
Newer Older
Götz Lindenmaier's avatar
Götz Lindenmaier committed
1
2
3
4
5
6
7
8
9
10
11
/*
 * Project:     libFIRM
 * File name:   ir/adt/pdeq.h
 * Purpose:     Declarations for pdeq.
 * Author:      Christian von Roques
 * Modified by:
 * Created:     1999 by getting from fiasco
 * CVS-ID:      $Id$
 * Copyright:   (c) 1995, 1996 Markus Armbruster
 * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
 */
Christian Schäfer's avatar
Christian Schäfer committed
12

Boris Boesler's avatar
Boris Boesler committed
13

Götz Lindenmaier's avatar
Götz Lindenmaier committed
14
15
#ifndef _PDEQ_H_
#define _PDEQ_H_
Christian Schäfer's avatar
Christian Schäfer committed
16

Götz Lindenmaier's avatar
Götz Lindenmaier committed
17
#include <string.h>
Christian Schäfer's avatar
Christian Schäfer committed
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
#include "misc.h"

typedef struct pdeq pdeq;

pdeq *new_pdeq (void);
pdeq *new_pdeq1 (const void *);
void del_pdeq (pdeq *);
int pdeq_len (pdeq *);
bool pdeq_empty (pdeq *);
bool pdeq_contains (pdeq *, const void *);
void *pdeq_search (pdeq *, cmp_fun cmp, const void *key);
void **pdeq_copyl (pdeq *, const void **);
void **pdeq_copyr (pdeq *, const void **);
pdeq *pdeq_putl (pdeq *, const void *);
pdeq *pdeq_putr (pdeq *, const void *);
void *pdeq_getl (pdeq *);
void *pdeq_getr (pdeq *);

#ifdef NDEBUG
#define PDEQ_VRFY(deq) ((void)0)
#else
#define PDEQ_VRFY(deq) _pdeq_vrfy ((deq))
void _pdeq_vrfy(pdeq *dq);
#endif

Götz Lindenmaier's avatar
Götz Lindenmaier committed
43
#endif /* _PDEQ_H_ */