00001 #ifndef _MQINT_QUEUE_H_
00002 #define _MQINT_QUEUE_H_
00003
00004
00005
00006
00007
00008
00018 struct MQIntQueue
00019 {
00020 int* array;
00021 int size;
00022 int tail;
00023 int head;
00024 };
00025
00026 typedef struct MQIntQueue MQIntQueue;
00027
00028 void MQIntQueue_create(MQIntQueue* Q, int size);
00029 void MQIntQueue_destroy(MQIntQueue* Q);
00030 void MQIntQueue_init(MQIntQueue* Q);
00031 int MQIntQueue_push(MQIntQueue* Q, int elem);
00032 int MQIntQueue_pop(MQIntQueue* Q, int* elem);
00033
00034 void MQIntQueue_fprint(FILE* fp, MQIntQueue* Q);
00035
00036
00037 #endif
00038