Skip to content
  • Rob Swindell's avatar
    More support for !include in .ini files · 8fdbb169
    Rob Swindell authored
    Some (important) File methods did not support .ini files that used the !include directive because they were using the xpdev iniRead* API (which performs no "pre-processing") instead of xpdev iniGet*.
    
    Impacted methods:
    - iniGetValue()
    - iniGetKeys()
    - iniGetObject()
    
    The other existing ini* methods already worked fine with nested (!include'd) .ini files. It's possible there's a slight performance penalty with the new implementation since the entire .ini file is always read for each operation and previously it was possible that only a few "lines" were read to find the key(s) of interest. However, since .ini files are not typically huge and the iniRead/file-stream method likely read large (e.g. 8-32K) blocks anyway (which is usually the entire .ini file) - I don't actually suspect any observable impact to performance.
    
    This change was needed for the new ctrl/modopts.d support.
    
    Added new method useful for debugging nested .ini files:
    - iniReadAll()
    8fdbb169