On 25 July 2010 16:14, Wes Hardaker <[email protected]> wrote:
> There are a number of cases I could see people wanting:
>
> 1) "include foo.conf" includes *every* found instance in the config path
> 2) "include foo.conf" includes only a singular foo.conf
>
> I suspect that it would be easiest to make #2 happen if and only if the
> foo.conf file starts with '/' or './' or '../'. Anything else and it
> should probably look for every instance.
I see a few possible ways of providing such functionality:
a) An include token containing the '/' character is treated
as a single-file inclusion - either an absolute path,
or relative to the including file.
[I presume that would be more sensible
than interpreting a relative path with
respect to the current directory]
Anything else is searched for on the config path
b) Have an option to distinguish between them
("include searched.conf", vs "include -c single.file.conf")
c) Use separate config tokens for these two approaches
(e.g. "include"/"includefile", or "includeconf"/"include")
Thoughts? Preferences?
> (I forget whether it's possible to do #1 right now; my recollection
> from a phone conference with Robert was that #1 was actually
> going to be easier and that's what it's doing now).
Yes - that is what the current code does. (Much to my surprise!)
Hence my patch to implement the (IMO) more natural behaviour
of including a single named file.
Dave
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders