dmd.dinifile
Parses compiler settings from a .ini file.
License
Source: dinifile.d
Documentation: https://dlang.org/phobos/dmd_dinifile.html
-
Declaration
const(char)[]findConfFile(const(char)[]argv0, const(char)[]inifile);Find the config file
Parameters
const(char)[]argv0program name (argv[0])
const(char)[]inifile.ini file name
Return Value
file path of the config file or NULL
Note: this is a memory leak
-
Declaration
const(char)*readFromEnv(const ref StringTable!(char*)environment, const(char)*name);Read from
environment, looking for cached value first.Parameters
StringTable!(char*)environmentcached copy of the
environmentconst(char)*namenameto look forReturn Value
environmentvalue corresponding toname -
Declaration
voidupdateRealEnvironment(ref StringTable!(char*)environment);Update real
environmentwith our copy.Parameters
StringTable!(char*)environmentour copy of the
environment -
Declaration
voidparseConfFile(ref StringTable!(char*)environment, const(char)[]filename, const(char)[]path, const(ubyte)[]buffer, const(Strings)*sections);Read and analyze .ini file. Write the entries into
environmentas well as any entries in one of the specified section(s).Parameters
StringTable!(char*)environmentour own cache of the program
environmentconst(char)[]filenamename of the file being parsed
const(char)[]pathwhat @P will expand to
const(ubyte)[]buffercontents of configuration file
const(Strings)*sectionssection names