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

  LOGDIAG4CALL(_TPTR(pHead), _TPTR(pData));

  CHKPTR(pHead, NULL);

  // allocate node
  pNode = NEW(DListVoidNode_T);

  // attach data
  pNode->m_pData = pData;

  // insert into list
  dlist_prepend(&pNode->m_dnode, &pHead->m_dnodeHead);

  pHead->m_nNumNodes++;

  LOGDIAG4(_TPTR(pNode));

  return pNode;
}
/*!
 * \brief Attach the user data to a new node and link to the start of dlist.
 *
 * \param pHead Pointer to dlist (head).
 * \param pData Pointer to user (allocated) data.
 *
 * \return Returns pointer to new node on success, NULL on failure.
 */
\brief Attach the user data to a new node and link to the start of dlist.
\param pHead Pointer to dlist (head).
\param pData Pointer to user (allocated) data.

\return Returns pointer to new node on success, NULL on failure.
\ brief Attach the user data to a new node and link to the start of dlist . \ param pHead Pointer to dlist ( head ) . \ param pData Pointer to user ( allocated ) data . \ return Returns pointer to new node on success NULL on failure .
DListVoidNode_T *DListVoidPrepend(DListVoid_T *pHead, void *pData)
{
  DListVoidNode_T  *pNode;
  LOGDIAG4CALL(_TPTR(pHead), _TPTR(pData));
  CHKPTR(pHead, NULL);
  pNode = NEW(DListVoidNode_T);
  pNode->m_pData = pData;
  dlist_prepend(&pNode->m_dnode, &pHead->m_dnodeHead);
  pHead->m_nNumNodes++;
  LOGDIAG4(_TPTR(pNode));
  return pNode;
}
DListVoidNode_T * DListVoidPrepend ( DListVoid_T * pHead , void * pData ) { DListVoidNode_T * pNode ; LOGDIAG4CALL ( _TPTR ( pHead ) , _TPTR ( pData ) ) ; CHKPTR ( pHead , NULL ) ; pNode = NEW ( DListVoidNode_T ) ; pNode -> m_pData = pData ; dlist_prepend ( & pNode -> m_dnode , & pHead -> m_dnodeHead ) ; pHead -> m_nNumNodes ++ ; LOGDIAG4 ( _TPTR ( pNode ) ) ; return pNode ; }
\brief Attach the user data to a new node and link to the start of dlist.
\ brief Attach the user data to a new node and link to the start of dlist .
// allocate node // attach data // insert into list