summaryrefslogtreecommitdiff
path: root/src/apoint.c
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2012-04-05 21:36:54 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2012-04-05 22:18:46 +0200
commit80f7e8ead55ee85a364c98db64c21d70a34d1dc1 (patch)
treed8c6d909ada1c0c4c85533a0d1687d0ccdffb17e /src/apoint.c
parent516a793375424ea2bbdc891bf0c917a8f7b388a1 (diff)
downloadcalcurse-80f7e8ead55ee85a364c98db64c21d70a34d1dc1.zip
Mark localized string literals constant
Translated strings returned by gettext() are statically allocated and shouldn't be modified. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/apoint.c')
-rw-r--r--src/apoint.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/apoint.c b/src/apoint.c
index 6808738..98e8e5e 100644
--- a/src/apoint.c
+++ b/src/apoint.c
@@ -155,16 +155,16 @@ apoint_add (void)
{
#define LTIME 6
#define LDUR 12
- char *mesg_1 =
+ const char *mesg_1 =
_("Enter start time ([hh:mm]), leave blank for an all-day event : ");
- char *mesg_2 =
+ const char *mesg_2 =
_("Enter end time ([hh:mm]) or duration ([+hh:mm], [+xxxdxxhxxm] or [+mm]) : ");
- char *mesg_3 = _("Enter description :");
- char *format_message_1 =
+ const char *mesg_3 = _("Enter description :");
+ const char *format_message_1 =
_("You entered an invalid start time, should be [hh:mm]");
- char *format_message_2 =
+ const char *format_message_2 =
_("Invalid end time/duration, should be [hh:mm], [+hh:mm], [+xxxdxxhxxm] or [+mm]");
- char *enter_str = _("Press [Enter] to continue");
+ const char *enter_str = _("Press [Enter] to continue");
int Id = 1;
char item_time[LDUR] = "";
char item_mesg[BUFSIZ] = "";
@@ -265,7 +265,7 @@ void
apoint_delete (unsigned *nb_events, unsigned *nb_apoints)
{
char *choices = "[y/n] ";
- char *del_app_str = _("Do you really want to delete this item ?");
+ const char *del_app_str = _("Do you really want to delete this item ?");
long date;
int nb_items = *nb_apoints + *nb_events;
int to_be_removed = 0;