mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-19 08:11:21 +00:00
Move this macro from cli.c to cli.h so apps can use it
without duplicating the macro or the code:
/*!
* In many cases we need to print singular or plural
* words depending on a count. This macro helps us e.g.
* printf("we have %d object%s", n, ESS(n));
*/
#define ESS(x) ((x) == 1 ? "" : "s")
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47827 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -48,6 +48,13 @@ void ast_cli(int fd, char *fmt, ...)
|
||||
|
||||
#define AST_CLI_COMPLETE_EOF "_EOF_"
|
||||
|
||||
/*!
|
||||
* In many cases we need to print singular or plural
|
||||
* words depending on a count. This macro helps us e.g.
|
||||
* printf("we have %d object%s", n, ESS(n));
|
||||
*/
|
||||
#define ESS(x) ((x) == 1 ? "" : "s")
|
||||
|
||||
/*! \page CLI_command_api CLI command API
|
||||
|
||||
CLI commands are described by a struct ast_cli_entry that contains
|
||||
|
||||
Reference in New Issue
Block a user