summaryrefslogtreecommitdiff
path: root/src/args.c
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2012-06-25 22:13:42 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2012-06-30 14:34:34 +0200
commitb97c2a09cffa9963fd0f5086e5da6031b1d48342 (patch)
treecc034e41ecca4268fb509f0039ecd46259bf5c59 /src/args.c
parentf3858d899c9b29e38521e4eab46dcd97dc3fb57f (diff)
downloadcalcurse-b97c2a09cffa9963fd0f5086e5da6031b1d48342.zip
day_store_items(): Return the number of items found
Return the total number of items found instead of the pad length, since this is used to store items in non-interactive mode as well now. The pad length can still be calculated by using the appointment and event count parameters. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/args.c')
-rw-r--r--src/args.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/args.c b/src/args.c
index e375fd7..2a286dd 100644
--- a/src/args.c
+++ b/src/args.c
@@ -295,14 +295,14 @@ app_arg(int add_line, struct date *day, long date, const char *fmt_apt,
int n = day_store_items(date, NULL, NULL, regex);
- if (n > 1) {
+ if (n > 0) {
if (add_line)
fputs("\n", stdout);
arg_print_date(date);
day_write_stdout(date, fmt_apt, fmt_rapt, fmt_ev, fmt_rev);
}
- return n - 1;
+ return n;
}
/*