diff mbox

manual: Update prototypes for alphasort and friends

Message ID 1400620819-2798-1-git-send-email-rv@rasmusvillemoes.dk
State New
Headers show

Commit Message

Rasmus Villemoes May 20, 2014, 9:20 p.m. UTC
The four functions {alpha,version}sort{,64} take parameters of type
const struct dirent{,64} **, not const void *.

Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk>
---
 manual/filesys.texi | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Adhemerval Zanella May 21, 2014, 1:17 a.m. UTC | #1
On 20-05-2014 18:20, Rasmus Villemoes wrote:
> The four functions {alpha,version}sort{,64} take parameters of type
> const struct dirent{,64} **, not const void *.
>
> Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk>
> ---
>  manual/filesys.texi | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/manual/filesys.texi b/manual/filesys.texi
> index 9bf5baf..7d55b43 100644
> --- a/manual/filesys.texi
> +++ b/manual/filesys.texi
> @@ -748,7 +748,7 @@ are very helpful for this purpose.
>
>  @comment dirent.h
>  @comment BSD/SVID
> -@deftypefun int alphasort (const void *@var{a}, const void *@var{b})
> +@deftypefun int alphasort (const struct dirent **@var{a}, const struct dirent **@var{b})
>  @safety{@prelim{}@mtsafe{@mtslocale{}}@asunsafe{@ascuheap{}}@acunsafe{@acsmem{}}}
>  @c Calls strcoll.
>  The @code{alphasort} function behaves like the @code{strcoll} function
> @@ -762,7 +762,7 @@ than zero depending on the order of the two entries @var{a} and @var{b}.
>
>  @comment dirent.h
>  @comment GNU
> -@deftypefun int versionsort (const void *@var{a}, const void *@var{b})
> +@deftypefun int versionsort (const struct dirent **@var{a}, const struct dirent **@var{b})
>  @safety{@prelim{}@mtsafe{@mtslocale{}}@assafe{}@acsafe{}}
>  @c Calls strverscmp, which will accesses the locale object multiple
>  @c times.
> @@ -797,7 +797,7 @@ argument.  Instead we provide the two replacement functions below.
>
>  @comment dirent.h
>  @comment GNU
> -@deftypefun int alphasort64 (const void *@var{a}, const void *@var{b})
> +@deftypefun int alphasort64 (const struct dirent64 **@var{a}, const struct dirent **@var{b})
>  @safety{@prelim{}@mtsafe{@mtslocale{}}@asunsafe{@ascuheap{}}@acunsafe{@acsmem{}}}
>  @c See alphasort.
>  The @code{alphasort64} function behaves like the @code{strcoll} function
> @@ -811,7 +811,7 @@ than zero depending on the order of the two entries @var{a} and @var{b}.
>
>  @comment dirent.h
>  @comment GNU
> -@deftypefun int versionsort64 (const void *@var{a}, const void *@var{b})
> +@deftypefun int versionsort64 (const struct dirent64 **@var{a}, const struct dirent64 **@var{b})
>  @safety{@prelim{}@mtsafe{@mtslocale{}}@assafe{}@acsafe{}}
>  @c See versionsort.
>  The @code{versionsort64} function is like @code{alphasort64}, excepted that it
LGTM, thanks for spotting it.
Ondřej Bílka May 23, 2014, 9:28 a.m. UTC | #2
On Tue, May 20, 2014 at 10:17:01PM -0300, Adhemerval Zanella wrote:
> On 20-05-2014 18:20, Rasmus Villemoes wrote:
> > The four functions {alpha,version}sort{,64} take parameters of type
> > const struct dirent{,64} **, not const void *.
> >
> > Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk>
> > ---
> LGTM, thanks for spotting it.

I pushed this with following changelog.

2014-05-23  Rasmus Villemoes  <rv@rasmusvillemoes.dk>

       * manual/filesys.texi (Scanning Directory Content): Fix prototype of
       alphasort and versionsort.
diff mbox

Patch

diff --git a/manual/filesys.texi b/manual/filesys.texi
index 9bf5baf..7d55b43 100644
--- a/manual/filesys.texi
+++ b/manual/filesys.texi
@@ -748,7 +748,7 @@  are very helpful for this purpose.
 
 @comment dirent.h
 @comment BSD/SVID
-@deftypefun int alphasort (const void *@var{a}, const void *@var{b})
+@deftypefun int alphasort (const struct dirent **@var{a}, const struct dirent **@var{b})
 @safety{@prelim{}@mtsafe{@mtslocale{}}@asunsafe{@ascuheap{}}@acunsafe{@acsmem{}}}
 @c Calls strcoll.
 The @code{alphasort} function behaves like the @code{strcoll} function
@@ -762,7 +762,7 @@  than zero depending on the order of the two entries @var{a} and @var{b}.
 
 @comment dirent.h
 @comment GNU
-@deftypefun int versionsort (const void *@var{a}, const void *@var{b})
+@deftypefun int versionsort (const struct dirent **@var{a}, const struct dirent **@var{b})
 @safety{@prelim{}@mtsafe{@mtslocale{}}@assafe{}@acsafe{}}
 @c Calls strverscmp, which will accesses the locale object multiple
 @c times.
@@ -797,7 +797,7 @@  argument.  Instead we provide the two replacement functions below.
 
 @comment dirent.h
 @comment GNU
-@deftypefun int alphasort64 (const void *@var{a}, const void *@var{b})
+@deftypefun int alphasort64 (const struct dirent64 **@var{a}, const struct dirent **@var{b})
 @safety{@prelim{}@mtsafe{@mtslocale{}}@asunsafe{@ascuheap{}}@acunsafe{@acsmem{}}}
 @c See alphasort.
 The @code{alphasort64} function behaves like the @code{strcoll} function
@@ -811,7 +811,7 @@  than zero depending on the order of the two entries @var{a} and @var{b}.
 
 @comment dirent.h
 @comment GNU
-@deftypefun int versionsort64 (const void *@var{a}, const void *@var{b})
+@deftypefun int versionsort64 (const struct dirent64 **@var{a}, const struct dirent64 **@var{b})
 @safety{@prelim{}@mtsafe{@mtslocale{}}@assafe{}@acsafe{}}
 @c See versionsort.
 The @code{versionsort64} function is like @code{alphasort64}, excepted that it