C managing configuration

I need to keep some data in configuration files to initialize it at the start of my program and to save some in between its runs. As I understand it the convention is to keep such data in files with the .config extension. There must be some standard API for reading from and changing data in such files. I would appreciate it if someone pointed me into the right direction.
 
maybe in some desktop env stuff but traditional unix had an /etc/argv[0].rc maybe and .argv[0]rc and the api was something like fputs and fgets
 
configuration files to initialize it at the start of my program
/usr/local/etc/myapp.conf
and to save some in between its runs.
/tmp/myapp/
/var/tmp/myapp/
/var/run/myapp/
/var/db/myapp/
/var/cache/myapp/
Depending on the type of data.

As I understand it the convention is to keep such data in files with the .config extension.
Unix never used or cared about file extensions. They are for a user's convenience, not the computer's. It really doesn't care what you name it. This whole idea of extensions is a product from the CP/M MS-DOS era (and everything that's been based on that).

There must be some standard API for reading from and changing data in such files.
Everything is a file. That's the standard API.
 
Back
Top