On Feb 01 17:00:29, [email protected] wrote:
> I don't understand your point.  We should not require shell-script writers
> to read C manual pages.  Imagine the following:
> 
> DESCRIPTION
>      The cat utility calls open(2) for files sequentially, then read(2)'s the
>      contents into a buffer before using write(2) the standard output.
> 
> No.  I don't see a problem with explaining what a program does in simple,
> clear english.

The point isn't to introduce a link to a C manpage,
or to avoid simple english, but to avoid the wording 
of "the locale-specific" collation sequence
when LC_COLLATE is in fact ignored.

I agreee that the diff is not a very good way to go about that.
But the current wording suggests that after one specifies a locale,
expr will compare strings according the that.

locale(1) describes LC_COLLATE of course,

        Intended to affect collation order.  It may for example
        affect alphabetic sorting, regular expressions including
        equivalence classes, and the strcoll(3) and strxfrm(3) functions.

so only in strcoll(3) does one eventualy read that
the locale has in fact no effect on collation.
That was the intention.

        Jan



> Jan Stary <[email protected]> wrote:
> 
> > Looking at the source, it's simply strcoll().
> >     
> >     Jan
> > 
> > 
> > Index: bin/expr/expr.1
> > ===================================================================
> > RCS file: /cvs/src/bin/expr/expr.1,v
> > retrieving revision 1.24
> > diff -u -p -r1.24 expr.1
> > --- bin/expr/expr.1 16 Aug 2017 20:10:58 -0000      1.24
> > +++ bin/expr/expr.1 1 Feb 2022 22:53:12 -0000
> > @@ -39,9 +39,10 @@ Returns the evaluation of
> >  if neither expression evaluates to an empty string or zero;
> >  otherwise, returns zero.
> >  .It Ar expr1 Li "{=, >, >=, <, <=, !=}" Ar expr2
> > -Returns the results of integer comparison if both arguments are
> > -decimal integers; otherwise, returns the results of string comparison
> > -using the locale-specific collation sequence.
> > +Returns the results of integer comparison
> > +if both arguments are decimal integers;
> > +otherwise, returns the results of string comparison using
> > +.Xr strcoll 3 .
> >  The result of each comparison is 1 if the specified relation is true,
> >  or 0 if the relation is false.
> >  .It Ar expr1 Li "{+, -}" Ar expr2
> > 
> 
> 

Reply via email to