lstlib.html

来自「Vxworks API操作系统和驱动程序设计API。压缩的HTML文件」· HTML 代码 · 共 517 行 · 第 1/2 页

HTML
517
字号
    (    LIST * pList              /* pointer to list descriptor */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine finds the first node in a linked list.<p></blockquote><h4>RETURNS</h4><blockquote><p>A pointer to the first node in a list, orNULL if the list is empty.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./lstLib.html#top">lstLib</a></b><hr><a name="lstGet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>lstGet(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>lstGet(&nbsp;)</strong> - delete and return the first node from a list</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>NODE *lstGet    (    LIST * pList              /* ptr to list from which to get node */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine gets the first node from a specified list, deletes the nodefrom the list, and returns a pointer to the node gotten.<p></blockquote><h4>RETURNS</h4><blockquote><p>A pointer to the node gotten, orNULL if the list is empty.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./lstLib.html#top">lstLib</a></b><hr><a name="lstInsert"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>lstInsert(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>lstInsert(&nbsp;)</strong> - insert a node in a list after a specified node</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void lstInsert    (    LIST * pList,             /* pointer to list descriptor */    NODE * pPrev,             /* pointer to node after which to insert */    NODE * pNode              /* pointer to node to be inserted */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine inserts a specified node in a specified list.The new node is placed following the list node <i>pPrev</i>.If <i>pPrev</i> is NULL, the node is inserted at the head of the list.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./lstLib.html#top">lstLib</a></b><hr><a name="lstLast"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>lstLast(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>lstLast(&nbsp;)</strong> - find the last node in a list</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>NODE *lstLast    (    LIST * pList              /* pointer to list descriptor */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine finds the last node in a list.<p></blockquote><h4>RETURNS</h4><blockquote><p>A pointer to the last node in the list, orNULL if the list is empty.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./lstLib.html#top">lstLib</a></b><hr><a name="lstNext"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>lstNext(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>lstNext(&nbsp;)</strong> - find the next node in a list</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>NODE *lstNext    (    NODE * pNode              /* ptr to node whose successor is to be found */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine locates the node immediately following a specified node.<p></blockquote><h4>RETURNS</h4><blockquote><p><p>A pointer to the next node in the list, orNULL if there is no next node.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./lstLib.html#top">lstLib</a></b><hr><a name="lstNth"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>lstNth(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>lstNth(&nbsp;)</strong> - find the Nth node in a list</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>NODE *lstNth    (    LIST * pList,             /* pointer to list descriptor */    int    nodenum            /* number of node to be found */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine returns a pointer to the node specified by a number <i>nodenum</i>where the first node in the list is numbered 1.Note that the search is optimized by searching forward from the beginningif the node is closer to the head, and searching back from the endif it is closer to the tail.<p></blockquote><h4>RETURNS</h4><blockquote><p><p>A pointer to the Nth node, orNULL if there is no Nth node.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./lstLib.html#top">lstLib</a></b><hr><a name="lstPrevious"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>lstPrevious(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>lstPrevious(&nbsp;)</strong> - find the previous node in a list</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>NODE *lstPrevious    (    NODE * pNode              /* ptr to node whose predecessor is to be found */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine locates the node immediately preceding the node pointed to by <i>pNode</i>.<p></blockquote><h4>RETURNS</h4><blockquote><p><p>A pointer to the previous node in the list, orNULL if there is no previous node.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./lstLib.html#top">lstLib</a></b><hr><a name="lstNStep"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>lstNStep(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>lstNStep(&nbsp;)</strong> - find a list node <i>nStep</i> steps away from a specified node</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>NODE *lstNStep    (    NODE * pNode,             /* the known node */    int    nStep              /* number of steps away to find */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine locates the node <i>nStep</i> steps away in either direction from a specified node.  If <i>nStep</i> is positive, it steps toward the tail.  If<i>nStep</i> is negative, it steps toward the head.  If the number of steps isout of range, NULL is returned.<p></blockquote><h4>RETURNS</h4><blockquote><p><p>A pointer to the node <i>nStep</i> steps away, orNULL if the node is out of range.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./lstLib.html#top">lstLib</a></b><hr><a name="lstFind"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>lstFind(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>lstFind(&nbsp;)</strong> - find a node in a list</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int lstFind    (    LIST * pList,             /* list in which to search */    NODE * pNode              /* pointer to node to search for */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine returns the node number of a specified node (the first node is 1).<p></blockquote><h4>RETURNS</h4><blockquote><p><p>The node number, orERROR if the node is not found.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./lstLib.html#top">lstLib</a></b><hr><a name="lstFree"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>lstFree(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>lstFree(&nbsp;)</strong> - free up a list</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void lstFree    (    LIST * pList              /* list for which to free all nodes */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine turns any list into an empty list.It also frees up memory used for nodes.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./lstLib.html#top">lstLib</a></b>, <b><a href="./memPartLib.html#free">free</a>(&nbsp;)</b></body></html>

⌨️ 快捷键说明

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