/usr/include/spooles/IIheap/IIheap.h is in libspooles-dev 2.2-10build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | /* IIheap.h */
#include "../cfiles.h"
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------
IIheap -- heap with integer ids, integer values and a map from
each integer value to a heap location
size -- present size of the heap
maxsize -- maximum size of the heap
heapLoc -- heap location of each id, size maxsize
keys -- object key of each location in the heap, size maxsize
values -- object value of each location in the heap, size maxsize
created -- 95sep30, cca
------------------------------------------------------------------
*/
typedef struct _IIheap IIheap ;
struct _IIheap {
int size ;
int maxsize ;
int *heapLoc ;
int *keys ;
int *values ;
} ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
--- methods found in basics.c ------------------------------------------
------------------------------------------------------------------------
*/
/*
-----------------------------------------------------
create and return a new instance of the IIheap object
created -- 95sep30, cca
-----------------------------------------------------
*/
IIheap *
IIheap_new (
void
) ;
/*
-------------------------------------------
set the default fields for an IIheap object
created -- 95sep30, cca
-------------------------------------------
*/
void
IIheap_setDefaultFields (
IIheap *heap
) ;
/*
-----------------------
clear the data fields
created -- 95sep30, cca
-----------------------
*/
void
IIheap_clearData (
IIheap *heap
) ;
/*
-----------------------
free the IIheap object
created -- 95sep30, cca
-----------------------
*/
void
IIheap_free (
IIheap *heap
) ;
/*
--------------------------------
initializer,
set heap maximum size to maxsize
and allocate the arrays
created -- 95sep30, cca
--------------------------------
*/
void
IIheap_init (
IIheap *heap,
int maxsize
) ;
/*
------------------------------------------------
fill pkey with the key and pvalue with the value
of the minimum (key, value) pair in the heap
created -- 95sep30, cca
------------------------------------------------
*/
void
IIheap_root (
IIheap *heap,
int *pkey,
int *pvalue
) ;
/*
------------------------------------------
insert the (key, value) pair into the heap
created -- 95sep30, cca
------------------------------------------
*/
void
IIheap_insert (
IIheap *heap,
int key,
int value
) ;
/*
----------------------------
remove (key,*) from the heap
created -- 95sep30, cca
----------------------------
*/
void
IIheap_remove (
IIheap *heap,
int key
) ;
/*
-----------------------------------------------
purpose -- to write the IIheap object to a file
created -- 95sep30, cca
-----------------------------------------------
*/
void
IIheap_print (
IIheap *heap,
FILE *fp
) ;
/*
----------------------------------------------
return the number of bytes taken by the object
created -- 95sep30, cca
----------------------------------------------
*/
int
IIheap_sizeOf (
IIheap *heap
) ;
/*--------------------------------------------------------------------*/
|