Refactor vim_tempname

- temp_count is uint32_t now instead of long because it supposed to be
  at most 999999999 (comment on line 5227) temporary files. The most
  probably it was a long for compatibility with systems where int is
  16-bit.
- Use "nvim" as prefix for temp folder name instead of "v"
- Remove unused parameter from vim_tempname
This commit is contained in:
Pavel Platto
2014-06-19 23:46:51 +03:00
committed by Nicolas Hillegeer
parent edd7a8c5dd
commit 29e0cd1571
12 changed files with 26 additions and 43 deletions

View File

@@ -661,9 +661,9 @@ void ex_diffupdate(exarg_T *eap)
}
// We need three temp file names.
char_u *tmp_orig = vim_tempname('o');
char_u *tmp_new = vim_tempname('n');
char_u *tmp_diff = vim_tempname('d');
char_u *tmp_orig = vim_tempname();
char_u *tmp_new = vim_tempname();
char_u *tmp_diff = vim_tempname();
if ((tmp_orig == NULL) || (tmp_new == NULL) || (tmp_diff == NULL)) {
goto theend;
@@ -852,9 +852,9 @@ void ex_diffpatch(exarg_T *eap)
#endif // ifdef UNIX
// We need two temp file names.
// Name of original temp file.
char_u *tmp_orig = vim_tempname('o');
char_u *tmp_orig = vim_tempname();
// Name of patched temp file.
char_u *tmp_new = vim_tempname('n');
char_u *tmp_new = vim_tempname();
if ((tmp_orig == NULL) || (tmp_new == NULL)) {
goto theend;