User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C section within the Software Development category of DaniWeb, a massive community of 374,029 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,870 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C advertiser:
Views: 506 | Replies: 4
Reply
Join Date: Dec 2006
Posts: 192
Reputation: ssharish2005 is on a distinguished road 
Rep Power: 2
Solved Threads: 13
ssharish2005 ssharish2005 is offline Offline
Junior Poster

Config File

  #1  
Sep 12th, 2007
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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 10,182
Reputation: Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of 
Rep Power: 34
Solved Threads: 822
Moderator
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Most Valuable Poster

Re: Config File

  #2  
Sep 12th, 2007
win32 api has functions to parse them. Don't know about *nix.

Also, see this article
Last edited by Ancient Dragon : Sep 12th, 2007 at 10:51 pm.
'Politics' is made up of two words, 'poli,' which is Greek for 'many,' and 'tics,' which are blood-sucking insects.
- Gore Vidal
Being ignorant is not so much a shame as being unwilling to learn. - Benjamin Franklin
Reply With Quote  
Join Date: Dec 2006
Posts: 192
Reputation: ssharish2005 is on a distinguished road 
Rep Power: 2
Solved Threads: 13
ssharish2005 ssharish2005 is offline Offline
Junior Poster

Re: Config File

  #3  
Sep 12th, 2007
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
Reply With Quote  
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 10,182
Reputation: Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of 
Rep Power: 34
Solved Threads: 822
Moderator
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Most Valuable Poster

Re: Config File

  #4  
Sep 12th, 2007
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.
'Politics' is made up of two words, 'poli,' which is Greek for 'many,' and 'tics,' which are blood-sucking insects.
- Gore Vidal
Being ignorant is not so much a shame as being unwilling to learn. - Benjamin Franklin
Reply With Quote  
Join Date: Dec 2006
Posts: 192
Reputation: ssharish2005 is on a distinguished road 
Rep Power: 2
Solved Threads: 13
ssharish2005 ssharish2005 is offline Offline
Junior Poster

Re: Config File

  #5  
Sep 14th, 2007
Originally Posted by Ancient Dragon View Post
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
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb C Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the C Forum

All times are GMT -4. The time now is 11:37 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC