Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

mem_circ_queue.c File Reference

#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <earthworm.h>
#include <time.h>
#include <mem_circ_queue.h>

Go to the source code of this file.

Functions

void inc_circular (QUEUE *q, Q_POS *pQPos)
void dec_circular (QUEUE *q, Q_POS *pQPos)
int initqueue (QUEUE *q, unsigned long maxElements, unsigned long elementMaxSize)
int dequeue (QUEUE *q, DATA x, long *size, MSG_LOGO *userLogoPtr)
int enqueue (QUEUE *q, DATA x, long size, MSG_LOGO userLogo)
int getNumOfElementsInQueue (QUEUE *q)
Q_POS getNext (QUEUE *q, int QueuePosition)
Q_POS getPrev (QUEUE *q, int QueuePosition)
Q_POS getPosFirst (QUEUE *q)
Q_POS getPosLast (QUEUE *q)
int dumpqueue (QUEUE *q, char *filename)
int undumpqueue (QUEUE *q, char *filename)
DATA peekNextElement (QUEUE *q)


Function Documentation

void dec_circular (  QUEUE *    q,
Q_POS *    pQPos
)  [static]
 

Definition at line 207 of file mem_circ_queue.c.

References QUEUE::MyMaxElements.

Referenced by getPrev().

int dequeue (  QUEUE *    q,
DATA    x,
long *    size,
MSG_LOGO *    userLogoPtr
) 
 

Definition at line 113 of file mem_circ_queue.c.

References QUEUE_ENTRY::d, QUEUE::first, inc_circular(), MSG_LOGO::instid, QUEUE_ENTRY::length, MSG_LOGO::mod, QUEUE::NumOfElements, QUEUE::pQE, QUEUE_ENTRY::queueLogo, and MSG_LOGO::type.

int dumpqueue (  QUEUE *    q,
char *    filename
) 
 

Definition at line 265 of file mem_circ_queue.c.

References QUEUE_ENTRY::d, QUEUE::first, inc_circular(), QUEUE_ENTRY::length, QUEUE::NumOfElements, QUEUE::pQE, Q_POS, and QUEUE_ENTRY::queueLogo.

int enqueue (  QUEUE *    q,
DATA    x,
long    size,
MSG_LOGO    userLogo
) 
 

Definition at line 154 of file mem_circ_queue.c.

References QUEUE_ENTRY::d, QUEUE::first, inc_circular(), MSG_LOGO::instid, QUEUE::last, MSG_LOGO::mod, QUEUE::MyMaxElements, QUEUE::MyMaxSize, QUEUE::NumOfElements, QUEUE::pQE, QUEUE_ENTRY::queueLogo, and MSG_LOGO::type.

Q_POS getNext (  QUEUE *    q,
int    QueuePosition
) 
 

Definition at line 220 of file mem_circ_queue.c.

References inc_circular(), QUEUE::MyMaxElements, and Q_POS.

int getNumOfElementsInQueue (  QUEUE *    q ) 
 

Definition at line 215 of file mem_circ_queue.c.

Q_POS getPosFirst (  QUEUE *    q ) 
 

Definition at line 249 of file mem_circ_queue.c.

References QUEUE::first, and Q_POS.

Q_POS getPosLast (  QUEUE *    q ) 
 

Definition at line 255 of file mem_circ_queue.c.

References QUEUE::last, and Q_POS.

Q_POS getPrev (  QUEUE *    q,
int    QueuePosition
) 
 

Definition at line 235 of file mem_circ_queue.c.

References dec_circular(), QUEUE::MyMaxElements, and Q_POS.

void inc_circular (  QUEUE *    q,
Q_POS *    pQPos
)  [static]
 

Definition at line 198 of file mem_circ_queue.c.

References QUEUE::MyMaxElements.

Referenced by dequeue(), dumpqueue(), enqueue(), getNext(), and undumpqueue().

int initqueue (  QUEUE *    q,
unsigned long    maxElements,
unsigned long    elementMaxSize
) 
 

Definition at line 52 of file mem_circ_queue.c.

References QUEUE_ENTRY::d, QUEUE::first, QUEUE::last, QUEUE::MyMaxElements, QUEUE::MyMaxSize, QUEUE::NumOfElements, and QUEUE::pQE.

DATA peekNextElement (  QUEUE *    q ) 
 

Definition at line 418 of file mem_circ_queue.c.

References DATA, QUEUE::first, QUEUE::NumOfElements, and QUEUE::pQE.

int undumpqueue (  QUEUE *    q,
char *    filename
) 
 

Definition at line 335 of file mem_circ_queue.c.

References QUEUE_ENTRY::d, QUEUE::first, inc_circular(), QUEUE::last, QUEUE_ENTRY::length, QUEUE::MyMaxElements, QUEUE::MyMaxSize, QUEUE::NumOfElements, QUEUE::pQE, and QUEUE_ENTRY::queueLogo.


Generated on Tue May 6 09:16:17 2003 for Earthworm Libs by doxygen1.3-rc3