Clean up queue files so that they look more like others

This commit is contained in:
Gregory Nutt
2013-10-05 12:03:31 -06:00
parent 3325c192f5
commit 02b8a8bf19
12 changed files with 104 additions and 156 deletions
+11 -12
View File
@@ -1,4 +1,4 @@
/************************************************************
/****************************************************************************
* libc/queue/dq_addafter.c
*
* Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved.
@@ -31,30 +31,29 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Compilation Switches
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Included Files
************************************************************/
****************************************************************************/
#include <queue.h>
/************************************************************
/****************************************************************************
* Public Functions
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Name: dq_addafter
*
* Description:
* dq_addafter function adds 'node' after 'qqqq' in the
* 'queue.'
* dq_addafter function adds 'node' after 'prev' in the 'queue.'
*
************************************************************/
****************************************************************************/
void dq_addafter(FAR dq_entry_t *prev, FAR dq_entry_t *node,
dq_queue_t *queue)
+8 -12
View File
@@ -1,4 +1,4 @@
/************************************************************
/****************************************************************************
* libc/queue/dq_addfirst.c
*
* Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved.
@@ -31,29 +31,25 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************/
****************************************************************************/
/************************************************************
* Compilation Switches
************************************************************/
/************************************************************
/****************************************************************************
* Included Files
************************************************************/
****************************************************************************/
#include <queue.h>
/************************************************************
/****************************************************************************
* Public Functions
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Name: dq_addfirst
*
* Description:
* dq_addfirst affs 'node' at the beginning of 'queue'
*
************************************************************/
****************************************************************************/
void dq_addfirst(FAR dq_entry_t *node, dq_queue_t *queue)
{
+8 -13
View File
@@ -1,4 +1,4 @@
/************************************************************
/****************************************************************************
* libc/queue/dq_addlast.c
*
* Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved.
@@ -31,29 +31,25 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************/
****************************************************************************/
/************************************************************
* Compilation Switches
************************************************************/
/************************************************************
/****************************************************************************
* Included Files
************************************************************/
****************************************************************************/
#include <queue.h>
/************************************************************
/****************************************************************************
* Public Functions
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Name: dq_addlast
*
* Description
* dq_addlast adds 'node' to the end of 'queue'
*
************************************************************/
****************************************************************************/
void dq_addlast(FAR dq_entry_t *node, dq_queue_t *queue)
{
@@ -71,4 +67,3 @@ void dq_addlast(FAR dq_entry_t *node, dq_queue_t *queue)
queue->tail = node;
}
}
+8 -13
View File
@@ -1,4 +1,4 @@
/************************************************************
/****************************************************************************
* libc/queue/dq_rem.c
*
* Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved.
@@ -31,29 +31,25 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************/
****************************************************************************/
/************************************************************
* Compilation Switches
************************************************************/
/************************************************************
/****************************************************************************
* Included Files
************************************************************/
****************************************************************************/
#include <queue.h>
/************************************************************
/****************************************************************************
* Public Functions
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Name: dq_rem
*
* Descripton:
* dq_rem removes 'node' from 'queue'
*
************************************************************/
****************************************************************************/
void dq_rem(FAR dq_entry_t *node, dq_queue_t *queue)
{
@@ -81,4 +77,3 @@ void dq_rem(FAR dq_entry_t *node, dq_queue_t *queue)
node->flink = NULL;
node->blink = NULL;
}
+8 -13
View File
@@ -1,4 +1,4 @@
/************************************************************
/****************************************************************************
* libc/queue/dq_remfirst.c
*
* Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved.
@@ -31,29 +31,25 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************/
****************************************************************************/
/************************************************************
* Compilation Switches
************************************************************/
/************************************************************
/****************************************************************************
* Included Files
************************************************************/
****************************************************************************/
#include <queue.h>
/************************************************************
/****************************************************************************
* Public Functions
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Name: dq_remfirst
*
* Description:
* dq_remfirst removes 'node' from the head of 'queue'
*
************************************************************/
****************************************************************************/
FAR dq_entry_t *dq_remfirst(dq_queue_t *queue)
{
@@ -79,4 +75,3 @@ FAR dq_entry_t *dq_remfirst(dq_queue_t *queue)
return ret;
}
+9 -14
View File
@@ -1,4 +1,4 @@
/************************************************************
/****************************************************************************
* libc/queue/sq_addafter.c
*
* Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved.
@@ -31,30 +31,25 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************/
****************************************************************************/
/************************************************************
* Compilation Switches
************************************************************/
/************************************************************
/****************************************************************************
* Included Files
************************************************************/
****************************************************************************/
#include <queue.h>
/************************************************************
/****************************************************************************
* Public Functions
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Name: sq_addafter.c
*
* Description:
* The sq_addafter function adds 'node' after 'prev' in the
* 'queue.'
* The sq_addafter function adds 'node' after 'prev' in the 'queue.'
*
************************************************************/
****************************************************************************/
void sq_addafter(FAR sq_entry_t *prev, FAR sq_entry_t *node,
sq_queue_t *queue)
+9 -14
View File
@@ -1,4 +1,4 @@
/************************************************************
/****************************************************************************
* libc/queue/sq_addfirst.c
*
* Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved.
@@ -31,30 +31,25 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************/
****************************************************************************/
/************************************************************
* Compilation Switches
************************************************************/
/************************************************************
/****************************************************************************
* Included Files
************************************************************/
****************************************************************************/
#include <queue.h>
/************************************************************
/****************************************************************************
* Public Functions
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Name: sq_addfirst
*
* Description:
* The sq_addfirst function places the 'node' at the head
* of the 'queue'
* The sq_addfirst function places the 'node' at the head of the 'queue'
*
************************************************************/
****************************************************************************/
void sq_addfirst(FAR sq_entry_t *node, sq_queue_t *queue)
{
+8 -13
View File
@@ -1,4 +1,4 @@
/************************************************************
/****************************************************************************
* libc/queue/sq_addlast.c
*
* Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved.
@@ -31,29 +31,25 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************/
****************************************************************************/
/************************************************************
* Compilation Switches
************************************************************/
/************************************************************
/****************************************************************************
* Included Files
************************************************************/
****************************************************************************/
#include <queue.h>
/************************************************************
/****************************************************************************
* Public Functions
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Name: sq_addlast
*
* Description:
* The sq_addlast function places the 'node' at the tail of
* the 'queue'
************************************************************/
****************************************************************************/
void sq_addlast(FAR sq_entry_t *node, sq_queue_t *queue)
{
@@ -69,4 +65,3 @@ void sq_addlast(FAR sq_entry_t *node, sq_queue_t *queue)
queue->tail = node;
}
}
+8 -12
View File
@@ -1,4 +1,4 @@
/************************************************************
/****************************************************************************
* libc/queue/sq_rem.c
*
* Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved.
@@ -31,29 +31,25 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************/
****************************************************************************/
/************************************************************
* Compilation Switches
************************************************************/
/************************************************************
/****************************************************************************
* Included Files
************************************************************/
****************************************************************************/
#include <queue.h>
/************************************************************
/****************************************************************************
* public Functions
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Name: sq_rem
*
* Description:
* sq_rem removes a 'node' for 'queue.'
*
************************************************************/
****************************************************************************/
void sq_rem(FAR sq_entry_t *node, sq_queue_t *queue)
{
+10 -14
View File
@@ -1,4 +1,4 @@
/************************************************************
/****************************************************************************
* libc/queue/sq_remafter.c
*
* Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved.
@@ -31,30 +31,26 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************/
****************************************************************************/
/************************************************************
* Compilation Switches
************************************************************/
/************************************************************
/****************************************************************************
* Included Files
************************************************************/
****************************************************************************/
#include <queue.h>
/************************************************************
/****************************************************************************
* Public Functions
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Name:
*
* Description:
* sq_remafter removes the entry following 'node; from the
* 'queue' Returns a reference to the removed entry.
* sq_remafter removes the entry following 'node; from the'queue' Returns
* a reference to the removed entry.
*
************************************************************/
****************************************************************************/
FAR sq_entry_t *sq_remafter(FAR sq_entry_t *node, sq_queue_t *queue)
{
+9 -14
View File
@@ -1,4 +1,4 @@
/************************************************************
/****************************************************************************
* libc/queue/sq_remfirst.c
*
* Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved.
@@ -31,30 +31,25 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************/
****************************************************************************/
/************************************************************
* Compilation Switches
************************************************************/
/************************************************************
/****************************************************************************
* Included Files
************************************************************/
****************************************************************************/
#include <queue.h>
/************************************************************
/****************************************************************************
* Public Functions
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Name: sq_remfirst
*
* Description:
* sq_remfirst function removes the first entry from
* 'queue'
* sq_remfirst function removes the first entry from 'queue'
*
************************************************************/
****************************************************************************/
FAR sq_entry_t *sq_remfirst(sq_queue_t *queue)
{
+8 -12
View File
@@ -1,4 +1,4 @@
/************************************************************
/****************************************************************************
* libc/queue/sq_remlast.c
*
* Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved.
@@ -31,29 +31,25 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************/
****************************************************************************/
/************************************************************
* Compilation Switches
************************************************************/
/************************************************************
/****************************************************************************
* Included Files
************************************************************/
****************************************************************************/
#include <queue.h>
/************************************************************
/****************************************************************************
* Public Functions
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Name: sq_remlast
*
* Description:
* Removes the last entry in a singly-linked queue.
*
************************************************************/
****************************************************************************/
FAR sq_entry_t *sq_remlast(sq_queue_t *queue)
{