Changeset - 331971ed5c6b
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 16 years ago 2009-07-26 15:15:58
ohnobinki@ohnopublishing.net
coments on options_init()
1 file changed with 4 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/common/options.h
Show inline comments
 
@@ -45,6 +45,10 @@ struct options_common
 

	
 
  Options should be kept alive during the program's life.
 

	
 
  The environment variable DISTREN_CONFIG, the built-in default config file location, or arguments passed on the commandline are used to determine the prefix of the config file name. Order of precedence: The command line is used first, then the environment variable, and then the default if no others sources specify the prefix.
 

	
 
  A calling function must call options_init() before processing its own arguments so that the libdistrencommon-specific help listing may be shown. The caller must also ignore libdistrencommon specific options. To avoid complication, those arguments are "c:h". Obviously, "h" should be handled sspecially ;-) (i.e., the caller should not ignore the "h" switch... it should output information about arguments it supports). Of course, calling functions could just rely on the 
 

	
 
  \param mycfg will be set to the section of the configuration file specific to the caller (client or server specific section). Who is supposed to free this variable?
 
  \param myopts holds the caller's confuse option declarations
 
  \param myname holds the name of the section of the config file that refers to mycfg and myopts -- currently ``slave'', ``client'', and ``server'' are valid
0 comments (0 inline, 0 general)