diff options
author | joerg <joerg@FreeBSD.org> | 1996-09-08 18:23:53 +0000 |
---|---|---|
committer | joerg <joerg@FreeBSD.org> | 1996-09-08 18:23:53 +0000 |
commit | 7f766016b3f0e6f87f36790b650231b6d2acdbe0 (patch) | |
tree | 7cbfdcd38cac4a311a34210854b575c9805e4653 | |
parent | 6ba270257af91a5aaf788d6e7ccb28acf3ad9e3f (diff) | |
download | FreeBSD-src-7f766016b3f0e6f87f36790b650231b6d2acdbe0.zip FreeBSD-src-7f766016b3f0e6f87f36790b650231b6d2acdbe0.tar.gz |
. make vgrind 8-bit clean; note that it still implicitly assumes
ISO-8859-1, since the characters are simply being passed on to
groff
. introduce an option to override the silly default to `psroff' as
the post-processor
. document the new option
-rw-r--r-- | usr.bin/vgrind/vfontedpr.c | 4 | ||||
-rw-r--r-- | usr.bin/vgrind/vgrind.1 | 15 | ||||
-rw-r--r-- | usr.bin/vgrind/vgrind.sh | 20 |
3 files changed, 30 insertions, 9 deletions
diff --git a/usr.bin/vgrind/vfontedpr.c b/usr.bin/vgrind/vfontedpr.c index 523e415..3be249b 100644 --- a/usr.bin/vgrind/vfontedpr.c +++ b/usr.bin/vgrind/vfontedpr.c @@ -565,14 +565,14 @@ putKcp (start, end, force) if (i > 0) { ps("\\*(+K"); do - putcp(*start++); + putcp((unsigned char)*start++); while (--i > 0); ps("\\*(-K"); continue; } } - putcp (*start++); + putcp ((unsigned char)*start++); } } diff --git a/usr.bin/vgrind/vgrind.1 b/usr.bin/vgrind/vgrind.1 index 97ba7e2..352ba7e 100644 --- a/usr.bin/vgrind/vgrind.1 +++ b/usr.bin/vgrind/vgrind.1 @@ -87,9 +87,10 @@ or .Pp In regular mode .Nm vgrind -accepts input files, processes them, and passes them to -.Xr troff 1 -for output. +accepts input files, processes them, and passes them to the postprocessor +for output, +.Xr psroff 1 +by default. .Pp In both modes .Nm vgrind @@ -122,6 +123,8 @@ specifies the language to use. Currently known are C .Pf ( Fl l Ns Ar c or the default), +.Tn C++ +.Pq Fl l Ns Ar c++ , .Tn CSH .Pq Fl l Ns Ar csh , .Tn SHELL @@ -139,6 +142,12 @@ and .Pq Fl l Ns Ar I . .It Fl n forces no keyword bolding +.It Fl p Ar postproc +use +.Ar postproc +to post-process the output, +.Xr psroff 1 +by default. .It Fl s specifies a point size to use on output (exactly the same as the argument of a .ps) diff --git a/usr.bin/vgrind/vgrind.sh b/usr.bin/vgrind/vgrind.sh index fc05461..ad459c5 100644 --- a/usr.bin/vgrind/vgrind.sh +++ b/usr.bin/vgrind/vgrind.sh @@ -41,6 +41,7 @@ set f='' set head="" set vf=/usr/libexec/vfontedpr set tm=/usr/share/tmac +set postproc=psroff top: if ($#argv > 0) then switch ($1:q) @@ -88,6 +89,17 @@ if ($#argv > 0) then goto top endif + case -p: + if ($#argv < 2) then + echo "vgrind: $1:q option must have argument" + goto done + else + set postproc="$2" + shift + shift + goto top + endif + case -*: set options = "$options $1:q" shift @@ -116,10 +128,10 @@ if (-r index) then else if ("$head" != "") then $vf $options -h "$head" $files | \ - sh -c "psroff -rx1 $voptions -i -mvgrind 2>> xindex" + sh -c "$postproc -rx1 $voptions -i -mvgrind 2>> xindex" else $vf $options $files | \ - sh -c "psroff -rx1 $voptions -i -mvgrind 2>> xindex" + sh -c "$postproc -rx1 $voptions -i -mvgrind 2>> xindex" endif endif sort -df +0 -2 xindex >index @@ -133,9 +145,9 @@ else endif else if ("$head" != "") then - $vf $options -h "$head" $files | psroff -i $voptions -mvgrind + $vf $options -h "$head" $files | $postproc -i $voptions -mvgrind else - $vf $options $files | psroff -i $voptions -mvgrind + $vf $options $files | $postproc -i $voptions -mvgrind endif endif endif |