<p>Alexander Traud has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/17338">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">progdocs: Use Doxygen \example correctly.<br><br>ASTERISK-29734<br><br>Change-Id: I83b51e85cd71867645ab3a8a820f8fd1f065abd2<br>---<br>M include/asterisk/logger.h<br>M include/asterisk/strings.h<br>M main/app.c<br>3 files changed, 14 insertions(+), 9 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/38/17338/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/include/asterisk/logger.h b/include/asterisk/logger.h</span><br><span>index 4234262..017b449 100644</span><br><span>--- a/include/asterisk/logger.h</span><br><span>+++ b/include/asterisk/logger.h</span><br><span>@@ -821,7 +821,7 @@</span><br><span>  * \details</span><br><span>  * Handy for getting out of or continuing loops.</span><br><span>  *</span><br><span style="color: hsl(0, 100%, 40%);">- * \example</span><br><span style="color: hsl(120, 100%, 40%);">+ * \code</span><br><span>  * while(something) {</span><br><span>  *     SCOPE_ENTER(2, "In a while\n");</span><br><span>  *     if (something) {</span><br><span>@@ -830,6 +830,7 @@</span><br><span>  *         SCOPE_EXIT_EXPR(contniue, "Somethiung continued me\n");</span><br><span>  *     }</span><br><span>  * }</span><br><span style="color: hsl(120, 100%, 40%);">+ * \endcode</span><br><span>  */</span><br><span> #define SCOPE_EXIT_EXPR(__expr, ...) \</span><br><span>       ast_debug(__scope_level, " " __VA_ARGS__); \</span><br><span>diff --git a/include/asterisk/strings.h b/include/asterisk/strings.h</span><br><span>index 881cf89..fbd84a5 100644</span><br><span>--- a/include/asterisk/strings.h</span><br><span>+++ b/include/asterisk/strings.h</span><br><span>@@ -1117,30 +1117,35 @@</span><br><span>  * \details</span><br><span>  * There are a few query functions scattered around that need an ast_str in which</span><br><span>  * to assemble the results but it's not always convenient to create an ast_str</span><br><span style="color: hsl(0, 100%, 40%);">- * and ensure it's freed just to print a log message.  For example...</span><br><span style="color: hsl(120, 100%, 40%);">+ * and ensure it's freed just to print a log message.  For example:</span><br><span>  *</span><br><span style="color: hsl(120, 100%, 40%);">+ * \code</span><br><span>  * struct ast_str *temp = ast_str_create(128);</span><br><span>  * ast_log(LOG_INFO, "Format caps: %s\n", ast_format_cap_get_names(caps, &temp));</span><br><span>  * ast_free(temp);</span><br><span style="color: hsl(120, 100%, 40%);">+ * \endcode</span><br><span>  *</span><br><span>  * That's not bad if you only have to do it once but some of our code that deals</span><br><span>  * with streams and codecs is pretty complex and good instrumentation is essential.</span><br><span>  * The aim of this function is to make that easier.</span><br><span>  *</span><br><span style="color: hsl(0, 100%, 40%);">- * With this macro, the above code can be simplified as follows...</span><br><span style="color: hsl(0, 100%, 40%);">- * \example</span><br><span style="color: hsl(120, 100%, 40%);">+ * With this macro, the above code can be simplified:</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * \code</span><br><span>  * ast_log(LOG_INFO, "Format caps: %s\n",</span><br><span>  *     ast_str_tmp(128, ast_format_cap_get_names(caps, &STR_TMP));</span><br><span style="color: hsl(120, 100%, 40%);">+ * \endcode</span><br><span>  *</span><br><span>  * STR_TMP will always be a reference to the temporary ast_str created</span><br><span>  * by the macro.  Its scope is limited by the macro so you can use it multiple</span><br><span style="color: hsl(0, 100%, 40%);">- * times without conflict.</span><br><span style="color: hsl(120, 100%, 40%);">+ * times without conflict:</span><br><span>  *</span><br><span style="color: hsl(0, 100%, 40%);">- * \example</span><br><span style="color: hsl(120, 100%, 40%);">+ * \code</span><br><span>  * ast_log(LOG_INFO, "Format caps in: %s  Format caps out: %s\n",</span><br><span>  *     ast_str_tmp(128, ast_format_cap_get_names(caps_in, &STR_TMP),</span><br><span>  *     ast_str_tmp(128, ast_format_cap_get_names(caps_out, &STR_TMP)</span><br><span>  *     );</span><br><span style="color: hsl(120, 100%, 40%);">+ * \endcode</span><br><span>  *</span><br><span>  * \warning</span><br><span>  * The returned string is stack allocated so don't go overboard.</span><br><span>diff --git a/main/app.c b/main/app.c</span><br><span>index f5fbffd..facc123 100644</span><br><span>--- a/main/app.c</span><br><span>+++ b/main/app.c</span><br><span>@@ -23,10 +23,9 @@</span><br><span>  * \author Mark Spencer <markster@digium.com></span><br><span>  */</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-/** \example</span><br><span style="color: hsl(0, 100%, 40%);">- * \par This is an example of how to develop an app.</span><br><span style="color: hsl(120, 100%, 40%);">+/*!</span><br><span>  * Application Skeleton is an example of creating an application for Asterisk.</span><br><span style="color: hsl(0, 100%, 40%);">- * \verbinclude app_skel.c</span><br><span style="color: hsl(120, 100%, 40%);">+ * \example app_skel.c</span><br><span>  */</span><br><span> </span><br><span> /*** MODULEINFO</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/17338">change 17338</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/17338"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I83b51e85cd71867645ab3a8a820f8fd1f065abd2 </div>
<div style="display:none"> Gerrit-Change-Number: 17338 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Alexander Traud <pabstraud@compuserve.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>