As a part of my current project I'm writing a configuration file interface.
Originally I had thought it would be easier for people to just use a parser generator, but with something as simple as a config file it's easier to simply call a few functions sacrificing speed for ease (and speed) of implementation. Currently only three functions need to be called for the simplest method, init, parse, and shutdown.
I currently have some level of complexity (like expressions) but I still want to keep it largely simplistic because it's not a scripting language.
My first question is: if you were using a config file api what kinds of functions would you like to see in it? Are extra things like structure definition useless bulk compared to the simple ini [section] style?
And secondly: For parsing large sections at once (like chunks of vars), do you like the idea of accessing information with an associative array type method; or would something else be better?