summaryrefslogtreecommitdiff
path: root/cli.c
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2005-07-07 22:32:20 +0000
committerKevin P. Fleming <kpfleming@digium.com>2005-07-07 22:32:20 +0000
commitf268ea2b3c1ec5e3718dddea2aeaed0329eeaa24 (patch)
treea573b667aaa5d433b557f82b7ca439d79d1fd191 /cli.c
parentf1a18b8066d100676b06cf7ee62c6a76c53b2530 (diff)
make CLI output use singular/plural when appropriate (bug #4654)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6047 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'cli.c')
-rwxr-xr-xcli.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cli.c b/cli.c
index a5a970dc2..f027dd6db 100755
--- a/cli.c
+++ b/cli.c
@@ -430,11 +430,11 @@ static int handle_chanlist(int fd, int argc, char *argv[])
ast_mutex_unlock(&c->lock);
}
if(!concise) {
- ast_cli(fd, "%d active channel(s)\n", numchans);
+ ast_cli(fd, "%d active channel%s\n", numchans, (numchans!=1) ? "s" : "");
if (option_maxcalls)
- ast_cli(fd, "%d of %d max active call(s) (%5.2f%% of capacity)\n", ast_active_calls(), option_maxcalls, ((float)ast_active_calls() / (float)option_maxcalls) * 100.0);
+ ast_cli(fd, "%d of %d max active call%s (%5.2f%% of capacity)\n", ast_active_calls(), option_maxcalls, (ast_active_calls()!=1) ? "s" : "", ((float)ast_active_calls() / (float)option_maxcalls) * 100.0);
else
- ast_cli(fd, "%d active call(s)\n", ast_active_calls());
+ ast_cli(fd, "%d active call%s\n", ast_active_calls(), (ast_active_calls()!=1) ? "s" : "");
}
return RESULT_SUCCESS;
}