[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openbsd-tech
Subject:    Re: [PATCH] Few missing items in queue(3) man page
From:       Jason McIntyre <jmc () kerhand ! co ! uk>
Date:       2008-03-31 13:16:26
Message-ID: 20080331131649.GB18459 () bramka ! kerhand ! co ! uk
[Download RAW message or body]

On Mon, Mar 31, 2008 at 12:12:54PM +0530, Girish Venkatachalam wrote:
> Dear all,
> 
> Please find the diff attached.
> 
> -Girish
> 

fixed, thanks.
jmc

> Index: share/man/man3//queue.3
> ===================================================================
> RCS file: /store/openbsd/cvsync/src/share/man/man3/queue.3,v
> retrieving revision 1.45
> diff -u -r1.45 queue.3
> --- share/man/man3//queue.3	24 Dec 2007 10:30:27 -0000	1.45
> +++ share/man/man3//queue.3	31 Mar 2008 06:37:36 -0000
> @@ -93,6 +93,7 @@
> .Nm TAILQ_INSERT_HEAD ,
> .Nm TAILQ_INSERT_TAIL ,
> .Nm TAILQ_REMOVE ,
> +.Nm TAILQ_REPLACE ,
> .Nm CIRCLEQ_ENTRY ,
> .Nm CIRCLEQ_HEAD ,
> .Nm CIRCLEQ_HEAD_INITIALIZER ,
> @@ -109,7 +110,8 @@
> .Nm CIRCLEQ_INSERT_BEFORE ,
> .Nm CIRCLEQ_INSERT_HEAD ,
> .Nm CIRCLEQ_INSERT_TAIL ,
> -.Nm CIRCLEQ_REMOVE
> +.Nm CIRCLEQ_REMOVE ,
> +.Nm CIRCLEQ_REPLACE
> .Nd "implementations of singly-linked lists, doubly-linked lists, simple queues, \
>                 tail queues, and circular queues"
> .Sh SYNOPSIS
> .Fd #include <sys/queue.h>
> @@ -176,6 +178,7 @@
> .Fn SIMPLEQ_END "SIMPLEQ_HEAD *head"
> .Ft int
> .Fn SIMPLEQ_EMPTY "SIMPLEQ_HEAD *head"
> +.Fn SIMPLEQ_FOREACH "VARNAME" "SIMPLEQ_HEAD *head" "SIMPLEQ_ENTRY NAME"
> .Ft void
> .Fn SIMPLEQ_INIT "SIMPLEQ_HEAD *head"
> .Ft void
> @@ -216,6 +219,8 @@
> .Fn TAILQ_INSERT_TAIL "TAILQ_HEAD *head" "struct TYPE *elm" "TAILQ_ENTRY NAME"
> .Ft void
> .Fn TAILQ_REMOVE "TAILQ_HEAD *head" "struct TYPE *elm" "TAILQ_ENTRY NAME"
> +.Ft void
> +.Fn TAILQ_REPLACE "struct TYPE *elm" "struct TYPE *elm2" "TAILQ_ENTRY NAME"
> .Pp
> .Fn CIRCLEQ_ENTRY "TYPE"
> .Fn CIRCLEQ_HEAD "HEADNAME" "TYPE"
> @@ -246,6 +251,8 @@
> .Fn CIRCLEQ_INSERT_TAIL "CIRCLEQ_HEAD *head" "struct TYPE *elm" "CIRCLEQ_ENTRY \
>                 NAME"
> .Ft void
> .Fn CIRCLEQ_REMOVE "CIRCLEQ_HEAD *head" "struct TYPE *elm" "CIRCLEQ_ENTRY NAME"
> +.Ft void
> +.Fn CIRCLEQ_REPLACE "struct TYPE *elm" "struct TYPE *elm2" "CIRCLEQ_ENTRY NAME"
> .Sh DESCRIPTION
> These macros define and operate on five types of data structures:
> singly-linked lists, simple queues, lists, tail queues, and circular queues.
> @@ -839,6 +846,13 @@
> .Fa elm
> from the tail queue.
> .Pp
> +The
> +.Fn TAILQ_REPLACE
> +macro replaces the list element
> +.Fa elm
> +with the new element
> +.Fa elm2 .
> +.Pp
> .Fn TAILQ_FOREACH
> and
> .Fn TAILQ_FOREACH_REVERSE
> @@ -975,6 +989,13 @@
> macro removes the element
> .Fa elm
> from the circular queue.
> +.Pp
> +The
> +.Fn CIRCLEQ_REPLACE
> +macro replaces the list element
> +.Fa elm
> +with the new element
> +.Fa elm2 .
> .Pp
> The
> .Fn CIRCLEQ_FIRST ,


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic