From 886df670ca5c391ffeb468dd2f30f02a81d257e6 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Wed, 29 Jan 2014 00:40:15 +0100 Subject: [PATCH] Doc: Fixed function references --- ucw/alloc.h | 4 ++-- ucw/clists.h | 4 ++-- ucw/conf.h | 6 +++--- ucw/daemon.h | 2 +- ucw/doc/conf.txt | 2 +- ucw/doc/daemon.txt | 2 +- ucw/doc/hashtable.txt | 6 +++--- ucw/doc/relnotes.txt | 21 +++++++++------------ ucw/fastbuf.h | 6 +++--- ucw/gary.h | 2 +- ucw/log.h | 4 ++-- ucw/mempool.h | 4 ++-- ucw/opt.h | 2 +- 13 files changed, 31 insertions(+), 34 deletions(-) diff --git a/ucw/alloc.h b/ucw/alloc.h index 2c599283..668c707c 100644 --- a/ucw/alloc.h +++ b/ucw/alloc.h @@ -21,14 +21,14 @@ struct ucw_allocator { /** * [[std]] - * This allocator uses xmalloc(), xrealloc() and xfree(). The memory + * This allocator uses <>, <> and <>. The memory * it allocates is left unitialized. **/ extern struct ucw_allocator ucw_allocator_std; /** * [[zeroing]] - * This allocator uses xmalloc(), xrealloc() and xfree(). All memory + * This allocator uses <>, <> and <>. All memory * is zeroed upon allocation. **/ extern struct ucw_allocator ucw_allocator_zeroed; diff --git a/ucw/clists.h b/ucw/clists.h index 7148ff1f..2f8487ae 100644 --- a/ucw/clists.h +++ b/ucw/clists.h @@ -249,8 +249,8 @@ static inline void *clist_unlink_tail(clist *l) * previous and next pointers equal to NULL. Returns 0 or 1. * * Nodes initialized to all zeroes are unlinked, inserting a node anywhere in a list - * makes it linked. Normal removal functions like clist_remove() do not mark nodes - * as unlinked, you need to call clist_unlink() instead. + * makes it linked. Normal removal functions like @clist_remove() do not mark nodes + * as unlinked, you need to call @clist_unlink() instead. **/ static inline int clist_is_linked(cnode *n) { diff --git a/ucw/conf.h b/ucw/conf.h index 29808510..d661f48e 100644 --- a/ucw/conf.h +++ b/ucw/conf.h @@ -72,7 +72,7 @@ struct cf_context *cf_new_context(void); * 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); @@ -100,7 +100,7 @@ int cf_load(const char *file); /** * 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. **/ @@ -127,7 +127,7 @@ int cf_set(const char *string); 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); diff --git a/ucw/daemon.h b/ucw/daemon.h index 7813f6dc..d7b1a22a 100644 --- a/ucw/daemon.h +++ b/ucw/daemon.h @@ -65,7 +65,7 @@ void daemon_exit(struct daemon_params *dp); #define DAEMON_ERR_LEN 256 -/** Parameters passed to daemon_control() **/ +/** Parameters passed to @daemon_control() **/ struct daemon_control_params { const char *pid_file; // A path to PID file const char *guard_file; // A path to guard file diff --git a/ucw/doc/conf.txt b/ucw/doc/conf.txt index 695f78fe..44b67719 100644 --- a/ucw/doc/conf.txt +++ b/ucw/doc/conf.txt @@ -212,7 +212,7 @@ journal entries are removed and a new one, for the new configuration, is added. If it fails, the first one is replayed and the rollback entry is removed. -See <>. +See @cf_reload(). [[custom_parser]] Creating custom parsers diff --git a/ucw/doc/daemon.txt b/ucw/doc/daemon.txt index 6077e603..58d550f2 100644 --- a/ucw/doc/daemon.txt +++ b/ucw/doc/daemon.txt @@ -57,7 +57,7 @@ is recycled. Checking of process name and similar tricks do not avoid the proble since there can be multiple instances of the daemon running simultaneously. We therefore recommend the following daemon control protocol, which prevents all such -race conditions. Its implementation is available in form of the daemon_control() library +race conditions. Its implementation is available in form of the @daemon_control() library function or the `ucw-daemon-control` stand-alone utility. * There exist two files: diff --git a/ucw/doc/hashtable.txt b/ucw/doc/hashtable.txt index 1475db59..72a0f5e0 100644 --- a/ucw/doc/hashtable.txt +++ b/ucw/doc/hashtable.txt @@ -80,14 +80,14 @@ to customize the behaviour. The macros are: - `HASH_GIVE_ALLOC` -- you need to provide `void \*HASH_PREFIX(alloc)(uns size` and `void HASH_PREFIX(free)(void \*)` to allocate and deallocate the nodes. Default uses - <> and <>, <> and <>, <> or <>, depending on <>, <>, <> and <> switches. - <> -- you need to provide `void \*HASH_PREFIX(table_alloc)(uns size` and `void HASH_PREFIX(table_free)(void \*)` to allocate and deallocate the table itself. Default uses - <> and <> or the functions + <> and <> or the functions from `HASH_GIVE_ALLOC` depending on <> switch. [[params]] @@ -122,7 +122,7 @@ You can customize the hash table a little more by these macros: - `HASH_ZERO_FILL` -- initialize new nodes to all zeroes. [[table-alloc]] - `HASH_TABLE_ALLOC` -- allocate the table the same way as nodes. If - not provided, <> is used. + not provided, <> is used. - `HASH_TABLE_GROWING` -- never decrease the size of allocated table of nodes. [[table_dynamic]] - `HASH_TABLE_DYNAMIC` -- By default, only one global hash table is diff --git a/ucw/doc/relnotes.txt b/ucw/doc/relnotes.txt index f1020633..aba705f4 100644 --- a/ucw/doc/relnotes.txt +++ b/ucw/doc/relnotes.txt @@ -36,15 +36,12 @@ Release notes ** *Incompatible:* As there may be more instances, we can no longer use global variables to control the configuration system. In particular, `cf_need_journal` and `cf_pool` variables have been replaced by - functions <> and - <>. + functions <> and <>. ** *Incompatible:* Loading of configuration files has been decoupled from the getopt wrapper, so you might need to include `conf.h` for functions which were previously declared in `getopt.h`. ** New functions have been added: - <>, - <>, and - <>. + <>, <>, and <>. ** *Incompatible:* Dynamic configuration arrays have been re-implemented in terms of our generic <>. This makes them easier to use and most of the interface has been preserved. The only exception is @@ -80,18 +77,18 @@ Release notes However, the numerical values are equal, so old code should keep working. ** *Incompatible:* The main loop time (`main_now`) has been decoupled from wall clock time and moved to a field in the `main_context` structure. It can be accessed either directly - or via <>. The `main_now_seconds` variable has + or via <>. The `main_now_seconds` variable has been removed, `main_idle_time` has become a structure field. ** *Incompatible:* The interface for asynchronous reading and writing (file_read() and friends) has been separated from the core of the main loop. Use <> and related functions instead. -** *Incompatible:* file_close_all() is gone. You have to call <> - or <> to clean up properly after fork(). +** *Incompatible:* file_close_all() is gone. You have to call <> + or <> to clean up properly after fork(). ** Added support for <>. -** Added relative timers: <>. +** Added relative timers: <>. ** Modification of events from a running event handler is always safe. ** Deleting an already deleted event is always safe. -** For any event type, it is possible to ask whether it is active (added to the mainloop) or not: <> and friends. +** For any event type, it is possible to ask whether it is active (added to the mainloop) or not: <> and friends. ** A new mainloop front-end for asynchronous <> has been added. * Added support for <>, which is a general @@ -102,14 +99,14 @@ Release notes a much more convenient interface. * The <> can recognize unlinked nodes, - see <>. + see <>. * Added `strtonum.h` -- a module for precise parsing of numbers. * When compiled by a recent enough GCC, `__thread` is used for thread-local variables, which is more efficient than the POSIX per-thread storage. ** *Incompatible:* `ucwlib_context->thread_id` is no longer available directly, - please use ucwlib_thread_id() instead. + please use <> instead. * *Incompatible:* Several modules have been declared obsolete and removed: ** `sighandler` -- generic signal handling (it still exists internally) diff --git a/ucw/fastbuf.h b/ucw/fastbuf.h index 9b0f7251..d2904433 100644 --- a/ucw/fastbuf.h +++ b/ucw/fastbuf.h @@ -107,7 +107,7 @@ * ^ ^ ^ ^ * buffer <= bstop (BE pos) <= bptr (FE pos) <= bufend * - * * This schema describes a fastbuf after its initialization or bflush(). + * * This schema describes a fastbuf after its initialization or @bflush(). * * There is no cached data and we are ready for any read or write operation * (well, only if the back-end supports it). * * The interval `[bptr, bufend]` can be used by front-ends @@ -266,7 +266,7 @@ extern struct fb_params fbpar_def; /** The default `fb_params` **/ * Raises `ucw.fb.open` if the file does not exist. **/ struct fastbuf *bopen_file(const char *name, int mode, struct fb_params *params); -struct fastbuf *bopen_file_try(const char *name, int mode, struct fb_params *params); /** Like bopen_file(), but returns NULL on failure. **/ +struct fastbuf *bopen_file_try(const char *name, int mode, struct fb_params *params); /** Like @bopen_file(), but returns NULL on failure. **/ /** * Opens a temporary file. @@ -470,7 +470,7 @@ struct fbpool { /** Structure for fastbufs & mempools. **/ /** * Initialize a new `fbpool`. The structure is allocated by the caller, - * so bclose() should not be called and no resource tying takes place. + * so @bclose() should not be called and no resource tying takes place. **/ void fbpool_init(struct fbpool *fb); /** Initialize a new mempool fastbuf. **/ /** diff --git a/ucw/gary.h b/ucw/gary.h index f5274a94..ffcabafb 100644 --- a/ucw/gary.h +++ b/ucw/gary.h @@ -31,7 +31,7 @@ struct gary_hdr { /** * Create a new growing array, initially containing @n elements, * and let @ptr point to its first element. The memory used by the - * array is allocated by xmalloc(). + * array is allocated by <>. **/ #define GARY_INIT(ptr, n) (ptr) = gary_init(sizeof(*(ptr)), (n), &ucw_allocator_std) diff --git a/ucw/log.h b/ucw/log.h index e93e8263..d4cc525d 100644 --- a/ucw/log.h +++ b/ucw/log.h @@ -98,7 +98,7 @@ enum ls_flag { /*** * === Message flags * - * The @flags parameter of msg() is divided to several groups of bits (from the LSB): + * The @flags parameter of <> is divided to several groups of bits (from the LSB): * message severity level (`L_xxx`), destination stream, message type * and control bits (e.g., `L_SIGHANDLER`). ***/ @@ -209,7 +209,7 @@ static inline struct log_stream *log_default_stream(void) * In fact, it takes the fixed default stream and attaches @ls as its only * substream. If there were any other substreams, they are removed. * - * Log streams created by log_file() or log_configured() are made default + * Log streams created by <> or @log_configured() are made default * by calling this function. **/ void log_set_default_stream(struct log_stream *ls); diff --git a/ucw/mempool.h b/ucw/mempool.h index a36086ea..a781503b 100644 --- a/ucw/mempool.h +++ b/ucw/mempool.h @@ -339,7 +339,7 @@ static inline uns mp_size(struct mempool *pool, void *ptr) uns mp_open(struct mempool *pool, void *ptr); /** - * Inlined version of mp_open(). + * Inlined version of @mp_open(). **/ static inline uns mp_open_fast(struct mempool *pool, void *ptr) { @@ -362,7 +362,7 @@ void *mp_realloc(struct mempool *pool, void *ptr, uns size); void *mp_realloc_zero(struct mempool *pool, void *ptr, uns size); /** - * Inlined version of mp_realloc(). + * Inlined version of @mp_realloc(). **/ static inline void *mp_realloc_fast(struct mempool *pool, void *ptr, uns size) { diff --git a/ucw/opt.h b/ucw/opt.h index e37fb68c..98937777 100644 --- a/ucw/opt.h +++ b/ucw/opt.h @@ -372,7 +372,7 @@ extern char *cf_env_file; #define OPT_HOOK_BEFORE_ARG 0x1 /** Call before option parsing **/ #define OPT_HOOK_BEFORE_VALUE 0x2 /** Call before value parsing **/ #define OPT_HOOK_AFTER_VALUE 0x4 /** Call after value parsing **/ -#define OPT_HOOK_FINAL 0x8 /** Call just before opt_parse() returns **/ +#define OPT_HOOK_FINAL 0x8 /** Call just before @opt_parse() returns **/ #define OPT_HOOK_INTERNAL 0x4000 // Used internally to ask for passing of struct opt_context #endif -- 2.39.2