summaryrefslogtreecommitdiffstats
path: root/src/history.c
diff options
context:
space:
mode:
authorSosthène Guédon <sosthene.gued@gmail.com>2019-06-16 12:12:33 +0200
committerSosthène Guédon <sosthene.gued@gmail.com>2019-06-16 12:12:33 +0200
commite2cd442811ce3d5d602e1e3d90173af77e5041d4 (patch)
tree4def7574025a60e98d74be26713a0aea2a5b3497 /src/history.c
parent08556c96115a5421f05b637bb29affde359ccacf (diff)
Change FOLDER to DIR
Diffstat (limited to 'src/history.c')
-rw-r--r--src/history.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/history.c b/src/history.c
index b1dcfd2..ecd4e71 100644
--- a/src/history.c
+++ b/src/history.c
@@ -157,7 +157,7 @@ void load_history(struct history * h, wchar_t mode) {
FILE * f;
if ((home = getenv("HOME"))) {
- sprintf(infofile, "%s/%s/%s", home,HISTORY_FOLDER,HISTORY_FILE);
+ sprintf(infofile, "%s/%s/%s", home,HISTORY_DIR,HISTORY_FILE);
if ((c = open(infofile, O_RDONLY)) > -1) {
close(c);
f = fopen(infofile, "r");
@@ -194,10 +194,10 @@ int save_history(struct history * h, char * mode) {
int i;
struct hlist * nl = h->list;
if ((home = getenv("HOME"))) {
- char history_folder[PATHLEN];
- sprintf(history_folder, "%s/%s", home,HISTORY_FOLDER);
- mkdir(history_folder,0777);
- sprintf(infofile, "%s/%s/%s", home,HISTORY_FOLDER,HISTORY_FILE);
+ char history_dir[PATHLEN];
+ sprintf(history_dir, "%s/%s", home,HISTORY_DIR);
+ mkdir(history_dir,0777);
+ sprintf(infofile, "%s/%s/%s", home,HISTORY_DIR,HISTORY_FILE);
f = fopen(infofile, mode);
if (f == NULL) return 0;
// Go to the end