0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

updated for version 7.0023

This commit is contained in:
Bram Moolenaar
2004-12-19 22:46:22 +00:00
parent 46c9c73de8
commit 1cd871b534
76 changed files with 2397 additions and 1391 deletions

View File

@@ -2228,11 +2228,12 @@ main_loop(cmdwin)
getout_preserve_modified(exitval)
int exitval;
{
#if defined(UNIX)
/* Ignore SIGHUP, because a dropped connection may make Vim exit and then
* get a SIGHUP while exiting, which causes various reentrent problems. */
# if defined(SIGHUP) && defined(SIG_IGN)
/* Ignore SIGHUP, because a dropped connection causes a read error, which
* makes Vim exit and then handling SIGHUP causes various reentrance
* problems. */
signal(SIGHUP, SIG_IGN);
#endif
# endif
ml_close_notmod(); /* close all not-modified buffers */
ml_sync_all(FALSE, FALSE); /* preserve all swap files */
@@ -3220,6 +3221,42 @@ eval_client_expr_to_string(expr)
return res;
}
/*
* If conversion is needed, convert "data" from "client_enc" to 'encoding' and
* return an allocated string. Otherwise return "data".
* "*tofree" is set to the result when it needs to be freed later.
*/
/*ARGSUSED*/
char_u *
serverConvert(client_enc, data, tofree)
char_u *client_enc;
char_u *data;
char_u **tofree;
{
char_u *res = data;
*tofree = NULL;
# ifdef FEAT_MBYTE
if (client_enc != NULL && p_enc != NULL)
{
vimconv_T vimconv;
vimconv.vc_type = CONV_NONE;
if (convert_setup(&vimconv, client_enc, p_enc) != FAIL
&& vimconv.vc_type != CONV_NONE)
{
res = string_convert(&vimconv, data, NULL);
if (res == NULL)
res = data;
else
*tofree = res;
}
convert_setup(&vimconv, NULL, NULL);
}
# endif
return res;
}
/*
* Make our basic server name: use the specified "arg" if given, otherwise use