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

@@ -1032,8 +1032,8 @@ do_filter (
curbuf->b_op_start.lnum = line1;
curbuf->b_op_end.lnum = line2;
curwin->w_cursor.lnum = line2;
} else if ((do_in && (itmp = vim_tempname('i')) == NULL)
|| (do_out && (otmp = vim_tempname('o')) == NULL)) {
} else if ((do_in && (itmp = vim_tempname()) == NULL)
|| (do_out && (otmp = vim_tempname()) == NULL)) {
EMSG(_(e_notmp));
goto filterend;
}
@@ -1601,7 +1601,7 @@ void write_viminfo(char_u *file, int forceit)
*/
if (fp_out == NULL) {
free(tempname);
if ((tempname = vim_tempname('o')) != NULL)
if ((tempname = vim_tempname()) != NULL)
fp_out = mch_fopen((char *)tempname, WRITEBIN);
}