confuse-devel
[Top][All Lists]
Advanced

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

[Confuse-devel] Default values and setting a variable in the same functi


From: Andre Kloth
Subject: [Confuse-devel] Default values and setting a variable in the same function?
Date: Fri, 2 Sep 2005 10:57:09 +0200
User-agent: KMail/1.8.2

Hello Martin,

first of all I want to thank you for your great work on confuse. I like to 
use it :)

But there is a feature that I did not found in confuse. It would be great if 
you could "link" a configuration parameter with a variable's value _and_ 
(in case) a default value. Like a combination of e.g. CFG_INT and 
CFG_SIMPLE_INT:

  # define DEFAULT 10
  int param;
  ....
  CFG_DEF_INT("PARAM_IN_CONFIG", DEFAULT, &param, CFGF_NONE);
  ....

Maybe this could make it easier to handle a config. At present, my code 
looks like this:

  ....
  CFG_INT("PARAM_IN_CONFIG", DEFAULT, CFGF_NONE);
  ....
  param = cfg_getint(cfg, "PARAM_IN_CONFIG");
  ....


Thanks,
Andre'

Attachment: pgp2hevfkE2d_.pgp
Description: PGP signature


reply via email to

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