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/if_cscope.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/if_cscope.c') diff --git a/src/nvim/if_cscope.c b/src/nvim/if_cscope.c index 9ce0eb7fa0..1b7202dbab 100644 --- a/src/nvim/if_cscope.c +++ b/src/nvim/if_cscope.c @@ -1044,7 +1044,7 @@ static int cs_find_common(char *opt, char *pat, int forceit, int verbose, int us if (qfpos != NULL && *qfpos != '0' && totmatches > 0) { /* fill error list */ FILE *f; - char_u *tmp = vim_tempname('c'); + char_u *tmp = vim_tempname(); qf_info_T *qi = NULL; win_T *wp = NULL; -- 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/if_cscope.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/if_cscope.c') diff --git a/src/nvim/if_cscope.c b/src/nvim/if_cscope.c index 1b7202dbab..9e07a60ee1 100644 --- a/src/nvim/if_cscope.c +++ b/src/nvim/if_cscope.c @@ -28,6 +28,7 @@ #include "nvim/quickfix.h" #include "nvim/strings.h" #include "nvim/tag.h" +#include "nvim/tempfile.h" #include "nvim/ui.h" #include "nvim/window.h" #include "nvim/os/os.h" -- cgit