⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cm_llist.h

📁 中国石油二期加油站IC系统后台通讯软件
💻 H
字号:
/********************************************************************20**
  
     Name:     common - linked list functions
  
     Type:     C include file
  
     Desc:     macros for linked list functions
 
     File:     cm_llist.h
  
     Sid:      cm_llist.h 1.5  -  03/31/99 15:04:19
    
     Prg:      ak
 
*********************************************************************21*/
  
#ifndef __CMLLISTH__
#define __CMLLISTH__


#define cmLListFirst(l)  ((l)->crnt = (l)->first)
#define cmLListLast(l)   ((l)->crnt = (l)->last)
#define cmLListCrnt(l)   ((l)->crnt)
#define cmLListNext(l)   ((l)->crnt = ((l)->crnt ? (l)->crnt->next : \
                                       (l)->first))
#define cmLListPrev(l)   ((l)->crnt = ((l)->crnt ? (l)->crnt->prev : \
                                       (l)->first))
#define cmLListLen(l)    ((l)->count)
#define cmLListNode(n)   ((n)->node)


#define CM_LLIST_FIRST_NODE(l, n)  (((n) = cmLListFirst(l)) ? (n)->node : NULLP)
#define CM_LLIST_NEXT_NODE(l, n)   (((n) = cmLListNext(l)) ? (n)->node : NULLP)
#define CM_LLIST_PREV_NODE(l, n)   (((n) = cmLListPrev(l)) ? (n)->node : NULLP)

/* Added by Spine.zhang for get the node by neighbor */
#define CM_LLIST_NEXT(node)	(((CmLList *)node)->next)
#define CM_LLIST_PREV(node)	(((CmLList *)node)->prev)
#define CM_LLIST_FIRST(list) (((CmLListCp *)(list))->first)
#define CM_LLIST_LAST(list) (((CmLListCp *)(list))->last)

#endif /* __CMLLISTH__ */

 
/********************************************************************30**
  
         End of file: cm_llist.h 1.5  -  03/31/99 15:04:19
  
*********************************************************************31*/


/********************************************************************40**
  
        Notes:
  
*********************************************************************41*/

/********************************************************************50**

*********************************************************************51*/


/********************************************************************60**
  
        Revision history:
  
*********************************************************************61*/
  
/********************************************************************80**

  version    pat  init                   description
----------- ----- ----  ------------------------------------------------
1.1          ---  ak    1. initial release

1.2          ---  bw    1. add 2 more macros for faster access
             ---  rrb   1. changed the macros CM_LLIST_FIRST_NODE and 
                           CM_LLIST_NEXT_NODE.
*********************************************************************81*/

/********************************************************************90**
 
     ver       pat    init                  description
------------ -------- ---- ----------------------------------------------
1.3          ---      rrb  1. changed the macros CM_LLIST_FIRST_NODE and
                              CM_LLIST_NEXT_NODE.
1.4          ---      bbk  1. Changed copyright header date.
1.5          ---      ag   1. Added CM_LLIST_PREV_NODE 
             ---      ag   2. Changed copyright header
*********************************************************************91*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -