@top_srcdir@/src/input.c \
@top_srcdir@/src/output.c \
@top_srcdir@/src/conf.c \
+ @top_srcdir@/src/confeval.c \
@top_srcdir@/src/confmisc.c \
@top_srcdir@/src/names.c \
@top_srcdir@/src/shmarea.c \
#endif
/**
- * \defgroup Config Configuration Interface
+ * \defgroup Configuration Configuration Interface
* The configuration functions and types allow you to read, enumerate,
* modify and write the contents of ALSA configuration files.
* \{
const char *base, const char *key,
snd_config_t **result);
+/**
+ * \brief custom expansion callback
+ * \param[out] dst The function puts the handle to the new configuration
+ * node at the address specified by \a dst.
+ * \param[in] s string the string to be expanded
+ * \param[in] private_data Handle to the \c private_data node.
+ * \return A non-negative value if successful, otherwise a negative error code.
+ *
+ * Use a function of this type to define a custom expansion
+ */
typedef int (*snd_config_expand_fcn_t)(snd_config_t **dst, const char *s, void *private_data);
int snd_config_expand_custom(snd_config_t *config, snd_config_t *root,
#endif
/*
- * Add a diretory to the paths to search included files.
+ * Add a directory to the paths to search included files.
* param fd - File object that owns these paths to search files included by it.
* param dir - Path of the directory to add. Allocated externally and need to
* be freed manually later.
}
}
+#endif /* DOC_HIDDEN */
+
/**
* \brief Returns the default top-level config directory
* \return The top-level config directory path string
return topdir;
}
+#ifndef DOC_HIDDEN
+
static char *_snd_config_path(const char *name)
{
const char *root = snd_config_topdir();
}
return 0;
}
-#endif
+#endif /* DOC_HIDDEN */
/**
return 0;
}
+/**
+ * \brief Creates a string configuration node with the given initial value.
+ * \param[out] config The function puts the handle to the new node at
+ * the address specified by \a config.
+ * \param[in] id The id of the new node.
+ * \param[in] value The initial value of the new node. May be \c NULL.
+ * \return Zero if successful, otherwise a negative error code.
+ *
+ * This function creates a new node of type #SND_CONFIG_TYPE_STRING. The node
+ * contains with a copy of the string \c value, replacing any character other
+ * than alphanumeric, space, or '-' with the character '_'.
+ *
+ * \par Errors:
+ * <dl>
+ * <dt>-ENOMEM<dd>Out of memory.
+ * </dl>
+ *
+ * \par Conforming to:
+ * LSB 3.2
+ */
int snd_config_imake_safe_string(snd_config_t **config, const char *id, const char *value)
{
int err;
#define ALSA_CONFIG_PATH_VAR "ALSA_CONFIG_PATH"
/**
- * \ingroup Config
* \brief Configuration top-level node (the global configuration).
*
* This variable contains a handle to the top-level configuration node,
int snd_determine_driver(int card, char **driver);
#endif
-snd_config_t *_snd_config_hook_private_data(int card, const char *driver)
+static snd_config_t *_snd_config_hook_private_data(int card, const char *driver)
{
snd_config_t *private_data, *v;
int err;
}
#endif
+#ifndef DOC_HIDDEN
size_t page_size(void)
{
long s = sysconf(_SC_PAGE_SIZE);
*offset = object_offset;
return r;
}
+#endif /* DOC_HIDDEN */
#include <ctype.h>
#include <limits.h>
+#ifndef DOC_HIDDEN
typedef long long value_type_t;
+#endif /* DOC_HIDDEN */
static const char *_find_end_of_expression(const char *s, char begin, char end)
{
return err;
}
+#ifndef DOC_HIDDEN
int _snd_eval_string(snd_config_t **dst, const char *s,
snd_config_expand_fcn_t fcn, void *private_data)
{
else
return snd_config_imake_integer(dst, NULL, left);
}
+#endif /* DOC_HIDDEN */
/**
* \brief Evaluate an math expression in the string
* node at the address specified by \a dst.
* \param[in] s A string to evaluate
* \param[in] fcn A function to get the variable contents
- * \param[in] private_value A private value for the variable contents function
+ * \param[in] private_data A private value for the variable contents function
* \return 0 if successful, otherwise a negative error code.
*/
int snd_config_evaluate_string(snd_config_t **dst, const char *s,
}
#endif
-int _snd_func_private_data(snd_config_t **dst, snd_config_t *src,
+static int _snd_func_private_data(snd_config_t **dst, snd_config_t *src,
snd_config_t **private_data, const char *id)
{
int err;