aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/hardcopy.c
diff options
context:
space:
mode:
authorMatthieu Coudron <mattator@gmail.com>2020-04-12 20:37:57 +0200
committerGitHub <noreply@github.com>2020-04-12 20:37:57 +0200
commit46fdad255ead9ca484a6e512efe13b379b8fc8ab (patch)
tree9d0ecdf08a98c7ac179ebf93a3f2e3d6c53fec33 /src/nvim/hardcopy.c
parent1f56f9a4b32c7d7aebafea226c148e9ed8bbabdb (diff)
parent53fdd76181d2d1834aa38f4b47aa36f844d1e43f (diff)
downloadrneovim-46fdad255ead9ca484a6e512efe13b379b8fc8ab.tar.gz
rneovim-46fdad255ead9ca484a6e512efe13b379b8fc8ab.tar.bz2
rneovim-46fdad255ead9ca484a6e512efe13b379b8fc8ab.zip
Merge pull request #12033 from janlazo/vim-8.1.1313
[RFC]vim-patch:8.1.{1313,1567,1568}
Diffstat (limited to 'src/nvim/hardcopy.c')
-rw-r--r--src/nvim/hardcopy.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/nvim/hardcopy.c b/src/nvim/hardcopy.c
index cb5c5338a1..6e241feab2 100644
--- a/src/nvim/hardcopy.c
+++ b/src/nvim/hardcopy.c
@@ -2416,9 +2416,7 @@ static int prt_add_resource(struct prt_ps_resource_S *resource)
int mch_print_begin(prt_settings_T *psettings)
{
- time_t now;
int bbox[4];
- char *p_time;
double left;
double right;
double top;
@@ -2442,10 +2440,10 @@ int mch_print_begin(prt_settings_T *psettings)
}
prt_dsc_textline("For", buffer);
prt_dsc_textline("Creator", longVersion);
- /* Note: to ensure Clean8bit I don't think we can use LC_TIME */
- now = time(NULL);
- p_time = ctime(&now);
- /* Note: ctime() adds a \n so we have to remove it :-( */
+ // Note: to ensure Clean8bit I don't think we can use LC_TIME
+ char ctime_buf[50];
+ char *p_time = os_ctime(ctime_buf, sizeof(ctime_buf));
+ // Note: os_ctime() adds a \n so we have to remove it :-(
p = vim_strchr((char_u *)p_time, '\n');
if (p != NULL)
*p = NUL;