[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Confuse-devel] libConfuse issues and questions

From: James Haley
Subject: [Confuse-devel] libConfuse issues and questions
Date: Tue, 08 Jul 2003 02:03:16 -0500


I have applied libConfuse to the parsing of some game data files for my DOOM source modification project, and I have been largely pleased with the results. During my work
customizing the library for use with my program, I found a couple of issues:

1. It appears that even in v2.0, include files are not closed after the lexer has finished
with them.

2. Amendments made to the function call parsing code in v2.0 deleted the code which frees the "funcopt" option variable. The result is that parameters begin to cascade to any subsequent function calls, causing those functions to throw an error. I easily fixed this by adding back a call to cfg_free_value in both states 8 and 9 of the main parsing

Now, I have a question. The code I am using is actually a hybrid of v1.2.3 and v2.0, with almost all of the changes introduced in v2.0 except for list defaults, string parsing, and section overwriting. The latter is what I'd like to know about. I'm not entirely certain which code changes are necessary to implement this, and I also have a question about the code in cfg_setopt. It appears to me that the new section is set to use an already allocated section's values, but then these values are overwritten without the original values being freed. Just from looking at it, it looks like a potentially large memory leak.

Please let me know how I can adjust the code to allow for section overwriting, and if
there is indeed any problem with the code as it is in v2.0.  Thanks!

James Haley
Moderator, Team Eternity

The new MSN 8: advanced junk mail protection and 2 months FREE*

reply via email to

[Prev in Thread] Current Thread [Next in Thread]