confuse-devel
[Top][All Lists]
Advanced

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

[Confuse-devel] list of tags in key/value pairs


From: Nicholas Satterly
Subject: [Confuse-devel] list of tags in key/value pairs
Date: Fri, 2 Nov 2012 00:04:48 +0000

Hi,

I'm trying to use libConfuse to initialise a list of tags like so...

section {
    tags = { tag1 = abc, tag2 = xyz }
}

The best I've managed to do so far is use a list of strings and then strtok() each one on the equals sign...

section {
  tags = { "tag1 = abc", "tag2 = xyz" }
}

But surrounding the key/value pairs with double quotes is ugly and (human) error prone. A possible option might be something like this...

section {
  tags {
    tag1 = abc
    tag2 = xyz
  }
}

Another option could be to use callbacks however I don't completely understand how they work with libConfuse.

Any help would be greatly appreciated.

Thanks,
Nick

reply via email to

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