comparison src/fileio.c @ 1620:73fe8baea242

updated for version 7.2a
author vimboss
date Tue, 24 Jun 2008 21:16:56 +0000
parents 80b9076e9e17
children 9c5a9e4356f8
comparison
equal deleted inserted replaced
1619:b9740fb41986 1620:73fe8baea242
18 #if defined __EMX__ 18 #if defined __EMX__
19 # include "vimio.h" /* for mktemp(), CJW 1997-12-03 */ 19 # include "vimio.h" /* for mktemp(), CJW 1997-12-03 */
20 #endif 20 #endif
21 21
22 #include "vim.h" 22 #include "vim.h"
23
24 #ifdef HAVE_FCNTL_H
25 # include <fcntl.h>
26 #endif
27 23
28 #ifdef __TANDEM 24 #ifdef __TANDEM
29 # include <limits.h> /* for SSIZE_MAX */ 25 # include <limits.h> /* for SSIZE_MAX */
30 #endif 26 #endif
31 27
4700 IObuff[IOSIZE - STRLEN(errmsg) - numlen - 1] = NUL; 4696 IObuff[IOSIZE - STRLEN(errmsg) - numlen - 1] = NUL;
4701 /* If the error message has the form "is ...", put the error number in 4697 /* If the error message has the form "is ...", put the error number in
4702 * front of the file name. */ 4698 * front of the file name. */
4703 if (errnum != NULL) 4699 if (errnum != NULL)
4704 { 4700 {
4705 mch_memmove(IObuff + numlen, IObuff, STRLEN(IObuff) + 1); 4701 STRMOVE(IObuff + numlen, IObuff);
4706 mch_memmove(IObuff, errnum, (size_t)numlen); 4702 mch_memmove(IObuff, errnum, (size_t)numlen);
4707 } 4703 }
4708 STRCAT(IObuff, errmsg); 4704 STRCAT(IObuff, errmsg);
4709 emsg(IObuff); 4705 emsg(IObuff);
4710 4706
5974 #ifdef USE_LONG_FNAME 5970 #ifdef USE_LONG_FNAME
5975 && USE_LONG_FNAME 5971 && USE_LONG_FNAME
5976 #endif 5972 #endif
5977 ) 5973 )
5978 { 5974 {
5979 mch_memmove(e + 1, e, STRLEN(e) + 1); 5975 STRMOVE(e + 1, e);
5980 #ifdef RISCOS 5976 #ifdef RISCOS
5981 *e = '/'; 5977 *e = '/';
5982 #else 5978 #else
5983 *e = '.'; 5979 *e = '.';
5984 #endif 5980 #endif
6591 if (reload) 6587 if (reload)
6592 /* Reload the buffer. */ 6588 /* Reload the buffer. */
6593 buf_reload(buf, orig_mode); 6589 buf_reload(buf, orig_mode);
6594 6590
6595 #ifdef FEAT_AUTOCMD 6591 #ifdef FEAT_AUTOCMD
6596 if (buf_valid(buf)) 6592 /* Trigger FileChangedShell when the file was changed in any way. */
6593 if (buf_valid(buf) && retval != 0)
6597 (void)apply_autocmds(EVENT_FILECHANGEDSHELLPOST, 6594 (void)apply_autocmds(EVENT_FILECHANGEDSHELLPOST,
6598 buf->b_fname, buf->b_fname, FALSE, buf); 6595 buf->b_fname, buf->b_fname, FALSE, buf);
6599 #endif 6596 #endif
6600 #ifdef FEAT_GUI 6597 #ifdef FEAT_GUI
6601 /* restore this in case an autocommand has set it; it would break 6598 /* restore this in case an autocommand has set it; it would break