From b97c2a09cffa9963fd0f5086e5da6031b1d48342 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Mon, 25 Jun 2012 22:13:42 +0200 Subject: 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 --- src/args.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/args.c') 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; } /* -- cgit v1.2.3-54-g00ecf