zmore: rewrite to fix bugs and assume POSIX
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 20 Jun 2012 00:22:52 +0000 (17:22 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 20 Jun 2012 00:23:32 +0000 (17:23 -0700)
commitc8ae982a0f65d04313411ac7346d9e5ac6476797
tree5e55b4f504b50cd2b0192478ec511e853478c4ce
parent1e785ca6f6bdbf19367321d30abd3b791176c2aa
zmore: rewrite to fix bugs and assume POSIX

Problem reported for Solaris 9 by Daniel in
<http://lists.gnu.org/archive/html/bug-gzip/2012-06/msg00007.html>.
Rather than figure out what exactly went wrong in Solaris 9
it was easier to rip out all the buggy compatibility and stty cruft.
* zmore.in: Don't use stty or trap; simply pipe the output to 'more'
and let it deal with signals and terminal control.
Use printf, not 'echo', to avoid problems with backslashes.
Don't assume ANS is not 's' in the environment.
Use a 'more'-style header instead of rolling our own style.
Paginate the header, too; the old behavior lost the header.
* NEWS, zmore.1: Document this.
NEWS
zmore.1
zmore.in