/usr/include/spooles/Ideq/Ideq.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 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 | /* Ideq.h */
#include "../IV.h"
#include "../cfiles.h"
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------
Ideq -- dequeue with integer ids
maxsize -- maxmimum size of the deq
head -- head of the list
tail -- tail of the list
iv -- IV object to manage dequeue
created -- 96jun06, cca
------------------------------------------------------------------
*/
typedef struct _Ideq Ideq ;
struct _Ideq {
int maxsize ;
int head ;
int tail ;
IV iv ;
} ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
------ methods found in basics.c --------------------------------------
------------------------------------------------------------------------
*/
/*
-----------------------------------------------------
create and return a new instance of the Ideq object
created -- 96jun06, cca
-----------------------------------------------------
*/
Ideq *
Ideq_new (
void
) ;
/*
-------------------------------------------
set the default fields for an Ideq object
created -- 96jun06, cca
-------------------------------------------
*/
void
Ideq_setDefaultFields (
Ideq *deq
) ;
/*
-----------------------
clear the data fields
created -- 96jun06, cca
-----------------------
*/
void
Ideq_clearData (
Ideq *deq
) ;
/*
-----------------------
free the Ideq object
created -- 96jun06, cca
-----------------------
*/
void
Ideq_free (
Ideq *deq
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
------ methods found in resize.c --------------------------------------
------------------------------------------------------------------------
*/
/*
------------------------------------
resize the deque
if the new size is large enough then
copy the old data
return 1
else
error, return -1
endif
created -- 96jun06, cca
------------------------------------
*/
int
Ideq_resize (
Ideq *deq,
int newsize
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
------ methods found in util.c ----------------------------------------
------------------------------------------------------------------------
*/
/*
-----------------------
clear the dequeue,
created -- 96jun06, cca
-----------------------
*/
void
Ideq_clear (
Ideq *deq
) ;
/*
---------------------------------
return the head of the dequeue,
return -1 if the dequeue is empty
created -- 96jun06, cca
---------------------------------
*/
int
Ideq_head (
Ideq *deq
) ;
/*
------------------------------------------
return and remove the head of the dequeue,
return -1 if the dequeue is empty
created -- 96jun06, cca
------------------------------------------
*/
int
Ideq_removeFromHead (
Ideq *deq
) ;
/*
---------------------------------------
insert value at head of dequeue
return value
1 --> value inserted
-1 --> no room in dequeue, must resize
created -- 96jun06, cca
---------------------------------------
*/
int
Ideq_insertAtHead (
Ideq *deq,
int val
) ;
/*
---------------------------------
return the tail of the dequeue,
return -1 if the dequeue is empty
created -- 96jun06, cca
---------------------------------
*/
int
Ideq_tail (
Ideq *deq
) ;
/*
------------------------------------------
return and remove the tail of the dequeue,
return -1 if the dequeue is empty
created -- 96jun06, cca
------------------------------------------
*/
int
Ideq_removeFromTail (
Ideq *deq
) ;
/*
---------------------------------------
insert value at tail of dequeue
return value
1 --> value inserted
-1 --> no room in dequeue, must resize
created -- 96jun06, cca
---------------------------------------
*/
int
Ideq_insertAtTail (
Ideq *deq,
int val
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
------ methods found in IO.c ------------------------------------------
------------------------------------------------------------------------
*/
/*
------------------------------------------------------
purpose -- write the contents of the dequeue to a file
in a human readable format
created -- 98feb11, cca
------------------------------------------------------
*/
void
Ideq_writeForHumanEye (
Ideq *dequeue,
FILE *fp
) ;
/*--------------------------------------------------------------------*/
|