Mercurial > vim
comparison src/main.c @ 43:f55897d6921d v7.0026
updated for version 7.0026
author | vimboss |
---|---|
date | Wed, 29 Dec 2004 21:03:02 +0000 |
parents | f529edb9bab3 |
children | 46d39f2eff86 |
comparison
equal
deleted
inserted
replaced
42:c75153d791d0 | 43:f55897d6921d |
---|---|
139 int input_isatty; /* is active input a terminal? */ | 139 int input_isatty; /* is active input a terminal? */ |
140 #ifdef MSWIN | 140 #ifdef MSWIN |
141 int full_path = FALSE; | 141 int full_path = FALSE; |
142 #endif | 142 #endif |
143 #ifdef FEAT_CLIENTSERVER | 143 #ifdef FEAT_CLIENTSERVER |
144 char_u *serverStr = NULL; | 144 char_u *serverStr = NULL; /* remote server command */ |
145 char_u *serverStrEnc = NULL; /* encoding of serverStr */ | |
145 char_u *serverName_arg = NULL; /* cmdline arg for server name */ | 146 char_u *serverName_arg = NULL; /* cmdline arg for server name */ |
146 int serverArg = FALSE; /* TRUE when argument for a server */ | 147 int serverArg = FALSE; /* TRUE when argument for a server */ |
147 char_u *servername = NULL; /* allocated name for our server */ | 148 char_u *servername = NULL; /* allocated name for our server */ |
148 #endif | 149 #endif |
149 #if (!defined(UNIX) && !defined(__EMX__)) || defined(ARCHIE) | 150 #if (!defined(UNIX) && !defined(__EMX__)) || defined(ARCHIE) |
376 serverInitMessaging(); | 377 serverInitMessaging(); |
377 # endif | 378 # endif |
378 | 379 |
379 /* | 380 /* |
380 * When a command server argument was found, execute it. This may | 381 * When a command server argument was found, execute it. This may |
381 * exit Vim when it was successful. | 382 * exit Vim when it was successful. Otherwise it's executed further |
383 * on. Remember the encoding used here in "serverStrEnc". | |
382 */ | 384 */ |
383 if (serverArg) | 385 if (serverArg) |
386 { | |
384 cmdsrv_main(&argc, argv, serverName_arg, &serverStr); | 387 cmdsrv_main(&argc, argv, serverName_arg, &serverStr); |
388 # ifdef FEAT_MBYTE | |
389 serverStrEnc = vim_strsave(p_enc); | |
390 # endif | |
391 } | |
385 | 392 |
386 /* If we're still running, get the name to register ourselves. | 393 /* If we're still running, get the name to register ourselves. |
387 * On Win32 can register right now, for X11 need to setup the | 394 * On Win32 can register right now, for X11 need to setup the |
388 * clipboard first, it's further down. */ | 395 * clipboard first, it's further down. */ |
389 servername = serverMakeName(serverName_arg, argv[0]); | 396 servername = serverMakeName(serverName_arg, argv[0]); |
1660 /* | 1667 /* |
1661 * Execute command ourselves if we're here because the send failed (or | 1668 * Execute command ourselves if we're here because the send failed (or |
1662 * else we would have exited above). | 1669 * else we would have exited above). |
1663 */ | 1670 */ |
1664 if (serverStr != NULL) | 1671 if (serverStr != NULL) |
1665 server_to_input_buf(serverStr); | 1672 { |
1673 server_to_input_buf(serverConvert(serverStrEnc, serverStr, &p)); | |
1674 vim_free(p); | |
1675 } | |
1666 #endif | 1676 #endif |
1667 | 1677 |
1668 /* | 1678 /* |
1669 * If "-" argument given: Read file from stdin. | 1679 * If "-" argument given: Read file from stdin. |
1670 * Do this before starting Raw mode, because it may change things that the | 1680 * Do this before starting Raw mode, because it may change things that the |