[comp.sources.d] cref & pr

stan@sdba.UUCP (Stan Brown) (05/15/88)

	Does anyone know of a PD version of cref ?  My basic problem
is that ythe version that comes with my machine (a Fortune 32:16 
(a 68000 box)) aparently execs() pr for printing th source file(s).
This would be fine except that the version of pr that comes with
this machine gives a page length shorter than 66 lines if invoked
in a pipline.  I have fixed this for other places by alliasing
pr to pr -l66 & using the same synatx in all shell scripts that
use pr.

	Upon rfelction maybe what I need is a PD pr or a method
to convince pr that it is really pr -l66 when invoked from
cref (environmet variable maybe ?)

	Any thoghts would be appreciated

Cheers
Stan


-- 
Stan Brown	S. D. Brown & Associates	404-292-9497
gatech!sdba!stan
	"vi forever"

geoff@desint.UUCP (Geoff Kuenning) (05/18/88)

In article <241@sdba.UUCP> stan@sdba.UUCP (Stan Brown) writes:

> 	Upon rfelction maybe what I need is a PD pr or a method
> to convince pr that it is really pr -l66 when invoked from
> cref (environmet variable maybe ?)

Try renaming cref and pr to cref.real and pr.real, respectively.  Then
write short scripts named cref and pr.  The cref script sets your environment
variable and invokes cref.real.  The pr script checks the arguments, collecting
the -l<nn> argument if any, and then invokes pr.real appropriately.

You could skip the cref.real part if you just made your pr script always
default to 66 lines, like the original does.  Save us from overly clever,
underly experienced systems programmers who "help" us with such misfeatures!
-- 
	Geoff Kuenning   geoff@ITcorp.com   {uunet,trwrb}!desint!geoff