diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-10-10 14:20:13 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-10-10 14:20:13 +0000 |
commit | 31e97bf0ee3149f11826032817c0c84cbca3a65c (patch) | |
tree | 8ec862e4036c592282614189778c17ac869bfeb4 /src/memline.c | |
parent | f3442e7274af69e95a1c68d346c7a01de5190424 (diff) | |
download | vim-31e97bf0ee3149f11826032817c0c84cbca3a65c.zip |
updated for version 7.0-127
Diffstat (limited to 'src/memline.c')
-rw-r--r-- | src/memline.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/memline.c b/src/memline.c index 6ea2dc5da..5c55e70f2 100644 --- a/src/memline.c +++ b/src/memline.c @@ -1633,6 +1633,7 @@ swapfile_info(fname) int fd; struct block0 b0; time_t x = (time_t)0; + char *p; #ifdef UNIX char_u uname[B0_UNAME_SIZE]; #endif @@ -1652,8 +1653,11 @@ swapfile_info(fname) #endif MSG_PUTS(_(" dated: ")); x = st.st_mtime; /* Manx C can't do &st.st_mtime */ - MSG_PUTS(ctime(&x)); /* includes '\n' */ - + p = ctime(&x); /* includes '\n' */ + if (p == NULL) + MSG_PUTS("(invalid)\n"); + else + MSG_PUTS(p); } /* @@ -3652,6 +3656,7 @@ attention_message(buf, fname) { struct stat st; time_t x, sx; + char *p; ++no_wait_return; (void)EMSG(_("E325: ATTENTION")); @@ -3666,7 +3671,11 @@ attention_message(buf, fname) { MSG_PUTS(_(" dated: ")); x = st.st_mtime; /* Manx C can't do &st.st_mtime */ - MSG_PUTS(ctime(&x)); + p = ctime(&x); /* includes '\n' */ + if (p == NULL) + MSG_PUTS("(invalid)\n"); + else + MSG_PUTS(p); if (sx != 0 && x > sx) MSG_PUTS(_(" NEWER than swap file!\n")); } |