forked from aniani/vim
updated for version 7.0041
This commit is contained in:
27
src/misc1.c
27
src/misc1.c
@@ -3731,12 +3731,10 @@ vim_getenv(name, mustfree)
|
|||||||
didset_vimruntime = TRUE;
|
didset_vimruntime = TRUE;
|
||||||
#ifdef FEAT_GETTEXT
|
#ifdef FEAT_GETTEXT
|
||||||
{
|
{
|
||||||
char_u *buf = alloc((unsigned int)STRLEN(p) + 6);
|
char_u *buf = concat_str(p, (char_u *)"/lang");
|
||||||
|
|
||||||
if (buf != NULL)
|
if (buf != NULL)
|
||||||
{
|
{
|
||||||
STRCPY(buf, p);
|
|
||||||
STRCAT(buf, "/lang");
|
|
||||||
bindtextdomain(VIMPACKAGE, (char *)buf);
|
bindtextdomain(VIMPACKAGE, (char *)buf);
|
||||||
vim_free(buf);
|
vim_free(buf);
|
||||||
}
|
}
|
||||||
@@ -4303,6 +4301,29 @@ concat_fnames(fname1, fname2, sep)
|
|||||||
return dest;
|
return dest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(FEAT_EVAL) || defined(FEAT_GETTEXT) || defined(PROTO)
|
||||||
|
/*
|
||||||
|
* Concatenate two strings and return the result in allocated memory.
|
||||||
|
* Returns NULL when out of memory.
|
||||||
|
*/
|
||||||
|
char_u *
|
||||||
|
concat_str(str1, str2)
|
||||||
|
char_u *str1;
|
||||||
|
char_u *str2;
|
||||||
|
{
|
||||||
|
char_u *dest;
|
||||||
|
size_t l = STRLEN(str1);
|
||||||
|
|
||||||
|
dest = alloc((unsigned)(l + STRLEN(str2) + 1L));
|
||||||
|
if (dest != NULL)
|
||||||
|
{
|
||||||
|
STRCPY(dest, str1);
|
||||||
|
STRCPY(dest + l, str2);
|
||||||
|
}
|
||||||
|
return dest;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add a path separator to a file name, unless it already ends in a path
|
* Add a path separator to a file name, unless it already ends in a path
|
||||||
* separator.
|
* separator.
|
||||||
|
Reference in New Issue
Block a user