summaryrefslogtreecommitdiffstats
path: root/src/apoint.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/apoint.c')
-rwxr-xr-xsrc/apoint.c16
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