linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
To: Alejandro Colomar <alx.manpages@gmail.com>
Cc: mtk.manpages@gmail.com, linux-man@vger.kernel.org,
	libc-alpha@sourceware.org
Subject: Re: [PATCH] circleq.3: Fix CIRCLEQ_LOOP_*() return type
Date: Wed, 20 Jan 2021 09:56:18 +0100	[thread overview]
Message-ID: <ee727e99-a3b4-e58c-411b-dcb39de025c3@gmail.com> (raw)
In-Reply-To: <20210119211226.440430-1-alx.manpages@gmail.com>

Hi Alex,

On 1/19/21 10:12 PM, Alejandro Colomar wrote:
> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
> ---
>  man3/circleq.3 | 18 ++++++++++++++----
>  1 file changed, 14 insertions(+), 4 deletions(-)

Thanks. Patch applied.

Cheers,

Michael

> diff --git a/man3/circleq.3 b/man3/circleq.3
> index 6b6b9aa14..f21bbf903 100644
> --- a/man3/circleq.3
> +++ b/man3/circleq.3
> @@ -75,9 +75,9 @@ CIRCLEQ_REMOVE
>  .BI "struct TYPE *CIRCLEQ_LAST(CIRCLEQ_HEAD *" head );
>  .BI "struct TYPE *CIRCLEQ_PREV(struct TYPE *" elm ", CIRCLEQ_ENTRY " NAME );
>  .BI "struct TYPE *CIRCLEQ_NEXT(struct TYPE *" elm ", CIRCLEQ_ENTRY " NAME );
> -.BI "void CIRCLEQ_LOOP_PREV(CIRCLEQ_HEAD *" head ,
> +.BI "struct TYPE *CIRCLEQ_LOOP_PREV(CIRCLEQ_HEAD *" head ,
>  .BI "                           struct TYPE *" elm ", CIRCLEQ_ENTRY " NAME );
> -.BI "void CIRCLEQ_LOOP_NEXT(CIRCLEQ_HEAD *" head ,
> +.BI "struct TYPE *CIRCLEQ_LOOP_NEXT(CIRCLEQ_HEAD *" head ,
>  .BI "                           struct TYPE *" elm ", CIRCLEQ_ENTRY " NAME );
>  .PP
>  .BI "CIRCLEQ_FOREACH(struct TYPE *" var ", CIRCLEQ_HEAD *" head ,
> @@ -238,13 +238,23 @@ and zero if the queue contains at least one entry.
>  .PP
>  .BR CIRCLEQ_FIRST (),
>  .BR CIRCLEQ_LAST (),
> -.BR CIRCLEQ_PREV (),
> +.BR CIRCLEQ_LOOP_PREV (),
>  and
> -.BR CIRCLEQ_NEXT ()
> +.BR CIRCLEQ_LOOP_NEXT ()
>  return a pointer to the first, last, previous, or next
>  .I TYPE
>  structure, respectively.
>  .PP
> +.BR CIRCLEQ_PREV (),
> +and
> +.BR CIRCLEQ_NEXT ()
> +are similar to their
> +.BR CIRCLEQ_LOOP_* ()
> +counterparts,
> +except that if the argument is the first or last element, respectively,
> +they return
> +.IR &head .
> +.PP
>  .BR CIRCLEQ_HEAD_INITIALIZER ()
>  returns an initializer that can be assigned to the queue
>  .IR head .
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

      reply	other threads:[~2021-01-20  8:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-19 21:12 [PATCH] circleq.3: Fix CIRCLEQ_LOOP_*() return type Alejandro Colomar
2021-01-20  8:56 ` Michael Kerrisk (man-pages) [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ee727e99-a3b4-e58c-411b-dcb39de025c3@gmail.com \
    --to=mtk.manpages@gmail.com \
    --cc=alx.manpages@gmail.com \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-man@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).