diff options
author | Chris Robinson <[email protected]> | 2011-09-19 11:29:18 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-09-19 11:29:18 -0700 |
commit | edb386eb1edaed1661089064bab57c8d39c52a15 (patch) | |
tree | b0551187a3003a117e591ff87d459ee95eb3be4c /Alc/alcConfig.c | |
parent | cc3dd648ace1f1276e909dcb07adf782a39f1cf3 (diff) |
Add a ConfigValueStr function, to return the string through a parameter
Diffstat (limited to 'Alc/alcConfig.c')
-rw-r--r-- | Alc/alcConfig.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Alc/alcConfig.c b/Alc/alcConfig.c index 60fb733a..0024b948 100644 --- a/Alc/alcConfig.c +++ b/Alc/alcConfig.c @@ -313,6 +313,15 @@ int ConfigValueExists(const char *blockName, const char *keyName) return !!val[0]; } +int ConfigValueStr(const char *blockName, const char *keyName, const char **ret) +{ + const char *val = GetConfigValue(blockName, keyName, ""); + if(!val[0]) return 0; + + *ret = val; + return 1; +} + int ConfigValueInt(const char *blockName, const char *keyName, int *ret) { const char *val = GetConfigValue(blockName, keyName, ""); |