W3cubDocs

/D

ddmd.dinifile

Compiler implementation of the D programming language.

Authors:
Walter Bright
License:
Boost License 1.0
Source:
dinifile.d
const(char)* findConfFile(const(char)* argv0, const(char)* inifile)

Find the config file

Parameters:
const(char)* argv0 program name (argv[0])
const(char)* inifile .ini file name
Returns:
file path of the config file or NULL
Note:
this is a memory leak
const(char)* readFromEnv(StringTable* environment, const(char)* name)

Read from environment, looking for cached value first.

Parameters:
StringTable* environment cached copy of the environment
const(char)* name name to look for
Returns:
environment value corresponding to name
void updateRealEnvironment(StringTable* environment)

Update real environment with our copy.

Parameters:
StringTable* environment our copy of the environment
void parseConfFile(StringTable* environment, const(char)* filename, const(char)* path, size_t length, ubyte* buffer, Strings* sections)

Read and analyze .ini file. Write the entries into environment as well as any entries in one of the specified section(s).

Parameters:
StringTable* environment our own cache of the program environment
const(char)* filename name of the file being parsed
const(char)* path what @P will expand to buffer[len] = contents of configuration file sections[] = section names

© 1999–2017 The D Language Foundation
Licensed under the Boost License 1.0.
https://dlang.org/phobos/ddmd_dinifile.html