librnr/dlistvoid.c
DListVoidNode_T *DListVoidIterNodeLast(DListVoid_T *pHead, 
                                        DListVoidIter_T *pIter)
{
  CHKPTR(pHead, NULL);
  CHKPTR(pIter, NULL);

  pIter->m_pHead = pHead;
  pIter->m_pThis = pHead->m_dnodeHead.prev;
  pIter->m_pNext = ((dnode_t *)(pIter->m_pThis))->prev;

  if( DLISTVOID_IS_EMPTY(pHead) )
  {
    return NULL;
  }
  else
  {
    return DLISTVOID_ENTRY(((dnode_t *)(pIter->m_pThis)));
  }
}
/*!
 * \brief Initialize dlist iterator and return the last node in dlist.
 *
 * \param pHead   Pointer to dlist (head).
 * \param pIter   Pointer to iterator.
 *
 * \return Returns last node in dlist on success, NULL if dlist empty or 
 * on error.
 */
\brief Initialize dlist iterator and return the last node in dlist.
\param pHead   Pointer to dlist (head).
\param pIter   Pointer to iterator.

\return Returns last node in dlist on success, NULL if dlist empty or
on error.
\ brief Initialize dlist iterator and return the last node in dlist . \ param pHead Pointer to dlist ( head ) . \ param pIter Pointer to iterator . \ return Returns last node in dlist on success NULL if dlist empty or on error .
DListVoidNode_T *DListVoidIterNodeLast(DListVoid_T *pHead, 
                                        DListVoidIter_T *pIter)
{
  CHKPTR(pHead, NULL);
  CHKPTR(pIter, NULL);
  pIter->m_pHead = pHead;
  pIter->m_pThis = pHead->m_dnodeHead.prev;
  pIter->m_pNext = ((dnode_t *)(pIter->m_pThis))->prev;
  if( DLISTVOID_IS_EMPTY(pHead) )
  {
    return NULL;
  }
  else
  {
    return DLISTVOID_ENTRY(((dnode_t *)(pIter->m_pThis)));
  }
}
DListVoidNode_T * DListVoidIterNodeLast ( DListVoid_T * pHead , DListVoidIter_T * pIter ) { CHKPTR ( pHead , NULL ) ; CHKPTR ( pIter , NULL ) ; pIter -> m_pHead = pHead ; pIter -> m_pThis = pHead -> m_dnodeHead . prev ; pIter -> m_pNext = ( ( dnode_t * ) ( pIter -> m_pThis ) ) -> prev ; if ( DLISTVOID_IS_EMPTY ( pHead ) ) { return NULL ; } else { return DLISTVOID_ENTRY ( ( ( dnode_t * ) ( pIter -> m_pThis ) ) ) ; } }
\brief Initialize dlist iterator and return the last node in dlist.
\ brief Initialize dlist iterator and return the last node in dlist .