DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   C (http://www.daniweb.com/forums/forum118.html)
-   -   Config File (http://www.daniweb.com/forums/thread89449.html)

ssharish2005 Sep 12th, 2007 10:39 pm
Config File
 
Just wondering, if anyone has got a library or good link to parse a config file. If not is there any effcient way of hanlding config file, where the config is just normal text file. Its not XML file or anything.

ssharish

Ancient Dragon Sep 12th, 2007 10:49 pm
Re: Config File
 
win32 api has functions to parse them. Don't know about *nix.

Also, see this article

ssharish2005 Sep 12th, 2007 10:51 pm
Re: Config File
 
Thanks Ancient Dragon for your quick reply. But unfortunatly I am on *nix environment. So looking for a lib which can support unix config file :( I Should have mentioned that.

Or is there any better way that we can parse, rather than going all the down throught the file and finding out the tag?

ssharish

Ancient Dragon Sep 12th, 2007 11:11 pm
Re: Config File
 
The link I posted is portable for both windows and *nix, but it was written in C++, not C. I have not read it closely but you might get ideas from that code.

ssharish2005 Sep 14th, 2007 6:56 am
Re: Config File
 
Quote:

Originally Posted by Ancient Dragon (Post 433259)
The link I posted is portable for both windows and *nix, but it was written in C++, not C. I have not read it closely but you might get ideas from that code.



Ohhh Thanks a lot Ancient D

ssharish


All times are GMT -4. The time now is 3:32 am.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC