1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-23 16:40:24 +02:00

zsh-3.1.5-pws-19

This commit is contained in:
Tanaka Akira 1999-05-19 13:10:41 +00:00
parent ea0ddb0fc6
commit 4fec788fa5
52 changed files with 1568 additions and 340 deletions

View file

@ -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);