Lines Matching refs:dst
993 char *dst = malloc(s->idx + 1);
994 if (dst) {
995 memcpy(dst, s->buf, s->idx);
996 dst[s->idx] = '\0';
998 return dst;
1712 * \param dst Handle to the destination node.
1713 * \param src Handle to the source node. Must not be the same as \a dst.
1730 int snd_config_substitute(snd_config_t *dst, snd_config_t *src)
1732 assert(dst && src);
1733 if (dst->type == SND_CONFIG_TYPE_COMPOUND) {
1734 int err = snd_config_delete_compound_members(dst);
1738 if (dst->type == SND_CONFIG_TYPE_COMPOUND &&
1743 n->parent = dst;
1745 src->u.compound.fields.next->prev = &dst->u.compound.fields;
1746 src->u.compound.fields.prev->next = &dst->u.compound.fields;
1748 free(dst->id);
1749 if (dst->type == SND_CONFIG_TYPE_STRING)
1750 free(dst->u.string);
1751 dst->id = src->id;
1752 dst->type = src->type;
1753 dst->u = src->u;
2079 snd_config_t *dst;
2088 err = snd_config_top(&dst);
2093 err = snd_config_load(dst, input);
2096 snd_config_delete(dst);
2099 *config = dst;
2241 * append all src items to the end of dst arrray
2243 static int _snd_config_array_merge(snd_config_t *dst, snd_config_t *src, int index)
2258 sn->parent = dst;
2259 list_add_tail(&sn->list, &dst->u.compound.fields);
2267 * \param[out] dst Config handle for the merged contents
2268 * \param[in] src Config handle to merge into dst (may be NULL)
2273 * When the \a override flag is set, the related subtree in \a dst is replaced from \a src.
2290 int snd_config_merge(snd_config_t *dst, snd_config_t *src, int override)
2296 assert(dst);
2299 if (dst->type != SND_CONFIG_TYPE_COMPOUND || src->type != SND_CONFIG_TYPE_COMPOUND)
2300 return snd_config_substitute(dst, src);
2301 array = snd_config_is_array(dst);
2303 return _snd_config_array_merge(dst, src, array);
2307 snd_config_for_each(di, dnext, dst) {
2327 /* move config from src to dst */
2329 sn->parent = dst;
2330 list_add_tail(&sn->list, &dst->u.compound.fields);
3967 int (*func)(snd_config_t *root, snd_config_t *config, snd_config_t **dst, snd_config_t *private_data) = NULL;
4252 * \param[out] dst The function puts the handle to the configuration
4254 * by \a dst.
4260 int snd_config_hook_load(snd_config_t *root, snd_config_t *config, snd_config_t **dst, snd_config_t *private_data)
4266 assert(root && dst);
4307 *dst = NULL;
4395 * \param[out] dst The function puts the handle to the configuration
4397 * by \a dst.
4405 int snd_config_hook_load_for_all_cards(snd_config_t *root, snd_config_t *config, snd_config_t **dst, snd_config_t *private_data ATTRIBUTE_UNUSED)
4477 *dst = NULL;
4882 snd_config_t **dst,
4890 snd_config_t **dst,
4900 err = callback(src, root, dst, SND_CONFIG_WALK_PASS_PRE, fcn, private_data);
4907 err = snd_config_walk(s, root, (dst && *dst) ? &d : NULL,
4912 err = snd_config_add(*dst, d);
4917 err = callback(src, root, dst, SND_CONFIG_WALK_PASS_POST, fcn, private_data);
4920 if (dst && *dst)
4921 snd_config_delete(*dst);
4925 err = callback(src, root, dst, SND_CONFIG_WALK_PASS_LEAF, fcn, private_data);
4933 snd_config_t **dst,
4943 err = snd_config_make_compound(dst, id, src->u.compound.join);
4948 err = snd_config_make(dst, id, type);
4957 snd_config_set_integer(*dst, v);
4965 snd_config_set_integer64(*dst, v);
4973 snd_config_set_real(*dst, v);
4981 err = snd_config_set_string(*dst, s);
4998 * \param[out] dst The function puts the handle to the new configuration
4999 * node at the address specified by \a dst.
5014 int snd_config_copy(snd_config_t **dst,
5017 return snd_config_walk(src, NULL, dst, _snd_config_copy, NULL, NULL);
5020 static int _snd_config_expand_vars(snd_config_t **dst, const char *s, void *private_data)
5024 *dst = NULL;
5027 return snd_config_copy(dst, val);
5032 snd_config_t **dst,
5045 err = snd_config_make_compound(dst, id, src->u.compound.join);
5057 err = snd_config_imake_integer(dst, id, v);
5067 err = snd_config_imake_integer64(dst, id, v);
5077 err = snd_config_imake_real(dst, id, v);
5088 err = snd_config_evaluate_string(dst, s, fcn, vars);
5091 if (*dst == NULL)
5093 err = snd_config_set_id(*dst, id);
5095 snd_config_delete(*dst);
5099 err = snd_config_imake_string(dst, id, s);
5117 snd_config_t **dst ATTRIBUTE_UNUSED,
5127 int (*func)(snd_config_t **dst, snd_config_t *root,