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 402,522 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,598 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: Programming Forums
Views: 539 | Replies: 4
Reply
Join Date: Dec 2006
Posts: 207
Reputation: ssharish2005 is on a distinguished road 
Rep Power: 2
Solved Threads: 14
ssharish2005 ssharish2005 is offline Offline
Posting Whiz in Training

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,703
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: 36
Solved Threads: 878
Moderator
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is online now Online
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.
I think it's about time we voted for senators with breasts. After all, we've been voting for boobs long enough. ~Clarie Sargent, Arizona senatorial candidate
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
Reply With Quote  
Join Date: Dec 2006
Posts: 207
Reputation: ssharish2005 is on a distinguished road 
Rep Power: 2
Solved Threads: 14
ssharish2005 ssharish2005 is offline Offline
Posting Whiz in Training

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,703
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: 36
Solved Threads: 878
Moderator
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is online now Online
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.
I think it's about time we voted for senators with breasts. After all, we've been voting for boobs long enough. ~Clarie Sargent, Arizona senatorial candidate
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
Reply With Quote  
Join Date: Dec 2006
Posts: 207
Reputation: ssharish2005 is on a distinguished road 
Rep Power: 2
Solved Threads: 14
ssharish2005 ssharish2005 is offline Offline
Posting Whiz in Training

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.

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

 

Thread Tools Display Modes

Similar Threads
Other Threads in the C Forum

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