Mercurial > vim
comparison src/undo.c @ 5704:47a673b20e49 v7.4.197
updated for version 7.4.197
Problem: Various problems on VMS.
Solution: Fix several VMS problems. (Zoltan Arpadffy)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 12 Mar 2014 16:51:55 +0100 |
parents | be61f315eafe |
children | 50dbef5e774a |
comparison
equal
deleted
inserted
replaced
5703:69b2ec0c96cc | 5704:47a673b20e49 |
---|---|
788 * "dir/name" -> "dir/.name.un~" */ | 788 * "dir/name" -> "dir/.name.un~" */ |
789 undo_file_name = vim_strnsave(ffname, (int)(STRLEN(ffname) + 5)); | 789 undo_file_name = vim_strnsave(ffname, (int)(STRLEN(ffname) + 5)); |
790 if (undo_file_name == NULL) | 790 if (undo_file_name == NULL) |
791 break; | 791 break; |
792 p = gettail(undo_file_name); | 792 p = gettail(undo_file_name); |
793 #ifdef VMS | |
794 /* VMS can not handle more than one dot in the filenames | |
795 * use "dir/name" -> "dir/_un_name" - add _un_ | |
796 * at the beginning to keep the extension */ | |
797 mch_memmove(p + 4, p, STRLEN(p) + 1); | |
798 mch_memmove(p, "_un_", 4); | |
799 | |
800 #else | |
801 /* Use same directory as the ffname, | |
802 * "dir/name" -> "dir/.name.un~" */ | |
793 mch_memmove(p + 1, p, STRLEN(p) + 1); | 803 mch_memmove(p + 1, p, STRLEN(p) + 1); |
794 *p = '.'; | 804 *p = '.'; |
795 STRCAT(p, ".un~"); | 805 STRCAT(p, ".un~"); |
806 #endif | |
796 } | 807 } |
797 else | 808 else |
798 { | 809 { |
799 dir_name[dir_len] = NUL; | 810 dir_name[dir_len] = NUL; |
800 if (mch_isdir(dir_name)) | 811 if (mch_isdir(dir_name)) |