librnr/dlistvoid.c
void DListVoidPrint(DListVoid_T *pHead, DListVoidFuncDataPrint_T fnDataPr,
                    FILE *fp)
{
  dnode_t         *p, *q, *head;
  DListVoidNode_T *pNode;
  int              n;

  head = &(pHead->m_dnodeHead);
  n = 0;

  dlist_for_each_safe(p, q, head)
  {
    pNode = DLISTVOID_ENTRY(p);
    fprintf(fp, "Node %2d: ", n);
    fnDataPr(fp, pNode->m_pData);
    fprintf(fp, "\n");
    ++n;
  }
}
/*!
 * \brief Traverse dlist and print.
 *
 * \param pHead     Pointer to dlist (head).
 * \param fnDataPr  User data printing fucntion.
 * \param fp        Output file pointer
 */
\brief Traverse dlist and print.
\param pHead     Pointer to dlist (head).
\param fnDataPr  User data printing fucntion.
\param fp        Output file pointer
\ brief Traverse dlist and print . \ param pHead Pointer to dlist ( head ) . \ param fnDataPr User data printing fucntion . \ param fp Output file pointer
void DListVoidPrint(DListVoid_T *pHead, DListVoidFuncDataPrint_T fnDataPr,
                    FILE *fp)
{
  dnode_t         *p, *q, *head;
  DListVoidNode_T *pNode;
  int              n;
  head = &(pHead->m_dnodeHead);
  n = 0;
  dlist_for_each_safe(p, q, head)
  {
    pNode = DLISTVOID_ENTRY(p);
    fprintf(fp, "Node %2d: ", n);
    fnDataPr(fp, pNode->m_pData);
    fprintf(fp, "\n");
    ++n;
  }
}
void DListVoidPrint ( DListVoid_T * pHead , DListVoidFuncDataPrint_T fnDataPr , FILE * fp ) { dnode_t * p , * q , * head ; DListVoidNode_T * pNode ; int n ; head = & ( pHead -> m_dnodeHead ) ; n = 0 ; dlist_for_each_safe ( p , q , head ) { pNode = DLISTVOID_ENTRY ( p ) ; fprintf ( fp , " " , n ) ; fnDataPr ( fp , pNode -> m_pData ) ; fprintf ( fp , " \n " ) ; ++ n ; } }
\brief Traverse dlist and print.
\ brief Traverse dlist and print .