[illumos-Developer] Requesting code review for opensource /usr/xpg4/bin/more replacement with "less" ...

Garrett D'Amore garrett at damore.org
Mon Jan 17 12:05:22 PST 2011


On Mon, 2011-01-17 at 11:54 -0800, Adam Leventhal wrote:
> Hey Roland,
> 
> Apologies if I missed this discussion, but why is this something that
> should be in illumos? First less is not the same as more; second, why
> wouldn't the downstream distros just include less if that's what they
> wanted to do?

Actually, it *is* the same as more, when called as "more".  In fact, the
author of the original "more" utility on some platforms is the same as
the author of "less".

The reason we need this is to address the fact that /usr/xpg4/bin/more
is closed source.  This is the lowest cost solution to a replacement for
that code.  Its the same solution the BSDs arrived at, btw.

The only other reasonable alternative, IMO, is to remove "more" from ON
altogether.

	- Garrett
> 
> Adam
> 
> On Mon, Jan 17, 2011 at 6:15 AM, Roland Mainz <roland.mainz at nrubsig.org> wrote:
> > Hi!
> >
> > ----
> >
> > Below are the webrev(s) which integrate the "less" utility as
> > opensource replacement for /usr/xpg4/bin/more. The same webrev
> > provides the usual "less" utilities.
> >
> > The webrev come in two flavors:
> >
> > 1. "less" compiled with plain regex API:
> > http://cr.opensolaris.org/~gisburn/illumos_b520_xpg4more_plainregex/
> >
> > 2. "less" compiled with an extended regex API which allows alternative
> > pattern systems to be used in searches, e.g. (?P)pattern for perl
> > pattern, (?Si)pattern for case-insensitive shell patterns etc.:
> > http://cr.opensolaris.org/~gisburn/illumos_b520_xpg4more_perlregex/
> >
> > Notes:
> > - The code provides /usr/bin/less, /usr/bin/lessecho and
> > /usr/bin/lesskey and a softlink from /usr/xpg4/bin/more to
> > ../../bin/less (=/usr/bin/less) as part of the base packages
> > - "less" will switch to POSIX "more" mode when launched as "more"
> > - The code is compiled with XPG6 flags to make sure XPG[64] version of
> > matching libc calls are made (e.g. XPG4 version of |system()|) to
> > ensure POSIX conformance.
> >
> > ToDo:
> > - Make a choice which regex engine we'll use
> > - There is one issue with multibyte characters I'm currently investigating
> > - Integrate review feedback
> >
> > ----
> >
> > Bye,
> > Roland
> >
> > --
> >   __ .  . __
> >  (o.\ \/ /.o) roland.mainz at nrubsig.org
> >   \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
> >   /O /==\ O\  TEL +49 641 3992797
> >  (;O/ \/ \O;)
> >
> > _______________________________________________
> > Developer mailing list
> > Developer at lists.illumos.org
> > http://lists.illumos.org/m/listinfo/developer
> >
> 
> 
> 





More information about the Developer mailing list