aboutsummaryrefslogtreecommitdiffstats
path: root/src/apoint.c
diff options
context:
space:
mode:
authorFrederic Culot <calcurse@culot.org>2008-12-12 20:44:50 +0000
committerFrederic Culot <calcurse@culot.org>2008-12-12 20:44:50 +0000
commit53db22a380ec76a684fd5000d216350aaa795278 (patch)
tree8902b4442302bfd8f5d2be0385357705e629be62 /src/apoint.c
parentbd286546f42bbeb568e2a003882e78bf4f1ae831 (diff)
downloadcalcurse-53db22a380ec76a684fd5000d216350aaa795278.tar.gz
calcurse-53db22a380ec76a684fd5000d216350aaa795278.zip
code cleanup
Diffstat (limited to 'src/apoint.c')
-rwxr-xr-xsrc/apoint.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/apoint.c b/src/apoint.c
index 6686572..3928b7e 100755
--- a/src/apoint.c
+++ b/src/apoint.c
@@ -1,4 +1,4 @@
-/* $calcurse: apoint.c,v 1.25 2008/12/07 09:20:38 culot Exp $ */
+/* $calcurse: apoint.c,v 1.26 2008/12/12 20:44:50 culot Exp $ */
/*
* Calcurse - text-based organizer
@@ -229,7 +229,6 @@ apoint_delete (conf_t *conf, unsigned *nb_events, unsigned *nb_apoints)
{
char *choices = "[y/n] ";
char *del_app_str = _("Do you really want to delete this item ?");
- const char *errmsg = _("FATAL ERROR in apoint_delete: no such type\n");
long date;
int nb_items = *nb_apoints + *nb_events;
bool go_for_deletion = false;
@@ -274,7 +273,7 @@ apoint_delete (conf_t *conf, unsigned *nb_events, unsigned *nb_apoints)
to_be_removed = 0;
}
else
- ierror (errmsg, IERROR_FATAL);
+ EXIT (_("no such type"));
/* NOTREACHED */
if (hilt > 1)
@@ -452,8 +451,7 @@ apoint_delete_bynum (long start, unsigned num, erase_flag_e flag)
pthread_mutex_unlock (&(alist_p->mutex));
/* NOTREACHED */
- ierror (_("FATAL ERROR in apoint_delete_bynum: no such appointment"),
- IERROR_FATAL);
+ EXIT (_("no such appointment"));
}
/*
@@ -533,7 +531,7 @@ apoint_check_next (struct notify_app_s *app, long start)
if (i->start > start)
{
app->time = i->start;
- app->txt = mycpy (i->mesg);
+ app->txt = strdup (i->mesg);
app->state = i->state;
app->got_app = 1;
}
@@ -613,8 +611,7 @@ apoint_switch_notify (void)
pthread_mutex_unlock (&(alist_p->mutex));
/* NOTREACHED */
- ierror (_("FATAL ERROR in apoint_switch_notify: no such appointment"),
- IERROR_FATAL);
+ EXIT (_("no such appointment"));
}
/* Updates the Appointment panel */