From 29e0cd1571b773feb7fd61118930cdac7d83e38c Mon Sep 17 00:00:00 2001 From: Pavel Platto Date: Thu, 19 Jun 2014 23:46:51 +0300 Subject: 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 --- src/nvim/os_unix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/os_unix.c') diff --git a/src/nvim/os_unix.c b/src/nvim/os_unix.c index 2c657bebeb..239d7d81db 100644 --- a/src/nvim/os_unix.c +++ b/src/nvim/os_unix.c @@ -1034,7 +1034,7 @@ int mch_expand_wildcards(int num_pat, char_u **pat, int *num_file, /* * get a name for the temp file */ - if ((tempname = vim_tempname('o')) == NULL) { + if ((tempname = vim_tempname()) == NULL) { EMSG(_(e_notmp)); return FAIL; } -- cgit From 286ce271e730a2e6883c244912b36bca007f6ddc Mon Sep 17 00:00:00 2001 From: Pavel Platto Date: Sun, 22 Jun 2014 13:03:08 +0300 Subject: Extract `tempfile` module from fileio Though this module is relatively small it has very clear boundaries. The last argument for extracting `tempfile` was the errors which I got when I was writing unittests for it: `cimport './src/nvim/fileio.h'` does not work for some reason. --- src/nvim/os_unix.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/os_unix.c') diff --git a/src/nvim/os_unix.c b/src/nvim/os_unix.c index 239d7d81db..4a0fbf5c18 100644 --- a/src/nvim/os_unix.c +++ b/src/nvim/os_unix.c @@ -52,6 +52,7 @@ #include "nvim/screen.h" #include "nvim/strings.h" #include "nvim/syntax.h" +#include "nvim/tempfile.h" #include "nvim/term.h" #include "nvim/ui.h" #include "nvim/os/os.h" -- cgit