[lug] OT: C Programming Question

Sexton, George gsexton at mhsoftware.com
Sat Dec 15 10:45:10 MST 2001


I just whacked one together.

For comfort reasons, I wanted to make it emulate the Windows
GetPrivateProfileString() function and it would be a little much to expect
someone to write such a thing for me.

-----Original Message-----
From: lug-admin at lug.boulder.co.us [mailto:lug-admin at lug.boulder.co.us]On
Behalf Of D. Stimits
Sent: 14 December, 2001 11:18 PM
To: lug at lug.boulder.co.us
Subject: Re: [lug] OT: C Programming Question


"Sexton, George" wrote:
>
> Are there any standard C library routines to read name value pairs from a
> text file using C?
>
> I.E.
>
> INTERFACE="eth0"
>
> comparable to the INI File functions in Windows?
>
> George Sexton
> MH Software, Inc.
> Voice: 303 438 9585
> http://www.mhsoftware.com
>
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug

I'd vote for getline and strtok. But if you could use C++, I might be
able to adapt a mini-state-machine I created as a configurable reader of
key/value pairs for a game. Let me know if you are interested.

D. Stimits, stimits at idcomm.com
_______________________________________________
Web Page:  http://lug.boulder.co.us
Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug




More information about the LUG mailing list