summaryrefslogtreecommitdiff
path: root/src/misc1.c
diff options
context:
space:
mode:
authorYegappan Lakshmanan <yegappan@yahoo.com>2021-07-10 21:29:18 +0200
committerBram Moolenaar <Bram@vim.org>2021-07-10 21:29:18 +0200
commita2438132a675be4dde3acbdf03ba1fdb2f09427c (patch)
tree973f677bea21a7f41bbb9d49ad0038550e6e665b /src/misc1.c
parent31e21766d6fb0a386e15ccc8c2192f6a3a210f53 (diff)
downloadvim-git-a2438132a675be4dde3acbdf03ba1fdb2f09427c.tar.gz
patch 8.2.3139: functions for string manipulation are spread outv8.2.3139
Problem: Functions for string manipulation are spread out. Solution: Move string related functions to a new source file. (Yegappan Lakshmanan, closes #8470)
Diffstat (limited to 'src/misc1.c')
-rw-r--r--src/misc1.c26
1 files changed, 2 insertions, 24 deletions
diff --git a/src/misc1.c b/src/misc1.c
index 7cac06b92..d112d9b95 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -695,7 +695,8 @@ f_mode(typval_T *argvars, typval_T *rettv)
if (finish_op)
{
buf[1] = 'o';
- // to be able to detect force-linewise/blockwise/characterwise operations
+ // to be able to detect force-linewise/blockwise/characterwise
+ // operations
buf[2] = motion_force;
}
else if (restart_edit == 'I' || restart_edit == 'R'
@@ -2099,29 +2100,6 @@ match_user(char_u *name)
return result;
}
-/*
- * Concatenate two strings and return the result in allocated memory.
- * Returns NULL when out of memory.
- */
- char_u *
-concat_str(char_u *str1, char_u *str2)
-{
- char_u *dest;
- size_t l = str1 == NULL ? 0 : STRLEN(str1);
-
- dest = alloc(l + (str2 == NULL ? 0 : STRLEN(str2)) + 1L);
- if (dest != NULL)
- {
- if (str1 == NULL)
- *dest = NUL;
- else
- STRCPY(dest, str1);
- if (str2 != NULL)
- STRCPY(dest + l, str2);
- }
- return dest;
-}
-
static void
prepare_to_exit(void)
{