July 1st, 2003, 02:02 AM
Join Date: Oct 2002
Location: in the perfect world
I do this for my comercial apps....
Use special characters to find what the settings are. Assemble the data to a structure.
[ and ] for group headings start and end
= for the break between a value and a its identifier
[EOF]//marks end of file
strstr() will help.
Find the file size,
alloc mem for the file,
read whole file,
set char pointer to begining of buffer,
read config file settings to struct,
free file buffer memory
The essence of Christianity is told us in the Garden of Eden history. The fruit that was forbidden was on the Tree of Knowledge. The subtext is, All the suffering you have is because you wanted to find out what was going on. You could be in the Garden of Eden if you had just kept your f***ing mouth shut and hadn't asked any questions.