-   Programming (
-   -   Newbie: How to read/write conf/ini files? (

neo_in_matrix 02-22-2005 08:43 AM

Newbie: How to read/write conf/ini files?
Are there any system level functions (I do not want 3rd party libraries) to read conf/ini files? Thanks.

jtshaw 02-22-2005 08:54 AM

In C? Besides the normal File I/O functions I don't believe so. I'm pretty sure you'll just have to read in the files and write your own parser. Lex and Yacc can help you do that if it is your goal.

jschiwal 02-22-2005 06:26 PM

If you install the source code of an application that reads the configuration file, it will probably contain the Lex source files.

There are different types of configuration files. Some use the Windows 3.0 'inf' style. Others are actually mini-languages. The book "The Art of Unix Programming" by Eric Steven Raymond has a chapter dedicated to configuration files.

The book is now available on the web:

All times are GMT -5. The time now is 10:07 AM.