PpHd :
>That's one reason why I dislike your library so much: it encourages laziness: "I don't feel like writing a GUI for configuration,
>let's just have the user poke around in an INI file instead." Programs should never require hand-editing a configuration file.
> Red Hat is finally managing to bring Linux away from this,
Another reason not to choose Fedora. You NEVER get all the options with a GUI.
You're not forced to use their GUI tools, but they are there.
And if some options are hidden, it is a problem of the specific config tools, not of the idea of GUI config tools.
Another reason for conflib is that, for example, all TSR can share the same config file, with a commun section explaining some commun stuff, and with one section per TSR for their private settings. A nigthmare to do in binary.
But why do would you want that? What's the problem with having separate private settings in separate config files?
Flanker
:
No, right. It's just a matter of proper, backwards-compatible design. In almost all cases, just adding to the end of a structure should be enough for new extensions. In the others, you need to think a bit more about the design, but it is not impossible. Give a counterexample if you think I'm wrong.
2 versions of the same program, with different extensions, and developped by different people ?
Well, it's entirely their fault if they don't agree on a common format. (And yes, I know you aren't good at agreeing on formats, I already saw that...

)
do you prefer to bloat your program and multiply its size by 10 ? Why don't you want to use the standard text editor to edit a text ?
Because it's a crappy interface for configuration. That's what the dialog ROM_CALLs are for. You design a static dialog and just call a single ROM_CALL to display it.
IMHO, the private stuff should be in a separate file.
But even private sections can be done with binary config files without any requirement for parsing.
if you reimplement the same system without the text _tag at the end ....
No, not at all!
I'm thinking of something like:
struct configfile {
struct common {
int foo;
unsigned offsettostringbar;
...
char reserved[12];
};
char private[NUM_PROGS][24];
char stringdata[];
}
And in each program, you have something like:
#define PROGID 10
struct privatedata {
int privatefoo, privatebar;
...
}
#define getprivate(cf) ((privatedata*)((cf)->private[PROGID]))
#define getstring(cf,offset) ((char*)(cf)+(offset))
As I said,
no parsing!
Sasume
:
Kevin Kofler
:
That's one reason why I dislike your library so much: it encourages laziness
When I started to program on TI-68k, I wanted to do all the stuff by myself, but my projects where too long to write. Libraries are very useful to reduce time coding.
That's not the point! It doesn't encourage laziness because it is a library, it encourages laziness because it encourages relying on hand-edited config files instead of providing a GUI for configuration.