aboutsummaryrefslogtreecommitdiffstats
path: root/history.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2003-07-22 17:29:47 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2003-07-22 17:29:47 +0000
commitfb5606e26011187fbb812372eb2fd1eb54770a4c (patch)
tree6f67d78ea482e58654038194c1f649805ebe99c8 /history.c
parent[w3m-dev 03941] fix character encoding for 'v' (diff)
downloadw3m-fb5606e26011187fbb812372eb2fd1eb54770a4c.tar.gz
w3m-fb5606e26011187fbb812372eb2fd1eb54770a4c.zip
[w3m-dev 03942] Save history
* history.c (saveHistory): check tmpfile write error From: Takahashi Youichirou <nikuq@hk.airnet.ne.jp>
Diffstat (limited to '')
-rw-r--r--history.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/history.c b/history.c
index 2dcc893..b2ef573 100644
--- a/history.c
+++ b/history.c
@@ -1,4 +1,4 @@
-/* $Id: history.c,v 1.9 2003/02/05 16:43:57 ukai Exp $ */
+/* $Id: history.c,v 1.10 2003/07/22 17:29:48 ukai Exp $ */
#include "fm.h"
#ifdef USE_HISTORY
@@ -72,7 +72,10 @@ saveHistory(Hist *hist, size_t size)
size++;
for (; item; item = item->next)
fprintf(f, "%s\n", (char *)item->ptr);
- fclose(f);
+ if (fclose(f) == EOF) {
+ disp_err_message("Can't save history", FALSE);
+ return;
+ }
rename(tmpf, rcFile(HISTORY_FILE));
}
#endif /* USE_HISTORY */