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>
This commit is contained in:
Lukas Fleischer
2012-06-25 22:13:42 +02:00
parent f3858d899c
commit b97c2a09cf
2 changed files with 11 additions and 16 deletions

View File

@@ -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;
}
/*