librnr/dlistvoid.c
void *DListVoidUnlinkDataAt(DListVoid_T *pHead, int iIndex)
{
  DListVoidNode_T  *pNode;
  void             *pData;

  LOGDIAG4CALL(_TPTR(pHead), _TINT(iIndex));

  CHKPTR(pHead, NULL);

  // get node to delete
  if( (pNode = DListVoidGetNodeAt(pHead, iIndex)) != NULL )
  {
    pData = pNode->m_pData;

    // remove from list
    dlist_delete(&pNode->m_dnode);

    // free up node, but not the data
    delete(pNode);

    pHead->m_nNumNodes--;

    return pData;
  }
  else
  {
    return NULL;
  }
}
/*!
 * \brief Unlink the user data from the dlist at the given index.
 *
 * The node is deleted, but not the attached data.
 *
 * \param pHead  Pointer to dlist (head).
 * \param iIndex Index to dlist entry to unlink.
 *
 * \return Returns void* to user data on success, NULL on failure.
 */
\brief Unlink the user data from the dlist at the given index.
The node is deleted, but not the attached data.

\param pHead  Pointer to dlist (head).
\param iIndex Index to dlist entry to unlink.

\return Returns void* to user data on success, NULL on failure.
\ brief Unlink the user data from the dlist at the given index . The node is deleted but not the attached data . \ param pHead Pointer to dlist ( head ) . \ param iIndex Index to dlist entry to unlink . \ return Returns void * to user data on success NULL on failure .
void *DListVoidUnlinkDataAt(DListVoid_T *pHead, int iIndex)
{
  DListVoidNode_T  *pNode;
  void             *pData;
  LOGDIAG4CALL(_TPTR(pHead), _TINT(iIndex));
  CHKPTR(pHead, NULL);
  if( (pNode = DListVoidGetNodeAt(pHead, iIndex)) != NULL )
  {
    pData = pNode->m_pData;
    dlist_delete(&pNode->m_dnode);
    delete(pNode);
    pHead->m_nNumNodes--;
    return pData;
  }
  else
  {
    return NULL;
  }
}
void * DListVoidUnlinkDataAt ( DListVoid_T * pHead , int iIndex ) { DListVoidNode_T * pNode ; void * pData ; LOGDIAG4CALL ( _TPTR ( pHead ) , _TINT ( iIndex ) ) ; CHKPTR ( pHead , NULL ) ; if ( ( pNode = DListVoidGetNodeAt ( pHead , iIndex ) ) != NULL ) { pData = pNode -> m_pData ; dlist_delete ( & pNode -> m_dnode ) ; delete ( pNode ) ; pHead -> m_nNumNodes -- ; return pData ; } else { return NULL ; } }
\brief Unlink the user data from the dlist at the given index.
\ brief Unlink the user data from the dlist at the given index .
// get node to delete // remove from list // free up node, but not the data