diff options
| author | Michael Kerrisk <mtk.manpages@gmail.com> | 2007-12-28 05:38:10 +0000 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2007-12-28 05:38:10 +0000 |
| commit | 5ec60461500ffeb8d80e26ae42835379aaba67de (patch) | |
| tree | 086307c661c5f6e8c2a32a960d8f477eb14f0491 /man3/queue.3 | |
| parent | 7afcdaa1a13d575b7c806138d08fb5fdeb2c30d7 (diff) | |
| download | man-pages-5ec60461500ffeb8d80e26ae42835379aaba67de.tar.gz | |
Improve macros used in 2.71 to convert from "mdoc" to "man".
Diffstat (limited to 'man3/queue.3')
| -rw-r--r-- | man3/queue.3 | 86 |
1 files changed, 49 insertions, 37 deletions
diff --git a/man3/queue.3 b/man3/queue.3 index 84b28ee1a9..08485d0007 100644 --- a/man3/queue.3 +++ b/man3/queue.3 @@ -34,7 +34,7 @@ .\" hch, 2002-03-25 .\" 2007-12-08, mtk, Converted from mdoc to man macros .\" -.TH QUEUE 3 2007-12-08 "Linux" "Linux Programmer's Manual" +.TH QUEUE 3 2007-12-28 "Linux" "Linux Programmer's Manual" .SH NAME LIST_ENTRY, LIST_HEAD, LIST_INIT, LIST_INSERT_AFTER, \ LIST_INSERT_HEAD, LIST_REMOVE, TAILQ_ENTRY, TAILQ_HEAD, \ @@ -85,28 +85,33 @@ CIRCLEQ_REMOVE \- implementations of lists, tail queues, and circular queues These macros define and operate on three types of data structures: lists, tail queues, and circular queues. All three structures support the following functionality: -.RS -.IP 1. 4 +.sp +.RS 4 +.PD 0 +.IP * 4 Insertion of a new entry at the head of the list. -.IP 2. +.IP * Insertion of a new entry after any element in the list. -.IP 3. +.IP * Removal of any entry in the list. -.IP 4. +.IP * Forward traversal through the list. +.PD .RE .PP Lists are the simplest of the three data structures and support only the above functionality. Tail queues add the following functionality: -.RS -.IP 1. 4 +.RS 4 +.IP * 4 Entries can be added at the end of a list. .RE .PP However: -.RS +.sp +.RS 4 +.PD 0 .IP 1. 4 All list insertions and removals must specify the head of the list. .IP 2. @@ -114,20 +119,26 @@ Each head entry requires two pointers rather than one. .IP 3. Code size is about 15% greater and operations run about 20% slower than lists. +.PD .RE .PP Circular queues add the following functionality: -.RS -.IP 1. 4 +.sp +.RS 4 +.PD 0 +.IP * 4 Entries can be added at the end of a list. -.IP 2. +.IP * Entries can be added before another entry. -.IP 3. +.IP * They may be traversed backwards, from tail to head. +.PD .RE .PP However: -.RS +.sp +.RS 4 +.PD 0 .IP 1. 4 All list insertions and removals must specify the head of the list. .IP 2. @@ -137,6 +148,7 @@ The termination condition for traversal is more complex. .IP 4. Code size is about 40% greater and operations run about 45% slower than lists. +.PD .RE .PP In the macro definitions, @@ -177,7 +189,7 @@ structure is declared as follows: LIST_HEAD(HEADNAME, TYPE) head; .fi .in -.sp +.PP where .I HEADNAME is the name of the structure to be defined, and @@ -190,36 +202,36 @@ A pointer to the head of the list can later be declared as: struct HEADNAME *headp; .fi .in -.sp +.PP (The names .IR "head" and .IR "headp" are user selectable.) -.sp +.PP The macro .B LIST_ENTRY declares a structure that connects the elements in the list. -.sp +.PP The macro .B LIST_INIT initializes the list referenced by .IR head . -.sp +.PP The macro .B LIST_INSERT_HEAD inserts the new element .I elm at the head of the list. -.sp +.PP The macro .B LIST_INSERT_AFTER inserts the new element .I elm after the element .IR listelm . -.sp +.PP The macro .B LIST_REMOVE removes the element @@ -281,42 +293,42 @@ A pointer to the head of the tail queue can later be declared as: struct HEADNAME *headp; .fi .in -.sp +.PP (The names .IR "head" and .IR "headp" are user selectable.) -.sp +.PP The macro .B TAILQ_ENTRY declares a structure that connects the elements in the tail queue. -.sp +.PP The macro .B TAILQ_INIT initializes the tail queue referenced by .IR head . -.sp +.PP The macro .B TAILQ_INSERT_HEAD inserts the new element .I elm at the head of the tail queue. -.sp +.PP The macro .B TAILQ_INSERT_TAIL inserts the new element .I elm at the end of the tail queue. -.sp +.PP The macro .B TAILQ_INSERT_AFTER inserts the new element .I elm after the element .IR listelm . -.sp +.PP The macro .B TAILQ_REMOVE removes the element @@ -369,7 +381,7 @@ structure is declared as follows: CIRCLEQ_HEAD(HEADNAME, TYPE) head; .fi .in -.sp +.PP where .IR "HEADNAME" is the name of the structure to be defined, and @@ -382,49 +394,49 @@ A pointer to the head of the circular queue can later be declared as: struct HEADNAME *headp; .fi .in -.sp +.PP (The names .IR "head" and .IR "headp" are user selectable.) -.sp +.PP The macro .B CIRCLEQ_ENTRY declares a structure that connects the elements in the circular queue. -.sp +.PP The macro .B CIRCLEQ_INIT initializes the circular queue referenced by .IR head . -.sp +.PP The macro .B CIRCLEQ_INSERT_HEAD inserts the new element .I elm at the head of the circular queue. -.sp +.PP The macro .B CIRCLEQ_INSERT_TAIL inserts the new element .I elm at the end of the circular queue. -.sp +.PP The macro .B CIRCLEQ_INSERT_AFTER inserts the new element .I elm after the element .IR listelm . -.sp +.PP The macro .B CIRCLEQ_INSERT_BEFORE inserts the new element .I elm before the element .IR listelm . -.sp +.PP The macro .B CIRCLEQ_REMOVE removes the element |
