groff
[Top][All Lists]
Advanced

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

Re: [Groff] new groff directory structure


From: Eli Zaretskii
Subject: Re: [Groff] new groff directory structure
Date: Tue, 31 Oct 2000 10:43:43 +0200 (IST)

On Tue, 31 Oct 2000, Werner LEMBERG wrote:

> OK.  The planned wrapper programs will be extremely simple: Just
> evaluating the GROFF_VERSION environment variable, building a path
> with it, and calling a binary using that path.

This will work, but I think it would be a good idea to have this indirect 
invocation be a configure-time option.  Running an extra program wastes 
system resources, which on some systems might be significant.  OTOH, I 
expect this feature to be rarely used, mainly by developers who want to 
have more than a single version operable at the same tyime.  IMHO we 
should not punish the majority for the needs of the few.

> BTW, do you have code for a similar wrapper program which works on
> MS-DOS also?  I'm not too familiar with pipes...

I'm not sure I understand what pipes have got to do with this.  Isn't 
the following enough for the wrapper to do what you want?

        char *version = getenv("GROFF_VERSION");

        sprintf (cmdbuf, "%s%s/%s %s", "/usr/local/lib/",
                 version ? version : GROFF_VERSION,
                 program_name,
                 rest_arguments);

        return system (cmdbuf);

(assuming rest_arguments holds all of the argv[1]...argv[argc-1] as a 
string.)

reply via email to

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