Lines Matching refs:len
32 int l, len; in get_short_pathname() local
36 len = MAXPATHL; in get_short_pathname()
37 newbuf = malloc(len * sizeof(*newbuf)); in get_short_pathname()
48 l = GetShortPathNameW(wfname, newbuf, len); in get_short_pathname()
49 if (l > len - 1) in get_short_pathname()
111 int old_len, len; in shortpath_for_invalid_fname() local
128 len = 0; in shortpath_for_invalid_fname()
144 len = (int)STRLEN(short_fname) + 1; in shortpath_for_invalid_fname()
145 if (get_short_pathname(&short_fname, &pbuf_unused, &len) == FAIL) in shortpath_for_invalid_fname()
152 if (len > 0) in shortpath_for_invalid_fname()
159 if (len > 0) in shortpath_for_invalid_fname()
168 new_len = len + sfx_len; in shortpath_for_invalid_fname()
189 vim_strncpy(save_fname, short_fname, len); in shortpath_for_invalid_fname()
194 vim_strncpy(*fname + len, endp, sfx_len); in shortpath_for_invalid_fname()
215 int sepcount, len, tflen; in shortpath_for_partial() local
234 len = tflen = (int)STRLEN(tfname); in shortpath_for_partial()
236 if (get_short_pathname(&tfname, &pbuf, &len) == FAIL) in shortpath_for_partial()
239 if (len == 0) in shortpath_for_partial()
244 len = tflen; in shortpath_for_partial()
245 if (shortpath_for_invalid_fname(&tfname, &pbuf, &len) == FAIL) in shortpath_for_partial()
250 for (p = tfname + len - 1; p >= tfname; --p) in shortpath_for_partial()
1036 int len = 0; in f_fnamemodify() local
1051 len = (int)STRLEN(fname); in f_fnamemodify()
1053 (void)modify_fname(mods, FALSE, &usedlen, &fname, &fbuf, &len); in f_fnamemodify()
1060 rettv->vval.v_string = vim_strnsave(fname, len); in f_fnamemodify()
1803 long_u len = p - start; in read_file_or_blob() local
1808 while (len > 0 && start[len - 1] == '\r') in read_file_or_blob()
1809 --len; in read_file_or_blob()
1811 if (len == 0) in read_file_or_blob()
1816 s = vim_strnsave(start, len); in read_file_or_blob()
1822 if ((s = vim_realloc(prev, prevlen + len + 1)) != NULL) in read_file_or_blob()
1824 mch_memmove(s + prevlen, start, len); in read_file_or_blob()
1825 s[prevlen + len] = NUL; in read_file_or_blob()
1832 do_outofmem_msg((long_u) prevlen + len + 1); in read_file_or_blob()
2009 int len; in f_resolve() local
2023 len = STRLEN(p); in f_resolve()
2024 if (len > 1 && after_pathsep(p, p + len)) in f_resolve()
2027 p[len - 1] = NUL; // the trailing slash breaks readlink() in f_resolve()
2050 len = readlink((char *)p, (char *)buf, MAXPATHL); in f_resolve()
2051 if (len <= 0) in f_resolve()
2053 buf[len] = NUL; in f_resolve()
2119 len = q - remain - (*q != NUL); in f_resolve()
2120 cpy = vim_strnsave(p, STRLEN(p) + len); in f_resolve()
2123 STRNCAT(cpy, remain, len); in f_resolve()
2585 size_t len; in home_replace() local
2656 len = dirlen; in home_replace()
2659 if ( len in home_replace()
2660 && fnamencmp(src, p, len) == 0 in home_replace()
2661 && (vim_ispathsep(src[len]) in home_replace()
2662 || (!one && (src[len] == ',' || src[len] == ' ')) in home_replace()
2663 || src[len] == NUL)) in home_replace()
2665 src += len; in home_replace()
2677 len = envlen; in home_replace()
2705 unsigned len; in home_replace_save() local
2707 len = 3; // space for "~/" and trailing NUL in home_replace_save()
2709 len += (unsigned)STRLEN(src); in home_replace_save()
2710 dst = alloc(len); in home_replace_save()
2712 home_replace(buf, src, dst, len, TRUE); in home_replace_save()
2970 vim_fnamencmp(char_u *x, char_u *y, size_t len) in vim_fnamencmp() argument
2978 while (len > 0) in vim_fnamencmp()
2987 len -= mb_ptr2len(px); in vim_fnamencmp()
2991 if (len == 0) in vim_fnamencmp()
2996 return MB_STRNICMP(x, y, len); in vim_fnamencmp()
2997 return STRNCMP(x, y, len); in vim_fnamencmp()
3349 int len; in dos_expandpath() local
3398 len = (*mb_ptr2len)(path_end); in dos_expandpath()
3399 STRNCPY(p, path_end, len); in dos_expandpath()
3400 p += len; in dos_expandpath()
3401 path_end += len; in dos_expandpath()
3498 len = (int)STRLEN(buf); in dos_expandpath()
3505 STRCPY(buf + len, "/**"); in dos_expandpath()
3506 STRCPY(buf + len + 3, path_end); in dos_expandpath()
3508 (void)dos_expandpath(gap, buf, len + 1, flags, TRUE); in dos_expandpath()
3512 STRCPY(buf + len, path_end); in dos_expandpath()
3517 (void)dos_expandpath(gap, buf, len + 1, flags, FALSE); in dos_expandpath()
3524 backslash_halve(buf + len + 1); in dos_expandpath()
3594 int len; in unix_expandpath() local
3642 len = (*mb_ptr2len)(path_end); in unix_expandpath()
3643 STRNCPY(p, path_end, len); in unix_expandpath()
3644 p += len; in unix_expandpath()
3645 path_end += len; in unix_expandpath()
3729 len = STRLEN(buf); in unix_expandpath()
3735 STRCPY(buf + len, "/**"); in unix_expandpath()
3736 STRCPY(buf + len + 3, path_end); in unix_expandpath()
3738 (void)unix_expandpath(gap, buf, len + 1, flags, TRUE); in unix_expandpath()
3742 STRCPY(buf + len, path_end); in unix_expandpath()
3747 (void)unix_expandpath(gap, buf, len + 1, flags, FALSE); in unix_expandpath()
3756 backslash_halve(buf + len + 1); in unix_expandpath()
4188 int len, in vim_FullName() argument
4200 retval = mch_FullName(fname, buf, len, force); in vim_FullName()
4204 vim_strncpy(buf, fname, len - 1); in vim_FullName()