alsa-lib-1.0.27.2/snd_config_search_definition()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#x638428a]
#backlinks
*説明 [#t3ed43b8]
-パス: [[alsa-lib-1.0.27.2/src/conf.c]]
-FIXME: これは何?
--説明
**引数 [#cfd9445b]
-snd_config_t *config
--
--[[alsa-lib-1.0.27.2/snd_config_t]]
-const char *base
--
-const char *name
--
-snd_config_t **result
--
**返り値 [#b747c16e]
-int
--
**参考 [#a6917e35]
*実装 [#i569d7c4]
/**
* \brief Searches for a definition in a configuration t...
* aliases and expanding hooks and arguments.
* \param[in] config Handle to the configuration (sub)tr...
* \param[in] base Implicit key base, or \c NULL for none.
* \param[in] name Key suffix, optionally with arguments.
* \param[out] result The function puts the handle to th...
* node at the address specified by \...
* \return A non-negative value if successful, otherwise...
*
* This functions searches for a child node of \a config...
* aliases and expanding hooks, like #snd_config_search_...
*
* If \a name contains a colon (:), the rest of the stri...
* colon contains arguments that are expanded as with
* #snd_config_expand.
*
* In any case, \a result is a new node that must be fre...
* caller.
*
* \par Errors:
* <dl>
* <dt>-ENOENT<dd>An id in \a key or an alias id does no...
* <dt>-ENOENT<dd>\a config or one of its child nodes to...
* not a compound node.
* </dl>
* Additionally, any errors encountered when parsing the...
* definitions or arguments, or returned by (hook) funct...
*/
int snd_config_search_definition(snd_config_t *config,
const char *base, const char *name,
snd_config_t **result)
{
snd_config_t *conf;
char *key;
const char *args = strchr(name, ':');
int err;
if (args) {
args++;
key = alloca(args - name);
memcpy(key, name, args - name - 1);
key[args - name - 1] = '\0';
} else {
key = (char *) name;
}
/*
* if key contains dot (.), the implicit base is ignored
* and the key starts from root given by the 'config' ...
*/
snd_config_lock();
-
--[[alsa-lib-1.0.27.2/snd_config_lock()]]
err = snd_config_search_alias_hooks(config, strchr(key,...
if (err < 0) {
snd_config_unlock();
return err;
}
-
--[[alsa-lib-1.0.27.2/snd_config_search_alias_hooks()]]
-
--[[alsa-lib-1.0.27.2/snd_config_unlock()]]
err = snd_config_expand(conf, config, args, NULL, resul...
snd_config_unlock();
return err;
-
--[[alsa-lib-1.0.27.2/snd_config_expand()]]
}
*コメント [#q47eef54]
終了行:
*参照元 [#x638428a]
#backlinks
*説明 [#t3ed43b8]
-パス: [[alsa-lib-1.0.27.2/src/conf.c]]
-FIXME: これは何?
--説明
**引数 [#cfd9445b]
-snd_config_t *config
--
--[[alsa-lib-1.0.27.2/snd_config_t]]
-const char *base
--
-const char *name
--
-snd_config_t **result
--
**返り値 [#b747c16e]
-int
--
**参考 [#a6917e35]
*実装 [#i569d7c4]
/**
* \brief Searches for a definition in a configuration t...
* aliases and expanding hooks and arguments.
* \param[in] config Handle to the configuration (sub)tr...
* \param[in] base Implicit key base, or \c NULL for none.
* \param[in] name Key suffix, optionally with arguments.
* \param[out] result The function puts the handle to th...
* node at the address specified by \...
* \return A non-negative value if successful, otherwise...
*
* This functions searches for a child node of \a config...
* aliases and expanding hooks, like #snd_config_search_...
*
* If \a name contains a colon (:), the rest of the stri...
* colon contains arguments that are expanded as with
* #snd_config_expand.
*
* In any case, \a result is a new node that must be fre...
* caller.
*
* \par Errors:
* <dl>
* <dt>-ENOENT<dd>An id in \a key or an alias id does no...
* <dt>-ENOENT<dd>\a config or one of its child nodes to...
* not a compound node.
* </dl>
* Additionally, any errors encountered when parsing the...
* definitions or arguments, or returned by (hook) funct...
*/
int snd_config_search_definition(snd_config_t *config,
const char *base, const char *name,
snd_config_t **result)
{
snd_config_t *conf;
char *key;
const char *args = strchr(name, ':');
int err;
if (args) {
args++;
key = alloca(args - name);
memcpy(key, name, args - name - 1);
key[args - name - 1] = '\0';
} else {
key = (char *) name;
}
/*
* if key contains dot (.), the implicit base is ignored
* and the key starts from root given by the 'config' ...
*/
snd_config_lock();
-
--[[alsa-lib-1.0.27.2/snd_config_lock()]]
err = snd_config_search_alias_hooks(config, strchr(key,...
if (err < 0) {
snd_config_unlock();
return err;
}
-
--[[alsa-lib-1.0.27.2/snd_config_search_alias_hooks()]]
-
--[[alsa-lib-1.0.27.2/snd_config_unlock()]]
err = snd_config_expand(conf, config, args, NULL, resul...
snd_config_unlock();
return err;
-
--[[alsa-lib-1.0.27.2/snd_config_expand()]]
}
*コメント [#q47eef54]
ページ名: