summaryrefslogtreecommitdiff
path: root/src/terminal.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-07-26 21:29:34 +0200
committerBram Moolenaar <Bram@vim.org>2017-07-26 21:29:34 +0200
commita1b5b0928118b135f9917679c0da28175c845140 (patch)
treea4084145db9365e459794a3c320ff63c1b154ba8 /src/terminal.c
parentf0a521f4f76904edb74e182c12732189b347ff68 (diff)
downloadvim-git-a1b5b0928118b135f9917679c0da28175c845140.tar.gz
patch 8.0.0777: compiler warnings with 64 bit compilerv8.0.0777
Problem: Compiler warnings with 64 bit compiler. Solution: Add type casts. (Mike Williams)
Diffstat (limited to 'src/terminal.c')
-rw-r--r--src/terminal.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/terminal.c b/src/terminal.c
index 9833a43b7..4cc755c0c 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -35,6 +35,7 @@
* TODO:
* - include functions from #1871
* - do not store terminal buffer in viminfo. Or prefix term:// ?
+ * - Make CTRL-W . send CTRL-W to terminal?
* - Add a scrollback buffer (contains lines to scroll off the top).
* Can use the buf_T lines, store attributes somewhere else?
* - When the job ends:
@@ -204,7 +205,7 @@ ex_terminal(exarg_T *eap)
{
int i;
size_t len = STRLEN(cmd) + 10;
- char_u *p = alloc(len);
+ char_u *p = alloc((int)len);
for (i = 1; p != NULL; ++i)
{
@@ -301,7 +302,7 @@ term_write_job_output(term_T *term, char_u *msg, size_t len)
{
if (*p == NL)
break;
- p += utf_ptr2len_len(p, len - (p - msg));
+ p += utf_ptr2len_len(p, (int)(len - (p - msg)));
}
len_now = p - msg - done;
vterm_input_write(vterm, (char *)msg + done, len_now);
@@ -453,7 +454,7 @@ term_convert_key(int c, char *buf)
vterm_keyboard_unichar(vterm, c, mod);
/* Read back the converted escape sequence. */
- return vterm_output_read(vterm, buf, KEY_BUF_LEN);
+ return (int)vterm_output_read(vterm, buf, KEY_BUF_LEN);
}
/*
@@ -540,7 +541,7 @@ terminal_loop(void)
if (len > 0)
/* TODO: if FAIL is returned, stop? */
channel_send(curbuf->b_term->tl_job->jv_channel, PART_IN,
- (char_u *)buf, len, NULL);
+ (char_u *)buf, (int)len, NULL);
}
}
@@ -1056,7 +1057,7 @@ term_get_status_text(term_T *term)
else
txt = (char_u *)_("finished");
len = 9 + STRLEN(term->tl_buffer->b_fname) + STRLEN(txt);
- term->tl_status_text = alloc(len);
+ term->tl_status_text = alloc((int)len);
if (term->tl_status_text != NULL)
vim_snprintf((char *)term->tl_status_text, len, "%s [%s]",
term->tl_buffer->b_fname, txt);