From 4fec788fa5f6e7c9723e02e3d0b57068ce9785aa Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Wed, 19 May 1999 13:10:41 +0000 Subject: zsh-3.1.5-pws-19 --- Src/hist.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Src/hist.c') diff --git a/Src/hist.c b/Src/hist.c index 55209a1c0..6b2c2a653 100644 --- a/Src/hist.c +++ b/Src/hist.c @@ -972,7 +972,7 @@ hend(void) zfree(chwords, chwordlen*sizeof(short)); chline = NULL; histactive = 0; - if (isset(SHAREHISTORY) || isset(INCREMENTALAPPENDHISTORY)) + if (isset(SHAREHISTORY) || isset(INCAPPENDHISTORY)) savehistfile(hf, 1, HFILE_USE_OPTIONS | HFILE_FAST); unlockhistfile(hf); /* It's OK to call this even if we aren't locked */ return !(flag & HISTFLAG_NOEXEC || errflag); @@ -1778,7 +1778,7 @@ savehistfile(char *fn, int err, int writeflags) he = hist_ring->down; } if (writeflags & HFILE_USE_OPTIONS) { - if (isset(APPENDHISTORY) || isset(INCREMENTALAPPENDHISTORY) + if (isset(APPENDHISTORY) || isset(INCAPPENDHISTORY) || isset(SHAREHISTORY)) writeflags |= HFILE_APPEND | HFILE_SKIPOLD; else @@ -1883,7 +1883,7 @@ lockhistfile(char *fn, int keep_trying) char *tmpfile, *lockfile; tmpfile = zalloc(len + 10 + 1); - sprintf(tmpfile, "%s.%ld", fn, mypid); + sprintf(tmpfile, "%s.%ld", fn, (long)mypid); if ((fd = open(tmpfile, O_RDWR|O_CREAT|O_EXCL, 0644)) >= 0) { write(fd, "0\n", 2); close(fd); -- cgit 1.4.1