UFO: Alien Invasion Issue Tracker
Please log in to bookmark issues
OPEN  Feature request #4110  -  sorted config.cfg
Posted Dec 24, 2012 - updated Feb 04, 2013
mattn (tlh2000) has been working on this issue since January 28, 2013 (20:49)
Issue details
  • Type of issue
    Feature request
  • Status
  • Assigned to
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
  • Posted by
  • Owned by
    Not owned by anyone
  • Category
  • Priority
    1. Very low
  • Targetted for
    icon_milestones.png Not determined
  • Complexity
    icon_customdatatype.png Simple
Issue description
Item 626 imported from sourceforge.net tracker on 2013-01-28 20:23:02

I was trying to compare two config.cfg files recently and found that the order of the cvars changes with every save. ==> no way to easily compare ==> bad for bug hunting.

I tried to change that myself and found the code where the cvars are written, but no place where they're loaded from file (I'd suggest to do the sorting at load time).
Comments Ported from Sourceforge  ⇑ top
natewr (2013-01-22 15:14:14.475000)  ⇑ top
- **status**: open --> accepted - **priority**: 1 --> 3
aduke1 (2013-01-28 03:18:16.329000)  ⇑ top
This can be karked as an "easy contribution" as Nate suggested.

thl2000 also suggested to do it at *save time*. The function Cvar_WriteVariables() in cvar.cpp is the place, A possible Approach would be to abuse the hash_next ptr in cvar_t (which is no longer needed at that point in time) to create a sorted list and then print that.