summaryrefslogtreecommitdiffstats
path: root/src/args.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/args.c')
-rw-r--r--src/args.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/args.c b/src/args.c
index a3a22fe..8600d33 100644
--- a/src/args.c
+++ b/src/args.c
@@ -51,7 +51,7 @@
static void
usage ()
{
- char *arg_usage =
+ const char *arg_usage =
_("Usage: calcurse [-h|-v] [-N] [-an] [-t[num]] [-i<file>] [-x[format]]\n"
" [-d <date>|<num>] [-s[date]] [-r[range]]\n"
" [-c<file> | -D<dir>] [-S<regex>] [--status]\n");
@@ -61,7 +61,7 @@ usage ()
static void
usage_try ()
{
- char *arg_usage_try = _("Try 'calcurse -h' for more information.\n");
+ const char *arg_usage_try = _("Try 'calcurse -h' for more information.\n");
fputs (arg_usage_try, stdout);
}
@@ -71,14 +71,11 @@ usage_try ()
static void
version_arg ()
{
- char vtitle[BUFSIZ];
- char *vtext =
+ const char *vtext =
_("\nCopyright (c) 2004-2011 calcurse Development Team.\n"
"This is free software; see the source for copying conditions.\n");
- (void)snprintf (vtitle, BUFSIZ, _("Calcurse %s - text-based organizer\n"),
- VERSION);
- fputs (vtitle, stdout);
+ fprintf (stdout, _("Calcurse %s - text-based organizer\n"), VERSION);
fputs (vtext, stdout);
}
@@ -88,8 +85,7 @@ version_arg ()
static void
help_arg ()
{
- char htitle[BUFSIZ];
- char *htext =
+ const char *htext =
_("\nMiscellaneous:\n"
" -h, --help\n"
" print this help and exit.\n"
@@ -146,9 +142,7 @@ help_arg ()
"or read the manpage.\n"
"Mail bug reports and suggestions to <misc@calcurse.org>.\n");
- (void)snprintf (htitle, BUFSIZ, _("Calcurse %s - text-based organizer\n"),
- VERSION);
- fputs (htitle, stdout);
+ fprintf (stdout, _("Calcurse %s - text-based organizer\n"), VERSION);
usage ();
fputs (htext, stdout);
}
@@ -950,7 +944,7 @@ parse_args (int argc, char **argv, struct conf *conf)
io_check_file (path_apts, (int *)0);
io_check_file (path_conf, (int *)0);
io_load_app ();
- custom_load_conf (conf, 0); /* To get output date format. */
+ custom_load_conf (conf); /* To get output date format. */
if (dflag)
date_arg (ddate, add_line, Nflag, conf, preg);
if (rflag || sflag)
@@ -965,7 +959,7 @@ parse_args (int argc, char **argv, struct conf *conf)
io_check_file (path_apts, (int *)0);
io_check_file (path_conf, (int *)0);
vars_init (conf);
- custom_load_conf (conf, 0); /* To get output date format. */
+ custom_load_conf (conf); /* To get output date format. */
io_load_app ();
day.dd = day.mm = day.yyyy = 0;
(void)app_arg (add_line, &day, 0, Nflag, conf, preg);