Update of /usr/cvsroot/asterisk/apps
In directory localhost.localdomain:/tmp/cvs-serv16526/apps
Modified Files:
app_groupcount.c app_read.c app_realtime.c
Log Message:
make CLI output use singular/plural when appropriate (bug #4654)
Index: app_groupcount.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_groupcount.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- app_groupcount.c 6 Jun 2005 22:39:31 -0000 1.17
+++ app_groupcount.c 7 Jul 2005 22:32:20 -0000 1.18
@@ -202,7 +202,7 @@
if (havepattern)
regfree(®exbuf);
- ast_cli(fd, "%d active channel(s)\n", numchans);
+ ast_cli(fd, "%d active channel%s\n", numchans, (numchans != 1) ? "s" :
"");
return RESULT_SUCCESS;
}
Index: app_read.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_read.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- app_read.c 6 Jun 2005 22:39:31 -0000 1.20
+++ app_read.c 7 Jul 2005 22:32:20 -0000 1.21
@@ -159,7 +159,7 @@
tries--;
if (option_verbose > 2) {
if (tries)
-
ast_verbose(VERBOSE_PREFIX_3 "User entered nothing, %d chance(s) left\n",
tries);
+
ast_verbose(VERBOSE_PREFIX_3 "User entered nothing, %d chance%s left\n", tries,
(tries != 1) ? "s" : "");
else
ast_verbose(VERBOSE_PREFIX_3 "User entered nothing.\n");
}
Index: app_realtime.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_realtime.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- app_realtime.c 6 Jun 2005 22:39:31 -0000 1.10
+++ app_realtime.c 7 Jul 2005 22:32:20 -0000 1.11
@@ -92,7 +92,7 @@
return RESULT_SUCCESS;
}
- ast_cli(fd, "Updated %d RealTime record(s).\n", res);
+ ast_cli(fd, "Updated %d RealTime record%s.\n", res, (res != 1) ? "s" :
"");
return RESULT_SUCCESS;
}
_______________________________________________
Asterisk-Cvs mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-cvs