?? dequeue.h
字號:
/*
* Copyright (c) 2000-2008
* Author: Weiming Zhou
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation.
*/
#ifndef __DEQUE_H__
#define __DEQUE_H__
#ifdef __cplusplus
extern "C" {
#endif
/* DeQue中的環形隊列結構體定義 */
typedef struct DEQUEBLOCK_st {
UINT uHead; /* 環形隊列的頭部 */
UINT uTail; /* 環形隊列的頭部 */
UINT uMapPos; /* 所對應map中的位置 */
void **ppData; /* 數據指針數組 */
} DEQUEBLOCK;
/* DeQue的結構體定義 */
typedef struct DEQUE_st {
DEQUEBLOCK **ppMap; /* 管理環形隊列的map數組指針 */
DEQUEBLOCK *pFirst; /* 第一個環形隊列指針 */
DEQUEBLOCK *pLast; /* 最后一個環形隊列指針 */
UINT uMapSize; /* Map大小 */
UINT uBlockSize; /* 環形隊列大小 */
} DEQUE;
DEQUE * DeQue_Create(UINT uMapSize, UINT uBlockSize);
void DeQue_Destroy( DEQUE *pQue, DESTROYFUNC DestroyFunc );
INT DeQue_InsertTail( DEQUE *pQue, void *pData );
void * DeQue_PopHead(DEQUE *pQue);
#ifdef __cplusplus
}
#endif
#endif /* __DEQUE_H__ */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -