]> git.alsa-project.org Git - alsa-lib.git/commitdiff
doxygen: conf: silence 'not documented' warnings
authorborine <32966433+borine@users.noreply.github.com>
Sun, 30 Jul 2023 08:48:53 +0000 (09:48 +0100)
committerJaroslav Kysela <perex@perex.cz>
Fri, 1 Sep 2023 14:11:43 +0000 (16:11 +0200)
From: borine@github
Link: https://github.com/alsa-project/alsa-lib/pull/340
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
doc/doxygen.cfg.in
include/conf.h
src/conf.c
src/confeval.c
src/confmisc.c

index 1a5dbf56e17e7c254402fb8433bc67666914fb89..5333f6da97573e8208b62561d2f1607920f050bd 100644 (file)
@@ -36,6 +36,7 @@ INPUT            = @top_srcdir@/doc/index.doxygen \
                   @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 \
index 800707d9c182e20a20f5533149e0adf54f4519f5..09da0e9aa37a86d254dafbc165546d24695c48ae 100644 (file)
@@ -33,7 +33,7 @@ extern "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.
  *  \{
@@ -109,6 +109,16 @@ int snd_config_search_definition(snd_config_t *config,
                                 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,
index 9887d0e92c318429d20d105077734be988cd44cf..eca44c03f117107af38bf2c55f969423ff8fe0ba 100644 (file)
@@ -527,7 +527,7 @@ static inline void snd_config_unlock(void) { }
 #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.
@@ -584,6 +584,8 @@ static void free_include_paths(struct filedesc *fd)
        }
 }
 
+#endif /* DOC_HIDDEN */
+
 /**
  * \brief Returns the default top-level config directory
  * \return The top-level config directory path string
@@ -605,6 +607,8 @@ const char *snd_config_topdir(void)
        return topdir;
 }
 
+#ifndef DOC_HIDDEN
+
 static char *_snd_config_path(const char *name)
 {
        const char *root = snd_config_topdir();
@@ -1700,7 +1704,7 @@ static int _snd_config_save_children(snd_config_t *config, snd_output_t *out,
        }
        return 0;
 }
-#endif
+#endif /* DOC_HIDDEN */
 
 
 /**
@@ -2873,6 +2877,26 @@ int snd_config_imake_string(snd_config_t **config, const char *id, const char *v
        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;
@@ -3894,7 +3918,6 @@ int snd_config_search_alias_hooks(snd_config_t *config,
 #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,
@@ -4295,7 +4318,7 @@ SND_DLSYM_BUILD_VERSION(snd_config_hook_load, SND_CONFIG_DLSYM_VERSION_HOOK);
 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;
@@ -5810,6 +5833,7 @@ static void _snd_config_end(void)
 }
 #endif
 
+#ifndef DOC_HIDDEN
 size_t page_size(void)
 {
        long s = sysconf(_SC_PAGE_SIZE);
@@ -5845,3 +5869,4 @@ size_t page_ptr(size_t object_offset, size_t object_size, size_t *offset, size_t
        *offset = object_offset;
        return r;
 }
+#endif /* DOC_HIDDEN */
index a27ee1d139c978d7e4e4c34db07b4316fd1fff47..56b6ebecb807eb08de9807b3af5e82842c033f78 100644 (file)
@@ -38,7 +38,9 @@
 #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)
 {
@@ -119,6 +121,7 @@ static int _to_integer(value_type_t *val, snd_config_t *c)
        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)
 {
@@ -244,6 +247,7 @@ int _snd_eval_string(snd_config_t **dst, const char *s,
        else
                return snd_config_imake_integer(dst, NULL, left);
 }
+#endif /* DOC_HIDDEN */
 
 /**
  * \brief Evaluate an math expression in the string
@@ -251,7 +255,7 @@ int _snd_eval_string(snd_config_t **dst, const char *s,
  *                 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,
index b55d86f754b4632d51e9383f3d54e784df878ca7..0559fb66b508283476890d27a133b95037832648 100644 (file)
@@ -645,7 +645,7 @@ static int string_from_integer(char **dst, long v)
 }
 #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;