/[ipchat]/ipchat/src/pqueue.h
ViewVC logotype

Diff of /ipchat/src/pqueue.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by beatk, Sat Mar 12 20:14:45 2005 UTC revision 1.7 by matiasaguirre, Mon Mar 21 01:47:53 2005 UTC
# Line 1  Line 1 
1  /* pqueue.h -- Hybrid priority queue with some search functions  /* pqueue.h -- Hybrid priority queue with some search functions
2     Copyright (C) 2004 Matías Aguirre - Gonzalo Saavedra     Copyright (C) 2004 - 2005 Matías Aguirre - Gonzalo Saavedra
3    
4     This program is free software; you can redistribute it and/or     This program is free software; you can redistribute it and/or
5     modify it under the terms of the GNU General Public License     modify it under the terms of the GNU General Public License
# Line 16  Line 16 
16     59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.     59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
17  */  */
18    
19    /*
20     * Contributions and ideas
21     *      2005 - Maximiliano Pin
22     */
23    
24  #ifndef PQUEUE_H  #ifndef PQUEUE_H
25  #define PQUEUE_H 1  #define PQUEUE_H 1
26    
# Line 31  Line 36 
36  #define SZERR       -6  #define SZERR       -6
37  #define NFOUNDERR   -7  #define NFOUNDERR   -7
38    
39  #define DEFAULT_SZ  100  #define DEFAULT_SZ  127
40    
41  #ifndef MAX  #ifndef MAX
42  # define MAX(A,B) ((A) > (B) ? A : B)  # define MAX(A,B) ((A) > (B) ? A : B)
# Line 41  Line 46 
46  #endif  #endif
47  #define PRI_EQ(A,B) ((A) == (B))  #define PRI_EQ(A,B) ((A) == (B))
48  #define MAX_PRI(A,B) (MIN(A,B))  #define MAX_PRI(A,B) (MIN(A,B))
49  #define MAX_PRI_EQ(A,B,C) PRI_EQ(MAX_PRI(A,B),C)  #define PRI_GREATER(A,B) ((A) < (B))
50    
51  typedef long int prio_t;  typedef long int prio_t;
52    
# Line 65  extern prio_t pq_add(prio_t,void *,pqueu Line 70  extern prio_t pq_add(prio_t,void *,pqueu
70  extern void * pq_min(pqueue *);  extern void * pq_min(pqueue *);
71  extern void * pq_del_min(pqueue *);  extern void * pq_del_min(pqueue *);
72  extern int pq_empty(pqueue *);  extern int pq_empty(pqueue *);
 extern int pq_requeue(pqueue *);  
73  extern void * pq_del(prio_t, pqueue *);  extern void * pq_del(prio_t, pqueue *);
74  extern void * pq_get(prio_t,pqueue *);  extern void * pq_get(prio_t,pqueue *);
75  extern void * pq_del_func(void*,pqueue*);  extern void * pq_del_func(void*,pqueue*);

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26