[GRASS5] which, less and SUBMITTING

Glynn Clements glynn.clements at virgin.net
Wed Apr 18 11:58:52 EDT 2001


Justin Hickey wrote:

> Second, if I recall correctly, Huidae Cho was the author who added the
> $PAGER check. Huidae, what was the reason for adding this into Ini.sh?
> Was there a platform that required $PAGER to be set? Or was it just the
> preference of a user?
> 
> If $PAGER, is not actually required, then I vote that this part of
> Init.sh be removed.

Recursively grepping for "PAGER" produces:

src/imagery/i.ortho.photo/libes/ls_cameras.c:59:    sprintf (buf, "$PAGER %s", tempfile);
src/imagery/i.ortho.photo/libes/ls_elev.c:49:    sprintf (buf, "$PAGER %s", tempfile);
src/libes/imagery/ls_groups.c:68:    sprintf (buf, "$PAGER %s", tempfile);
src/libes/imagery/ls_groups.c:126:    sprintf (buf, "$PAGER %s", tempfile);
src/raster/r.info/inter/more_print.c:9:     sprintf(command,"clear; $PAGER %s",tmpname);

The resulting string being fed to either system() or G_system().

NB: there were some references in g.manual, but these seem to have
been removed recently (since the start of the release branch).

As a stop-gap measure[1], I suggest changing $PAGER to $GRASS_PAGER
throughout, and initialising the latter in Init.sh.

[1] In the longer term, the use of system() should be abolished
altogether in favour of a function which takes individual arguments
(as with execl() et al).

-- 
Glynn Clements <glynn.clements at virgin.net>

---------------------------------------- 
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'



More information about the grass-dev mailing list