aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os
diff options
context:
space:
mode:
authorDundar Göc <gocdundar@gmail.com>2022-08-26 23:11:25 +0200
committerdundargoc <gocdundar@gmail.com>2022-09-11 13:28:59 +0200
commit3ff46544c9872b4161fd098569c30b55fe3abd36 (patch)
tree589b9ebdd86fde7e200b6235596ce6feac976122 /src/nvim/os
parent4638fcf4fb688fa548b8ce337ec3b7c1327fbfe9 (diff)
downloadrneovim-3ff46544c9872b4161fd098569c30b55fe3abd36.tar.gz
rneovim-3ff46544c9872b4161fd098569c30b55fe3abd36.tar.bz2
rneovim-3ff46544c9872b4161fd098569c30b55fe3abd36.zip
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/os')
-rw-r--r--src/nvim/os/env.c6
-rw-r--r--src/nvim/os/shell.c8
-rw-r--r--src/nvim/os/users.c2
3 files changed, 8 insertions, 8 deletions
diff --git a/src/nvim/os/env.c b/src/nvim/os/env.c
index 34ed3aaf6e..bcc0fba8d0 100644
--- a/src/nvim/os/env.c
+++ b/src/nvim/os/env.c
@@ -451,7 +451,7 @@ void init_homedir(void)
var = NULL;
const char *exp = os_getenv(os_buf);
if (exp != NULL && *exp != NUL
- && STRLEN(exp) + STRLEN(p) < MAXPATHL) {
+ && strlen(exp) + strlen(p) < MAXPATHL) {
vim_snprintf(os_buf, MAXPATHL, "%s%s", exp, p + 1);
var = os_buf;
}
@@ -800,7 +800,7 @@ static char *vim_version_dir(const char *vimdir)
/// @return The new pend including dirname or just pend
static char *remove_tail(char *path, char *pend, char *dirname)
{
- size_t len = STRLEN(dirname);
+ size_t len = strlen(dirname);
char *new_tail = pend - len - 1;
if (new_tail >= path
@@ -1146,7 +1146,7 @@ char *home_replace_save(buf_T *buf, const char *src)
{
size_t len = 3; // space for "~/" and trailing NUL
if (src != NULL) { // just in case
- len += STRLEN(src);
+ len += strlen(src);
}
char *dst = xmalloc(len);
home_replace(buf, src, dst, len, true);
diff --git a/src/nvim/os/shell.c b/src/nvim/os/shell.c
index cf66899493..ca3e32e871 100644
--- a/src/nvim/os/shell.c
+++ b/src/nvim/os/shell.c
@@ -178,7 +178,7 @@ int os_expand_wildcards(int num_pat, char **pat, int *num_file, char ***file, in
// STYLE_ECHO: space separated.
// A shell we don't know, stay safe and use "echo".
if (num_pat == 1 && *pat[0] == '`'
- && (len = STRLEN(pat[0])) > 2
+ && (len = strlen(pat[0])) > 2
&& *(pat[0] + len - 1) == '`') {
shell_style = STYLE_BT;
} else if ((len = STRLEN(p_sh)) >= 3) {
@@ -198,7 +198,7 @@ int os_expand_wildcards(int num_pat, char **pat, int *num_file, char ***file, in
// Worst case: "unset nonomatch; print -N >" plus two is 29
len = STRLEN(tempname) + 29;
if (shell_style == STYLE_VIMGLOB) {
- len += STRLEN(sh_vimglob_func);
+ len += strlen(sh_vimglob_func);
}
for (i = 0; i < num_pat; i++) {
@@ -519,7 +519,7 @@ int os_expand_wildcards(int num_pat, char **pat, int *num_file, char ***file, in
continue;
}
- p = xmalloc(STRLEN((*file)[i]) + 1 + dir);
+ p = xmalloc(strlen((*file)[i]) + 1 + dir);
STRCPY(p, (*file)[i]);
if (dir) {
add_pathsep((char *)p); // add '/' to a directory name
@@ -1319,7 +1319,7 @@ static char *shell_xescape_xquote(const char *cmd)
if (*p_sxe != NUL && strcmp(p_sxq, "(") == 0) {
ecmd = (char *)vim_strsave_escaped_ext((char_u *)cmd, p_sxe, '^', false);
}
- size_t ncmd_size = strlen(ecmd) + STRLEN(p_sxq) * 2 + 1;
+ size_t ncmd_size = strlen(ecmd) + strlen(p_sxq) * 2 + 1;
char *ncmd = xmalloc(ncmd_size);
// When 'shellxquote' is ( append ).
diff --git a/src/nvim/os/users.c b/src/nvim/os/users.c
index 0c662e8843..7b0f3ddaed 100644
--- a/src/nvim/os/users.c
+++ b/src/nvim/os/users.c
@@ -210,7 +210,7 @@ char *get_users(expand_T *xp, int idx)
/// 2 is name fully matches a user name.
int match_user(char *name)
{
- int n = (int)STRLEN(name);
+ int n = (int)strlen(name);
int result = 0;
init_users();