From 65ec1bb0fa126748a84555406c22de3588f47b9b Mon Sep 17 00:00:00 2001 From: Frederic Culot Date: Sun, 14 Dec 2008 15:54:50 +0000 Subject: small bugfixes and code cleanup --- src/apoint.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'src/apoint.c') diff --git a/src/apoint.c b/src/apoint.c index 3928b7e..1b067ba 100755 --- a/src/apoint.c +++ b/src/apoint.c @@ -1,4 +1,4 @@ -/* $calcurse: apoint.c,v 1.26 2008/12/12 20:44:50 culot Exp $ */ +/* $calcurse: apoint.c,v 1.27 2008/12/14 15:54:51 culot Exp $ */ /* * Calcurse - text-based organizer @@ -381,12 +381,8 @@ apoint_scan (FILE *f, struct tm start, struct tm end, char state, char *note) tstart = mktime (&start); tend = mktime (&end); - if (tstart == -1 || tend == -1 || tstart > tend) - { - fputs (_("FATAL ERROR in apoint_scan: date error in the appointment\n"), - stderr); - exit (EXIT_FAILURE); - } + EXIT_IF (tstart == -1 || tend == -1 || tstart > tend, + _("date error in appointment")); return (apoint_new (buf, note, tstart, tend - tstart, state)); } @@ -407,9 +403,9 @@ apoint_get (long day, int pos) n++; } } - /* NOTREACHED */ - fputs (_("FATAL ERROR in apoint_get: no such item\n"), stderr); - exit (EXIT_FAILURE); + EXIT (_("item not found")); + return 0; + /* NOTREACHED */ } void -- cgit v1.2.3-54-g00ecf