summaryrefslogtreecommitdiffstats
path: root/src/if_sniff.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-05-19 20:53:52 +0000
committerBram Moolenaar <Bram@vim.org>2005-05-19 20:53:52 +0000
commit9c13b359b496c5268702776105a9f87b269e84f3 (patch)
treed010b277d0d66dadbe78a5d80b164ef0d79a49c2 /src/if_sniff.c
parent34cdc3e32917a3812a8ec4369c64ef3e35243cfd (diff)
updated for version 7.0073
Diffstat (limited to 'src/if_sniff.c')
-rw-r--r--src/if_sniff.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/if_sniff.c b/src/if_sniff.c
index 4cb0bee246..7730e5bdc4 100644
--- a/src/if_sniff.c
+++ b/src/if_sniff.c
@@ -817,14 +817,15 @@ HandleSniffRequest(buffer)
vi_open_file(file);
else if (buf!=curbuf)
{
- sprintf(VICommand, SelectBuf, file);
+ vim_snprintf(VICommand, sizeof(VICommand), SelectBuf, file);
vi_exec_cmd(VICommand);
}
if (command == 'o')
vi_set_cursor_pos((long)position);
else
{
- sprintf(VICommand, GotoLine, (int)position);
+ vim_snprintf(VICommand, sizeof(VICommand), GotoLine,
+ (int)position);
vi_exec_cmd(VICommand);
}
checkpcmark(); /* [mark.c] */
@@ -853,7 +854,7 @@ HandleSniffRequest(buffer)
buf = vi_find_buffer(file);
if (buf && !buf->b_changed) /* delete buffer only if not modified */
{
- sprintf(VICommand, DeleteBuf, file);
+ vim_snprintf(VICommand, sizeof(VICommand), DeleteBuf, file);
vi_exec_cmd(VICommand);
}
vi_open_file(new_path);
@@ -875,7 +876,8 @@ HandleSniffRequest(buffer)
buf->b_flags |= BF_CHECK_RO + BF_NEVERLOADED;
if (writable && !buf->b_changed)
{
- sprintf(VICommand, UnloadBuf, file);
+ vim_snprintf(VICommand, sizeof(VICommand), UnloadBuf,
+ file);
vi_exec_cmd(VICommand);
}
}
@@ -895,7 +897,7 @@ HandleSniffRequest(buffer)
if (tab_width > 0 && tab_width <= 16)
{
- sprintf(VICommand, SetTab, tab_width);
+ vim_snprintf(VICommand, sizeof(VICommand), SetTab, tab_width);
vi_exec_cmd(VICommand);
}
break;
@@ -1030,7 +1032,7 @@ SendRequest(command, symbol)
}
if (symbol)
- sprintf(cmdstr, "%c%s%s%ld%s%s\n",
+ vim_snprintf(cmdstr, sizeof(cmdstr), "%c%s%s%ld%s%s\n",
command->cmd_code,
buffer_name,
sniff_rq_sep,
@@ -1039,7 +1041,8 @@ SendRequest(command, symbol)
symbol
);
else
- sprintf(cmdstr, "%c%s\n", command->cmd_code, buffer_name);
+ vim_snprintf(cmdstr, sizeof(cmdstr), "%c%s\n",
+ command->cmd_code, buffer_name);
}
else /* simple request */
{
@@ -1051,7 +1054,8 @@ SendRequest(command, symbol)
{
if ((cmd_type & NEED_SYMBOL) && !(cmd_type & EMPTY_SYMBOL))
{
- sprintf(msgtxt, "%s: %s", _(command->cmd_msg), symbol);
+ vim_snprintf(msgtxt, sizeof(msgtxt), "%s: %s",
+ _(command->cmd_msg), symbol);
vi_msg(msgtxt);
}
else