Function gnunet_sys::GNUNET_CONFIGURATION_expand_dollar[][src]

pub unsafe extern "C" fn GNUNET_CONFIGURATION_expand_dollar(
    cfg: *const GNUNET_CONFIGURATION_Handle,
    orig: *mut c_char
) -> *mut c_char

Expand an expression of the form “$FOO/BAR” to “DIRECTORY/BAR” where either in the “PATHS” section or the environment “FOO” is set to “DIRECTORY”. We also support default expansion, i.e. ${VARIABLE:-default} will expand to $VARIABLE if VARIABLE is set in PATHS or the environment, and otherwise to “default”. Note that “default” itself can also be a $-expression, thus “${VAR1:-{$VAR2}}” will expand to VAR1 and if that is not defined to VAR2.

@param cfg configuration to use for path expansion @param orig string to $-expand (will be freed!) Note that multiple $-expressions can be present in this string. They will all be $-expanded. @return $-expanded string