* UCW Library -- Configuration files
*
* (c) 2001--2006 Robert Spalek <robert@ucw.cz>
- * (c) 2003--2012 Martin Mares <mj@ucw.cz>
+ * (c) 2003--2014 Martin Mares <mj@ucw.cz>
*
* This software may be freely distributed and used according to the terms
* of the GNU Lesser General Public License.
#define _UCW_CONF_H
#include <ucw/clists.h>
+#include <ucw/gary.h>
#ifdef CONFIG_UCW_CLEAN_ABI
#define cf_close_group ucw_cf_close_group
* All configuration settings made within the context are rolled back
* (except when journalling is turned off). All memory allocated on behalf
* of the context is freed, which includes memory obtained by calls to
- * cf_malloc().
+ * @cf_malloc().
**/
void cf_delete_context(struct cf_context *cc);
/**
* Reload configuration from @file, replace the old one.
* If @file is NULL, reload all loaded configuration files and re-apply
- * bits of configuration passed to cf_set().
+ * bits of configuration passed to @cf_set().
* Returns a non-zero value upon error. In that case, all configuration
* settings are rolled back to the state before calling this function.
**/
void cf_open_group(void);
/**
- * Close a group opened by cf_open_group(). Returns a non-zero value upon error,
+ * Close a group opened by @cf_open_group(). Returns a non-zero value upon error,
* which usually means that a commit hook has failed.
**/
int cf_close_group(void);
**/
#define CF_ANY_NUM -0x7fffffff
-#define DARY_LEN(a) ((uns*)a)[-1] /** Length of an dynamic array. **/
-#define DARY_ALLOC(type,len,val...) ((struct { byte pad[ALIGN_TO(sizeof(uns), CPU_STRUCT_ALIGN) - sizeof(uns)]; uns l; type a[len]; }) { .l = len, .a = { val } }).a
- // creates a static instance of a dynamic array
+#define DARY_LEN(a) GARY_SIZE(a) /** Length of an dynamic array. An alias for `GARY_SIZE`. **/
/***
* [[alloc]]