summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/calcurse.h3
-rw-r--r--src/vars.c6
2 files changed, 5 insertions, 4 deletions
diff --git a/src/calcurse.h b/src/calcurse.h
index 383f53e..091d16a 100644
--- a/src/calcurse.h
+++ b/src/calcurse.h
@@ -100,6 +100,9 @@
#define DPID_PATH DIR_NAME DPID_PATH_NAME
#define NOTES_DIR DIR_NAME NOTES_DIR_NAME
+#define DEFAULT_EDITOR "vi"
+#define DEFAULT_PAGER "less"
+
#define ATTR_FALSE 0
#define ATTR_TRUE 1
#define ATTR_LOWEST 2
diff --git a/src/vars.c b/src/vars.c
index 4b1d7cd..84f8b08 100644
--- a/src/vars.c
+++ b/src/vars.c
@@ -114,8 +114,6 @@ struct dmon_conf dmon;
void
vars_init (struct conf *conf)
{
- char *PATH_VI = "/usr/bin/vi";
- char *PATH_LESS = "/usr/bin/less";
char *ed, *pg;
/* Variables for user configuration */
@@ -133,12 +131,12 @@ vars_init (struct conf *conf)
if (ed == NULL || ed[0] == '\0')
ed = getenv ("EDITOR");
if (ed == NULL || ed[0] == '\0')
- ed = PATH_VI;
+ ed = DEFAULT_EDITOR;
conf->editor = ed;
pg = getenv ("PAGER");
if (pg == NULL || pg[0] == '\0')
- pg = PATH_LESS;
+ pg = DEFAULT_PAGER;
conf->pager = pg;
wins_set_layout (1);