groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] groffview shell script


From: Colin Watson
Subject: Re: [Groff] groffview shell script
Date: Wed, 28 Nov 2001 14:58:54 +0000
User-agent: Mutt/1.3.23i

On Wed, Nov 28, 2001 at 03:23:21PM +0100, Bernd Warken wrote:
> Good idea, thank you :-)  Tho the xset output might not be reliable 
> everywhere it is a good starting point.  But I would shorten it to a 
> test on `grep /100dpi', such as
> 
> if -n "$DISPLAY"; then
>   if xset q | grep "/100dpi" >/dev/null; then resolution=100
>   else resolution=75
>   fi
>   ... -T X$resolution
> else
>   ...-T latin1 | less
> fi

man (from man-db) goes to some lengths to do better than -T latin1 |
less, since that isn't reliable everywhere (some locales need different
devices, some need different settings of LESSCHARSET, etc.). You could
probably translate some of its code to shell and use that.

-- 
Colin Watson                                  address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]