TIP: Click on subject to list as thread! ANSI
echo: public_domain
to: All
from: Paul Edwards
date: 1995-11-10 01:11:26
subject: pqueue.h

/******************************************************************************/
/*                                                                            */
/*  Name:        prioq.h                                                      */
/*                                                                            */
/*  Written by: David Galbraith                                               */
/*                                                                            */
/*  Date:         October 1995                                                */
/*                                                                            */
/*----------------------------------------------------------------------------*/
/*                                                                            */
/*  This code is hereby released to the public domain.  You may use and/or    */
/*  modify it in any way you choose without restriction.                      */
/*                                                                            */
/******************************************************************************/

#ifndef __PQUEUE_H
#define __PQUEUE_H
#endif

/* priority queue structure definitions */

typedef struct qItem {
	unsigned int	ItemKey;
	void		*data;
} qItem;

typedef qItem *qItemPtr;

typedef struct Queue {
	int		MaxSize;
	int		NumberElements;
	qItemPtr	*ppqItemArray;
} Queue;

typedef Queue *QueuePtr;

QueuePtr qCreate(int qsize);

void qFree(QueuePtr pQueue);

int qFull(QueuePtr pQueue);

int qEmpty(QueuePtr pQueue);

void qInsert(QueuePtr pQueue, qItemPtr pItem);

qItemPtr qRemove(QueuePtr pQueue);

void qDisplay(QueuePtr pQueue);
@EOT:

---
* Origin: X (3:711/934.9)

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.