[asterisk-dev] 0006889: [patch] Convert ast_verbose into macros
Tilghman Lesher
tilghman at mail.jeffandtilghman.com
Wed Apr 5 12:42:40 MST 2006
On Wednesday 05 April 2006 13:58, casper at casper.org.ua wrote:
> Hi!
>
> I'd like to hear back form the developer community if converting
> blocks like: if (option_verbose > level)
> ast_verbose("\n");
> or:
> if ((cond) && (option_verbose > level))
> ast_verbose("\n");
> into macros:
> AST_VERBOSE(level, "");
> AST_VERBOSE_IF(level, cond, "");
> would be a handy addition to avoid errors such as accidental
> inclusion of code into if controls and not terminating verbose output
> with "\n".
But failing to terminate ast_verbose strings with a newline is a
feature, not a bug. It allows us to send a full line with multiple
calls to ast_verbose. It is intentionally done that way.
--
Tilghman
More information about the asterisk-dev
mailing list