252 // Dump the buffer (for debugging purposes) |
252 // Dump the buffer (for debugging purposes) |
253 void Dump() { |
253 void Dump() { |
254 for (unsigned int x = 0; x < writesize; x++) |
254 for (unsigned int x = 0; x < writesize; x++) |
255 printf ("%d. [%d]\n", x, *(buffer+x)); |
255 printf ("%d. [%d]\n", x, *(buffer+x)); |
256 } |
256 } |
|
257 |
|
258 // Count the amount of marks |
|
259 unsigned int CountMarks () { |
|
260 unsigned int count = 0; |
|
261 for (unsigned int u = 0; u < MAX_MARKS; u++) |
|
262 count += !!marks[u]; |
|
263 return count; |
|
264 } |
|
265 |
|
266 // Count the amount of refs |
|
267 unsigned int CountReferences () { |
|
268 unsigned int count = 0; |
|
269 for (unsigned int u = 0; u < MAX_MARKS; u++) |
|
270 count += !!refs[u]; |
|
271 return count; |
|
272 } |
257 }; |
273 }; |
258 |
274 |
259 #endif // __DATABUFFER_H__ |
275 #endif // __DATABUFFER_H__ |