From beef612173fe3840dff4c4bd9fc0c25e469a9aa6 Mon Sep 17 00:00:00 2001 From: Kirill Petrashin Date: Sun, 3 May 2026 21:01:00 +0300 Subject: Comments --- priority_queue.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'priority_queue.h') diff --git a/priority_queue.h b/priority_queue.h index 8ad4a26..0811205 100644 --- a/priority_queue.h +++ b/priority_queue.h @@ -17,18 +17,20 @@ PositionPQ *ppq_new(Position pos, size_t priority); /* Insert a pos with priority into a given PositionPQ */ #define PPQ_INSERT_SUCCESS 0 -#define PPQ_INSERT_NEW 1 /* ppq was NULL, created a new one */ +#define PPQ_INSERT_NEW 1 /* ppq was NULL, created a new one */ #define PPQ_INSERT_ALREADY 2 /* pos is already in ppq */ int ppq_insert(PositionPQ **ppq, Position pos, size_t priority); /* Remove and return the position with the lowest priority */ Position ppq_pop(PositionPQ **ppq); -/* Remove a given pos fron ppq */ +/* Remove a given pos fron ppq, used in ppq_insert() to avoid dups */ void ppq_remove(PositionPQ **ppq, Position pos); +/* Debug function, prints the contents of ppq to stdout */ void ppq_print(PositionPQ *ppq); +/* Frees the memory allocated for ppq */ void ppq_free(PositionPQ *ppq); #endif /* PRIORITY_QUEUE_H_ */ -- cgit v1.2.3