mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-19 19:52:48 +00:00
progdocs: Use Doxygen \example correctly.
ASTERISK-29734 Change-Id: I83b51e85cd71867645ab3a8a820f8fd1f065abd2
This commit is contained in:
committed by
George Joseph
parent
55110339ec
commit
e79271cca4
@@ -822,7 +822,7 @@ unsigned long _ast_trace_dec_indent(void);
|
|||||||
* \details
|
* \details
|
||||||
* Handy for getting out of or continuing loops.
|
* Handy for getting out of or continuing loops.
|
||||||
*
|
*
|
||||||
* \example
|
* \code
|
||||||
* while(something) {
|
* while(something) {
|
||||||
* SCOPE_ENTER(2, "In a while\n");
|
* SCOPE_ENTER(2, "In a while\n");
|
||||||
* if (something) {
|
* if (something) {
|
||||||
@@ -831,6 +831,7 @@ unsigned long _ast_trace_dec_indent(void);
|
|||||||
* SCOPE_EXIT_EXPR(continue, "Somethiung continued me\n");
|
* SCOPE_EXIT_EXPR(continue, "Somethiung continued me\n");
|
||||||
* }
|
* }
|
||||||
* }
|
* }
|
||||||
|
* \endcode
|
||||||
*/
|
*/
|
||||||
#define SCOPE_EXIT_EXPR(__expr, ...) \
|
#define SCOPE_EXIT_EXPR(__expr, ...) \
|
||||||
ast_debug(__scope_level, " " __VA_ARGS__); \
|
ast_debug(__scope_level, " " __VA_ARGS__); \
|
||||||
|
@@ -1117,30 +1117,35 @@ int __attribute__((format(printf, 3, 4))) ast_str_append(
|
|||||||
* \details
|
* \details
|
||||||
* There are a few query functions scattered around that need an ast_str in which
|
* There are a few query functions scattered around that need an ast_str in which
|
||||||
* to assemble the results but it's not always convenient to create an ast_str
|
* to assemble the results but it's not always convenient to create an ast_str
|
||||||
* and ensure it's freed just to print a log message. For example...
|
* and ensure it's freed just to print a log message. For example:
|
||||||
*
|
*
|
||||||
|
* \code
|
||||||
* struct ast_str *temp = ast_str_create(128);
|
* struct ast_str *temp = ast_str_create(128);
|
||||||
* ast_log(LOG_INFO, "Format caps: %s\n", ast_format_cap_get_names(caps, &temp));
|
* ast_log(LOG_INFO, "Format caps: %s\n", ast_format_cap_get_names(caps, &temp));
|
||||||
* ast_free(temp);
|
* ast_free(temp);
|
||||||
|
* \endcode
|
||||||
*
|
*
|
||||||
* That's not bad if you only have to do it once but some of our code that deals
|
* That's not bad if you only have to do it once but some of our code that deals
|
||||||
* with streams and codecs is pretty complex and good instrumentation is essential.
|
* with streams and codecs is pretty complex and good instrumentation is essential.
|
||||||
* The aim of this function is to make that easier.
|
* The aim of this function is to make that easier.
|
||||||
*
|
*
|
||||||
* With this macro, the above code can be simplified as follows...
|
* With this macro, the above code can be simplified:
|
||||||
* \example
|
*
|
||||||
|
* \code
|
||||||
* ast_log(LOG_INFO, "Format caps: %s\n",
|
* ast_log(LOG_INFO, "Format caps: %s\n",
|
||||||
* ast_str_tmp(128, ast_format_cap_get_names(caps, &STR_TMP));
|
* ast_str_tmp(128, ast_format_cap_get_names(caps, &STR_TMP));
|
||||||
|
* \endcode
|
||||||
*
|
*
|
||||||
* STR_TMP will always be a reference to the temporary ast_str created
|
* STR_TMP will always be a reference to the temporary ast_str created
|
||||||
* by the macro. Its scope is limited by the macro so you can use it multiple
|
* by the macro. Its scope is limited by the macro so you can use it multiple
|
||||||
* times without conflict.
|
* times without conflict:
|
||||||
*
|
*
|
||||||
* \example
|
* \code
|
||||||
* ast_log(LOG_INFO, "Format caps in: %s Format caps out: %s\n",
|
* ast_log(LOG_INFO, "Format caps in: %s Format caps out: %s\n",
|
||||||
* ast_str_tmp(128, ast_format_cap_get_names(caps_in, &STR_TMP),
|
* ast_str_tmp(128, ast_format_cap_get_names(caps_in, &STR_TMP),
|
||||||
* ast_str_tmp(128, ast_format_cap_get_names(caps_out, &STR_TMP)
|
* ast_str_tmp(128, ast_format_cap_get_names(caps_out, &STR_TMP)
|
||||||
* );
|
* );
|
||||||
|
* \endcode
|
||||||
*
|
*
|
||||||
* \warning
|
* \warning
|
||||||
* The returned string is stack allocated so don't go overboard.
|
* The returned string is stack allocated so don't go overboard.
|
||||||
|
@@ -23,10 +23,9 @@
|
|||||||
* \author Mark Spencer <markster@digium.com>
|
* \author Mark Spencer <markster@digium.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** \example
|
/*!
|
||||||
* \par This is an example of how to develop an app.
|
|
||||||
* Application Skeleton is an example of creating an application for Asterisk.
|
* Application Skeleton is an example of creating an application for Asterisk.
|
||||||
* \verbinclude app_skel.c
|
* \example app_skel.c
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*** MODULEINFO
|
/*** MODULEINFO
|
||||||
|
Reference in New Issue
Block a user