diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-05-19 13:10:41 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-05-19 13:10:41 +0000 |
commit | 4fec788fa5f6e7c9723e02e3d0b57068ce9785aa (patch) | |
tree | 2b4fd7f79ee29b231c77c9bc0bc67b4eed913bef /Src/hist.c | |
parent | ea0ddb0fc6073be3d7d289e59b083f564dbd761f (diff) | |
download | zsh-4fec788fa5f6e7c9723e02e3d0b57068ce9785aa.tar.gz zsh-4fec788fa5f6e7c9723e02e3d0b57068ce9785aa.tar.xz zsh-4fec788fa5f6e7c9723e02e3d0b57068ce9785aa.zip |
zsh-3.1.5-pws-19 dot-zsh-3.1.5-pws-19-199905271502
Diffstat (limited to 'Src/hist.c')
-rw-r--r-- | Src/hist.c | 6 |
1 files changed, 3 insertions, 3 deletions
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); |