diff options
author | Frederic Culot <calcurse@culot.org> | 2008-12-14 15:54:50 +0000 |
---|---|---|
committer | Frederic Culot <calcurse@culot.org> | 2008-12-14 15:54:50 +0000 |
commit | 65ec1bb0fa126748a84555406c22de3588f47b9b (patch) | |
tree | bc732b49d769b75a6e56ac15e29deeda8af2f03f /src/apoint.c | |
parent | 8900d0f8f267c5508aa2c940c57e879baf0a25af (diff) | |
download | calcurse-65ec1bb0fa126748a84555406c22de3588f47b9b.zip |
small bugfixes and code cleanup
Diffstat (limited to 'src/apoint.c')
-rwxr-xr-x | src/apoint.c | 16 |
1 files changed, 6 insertions, 10 deletions
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 |