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

Recommended Answers

All 4 Replies

win32 api has functions to parse them. Don't know about *nix.

Also, see this article

commented: Ancient Dragon is a dishonest person who participated in a serious violation again a person here +0

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

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.

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.