Mercurial > vim
comparison src/ex_getln.c @ 1685:7015ddf81055 v7.2b.018
updated for version 7.2b-018
author | vimboss |
---|---|
date | Thu, 24 Jul 2008 18:29:37 +0000 |
parents | 82b5078be2dd |
children | 3c6417b7e6ef |
comparison
equal
deleted
inserted
replaced
1684:fc8bf5d4051a | 1685:7015ddf81055 |
---|---|
3705 char_u * | 3705 char_u * |
3706 vim_strsave_fnameescape(fname, shell) | 3706 vim_strsave_fnameescape(fname, shell) |
3707 char_u *fname; | 3707 char_u *fname; |
3708 int shell; | 3708 int shell; |
3709 { | 3709 { |
3710 char_u *p; | |
3710 #ifdef BACKSLASH_IN_FILENAME | 3711 #ifdef BACKSLASH_IN_FILENAME |
3711 char_u buf[20]; | 3712 char_u buf[20]; |
3712 int j = 0; | 3713 int j = 0; |
3713 char_u *p; | |
3714 | 3714 |
3715 /* Don't escape '[' and '{' if they are in 'isfname'. */ | 3715 /* Don't escape '[' and '{' if they are in 'isfname'. */ |
3716 for (p = PATH_ESC_CHARS; *p != NUL; ++p) | 3716 for (p = PATH_ESC_CHARS; *p != NUL; ++p) |
3717 if ((*p != '[' && *p != '{') || !vim_isfilec(*p)) | 3717 if ((*p != '[' && *p != '{') || !vim_isfilec(*p)) |
3718 buf[j++] = *p; | 3718 buf[j++] = *p; |
3719 buf[j] = NUL; | 3719 buf[j] = NUL; |
3720 return vim_strsave_escaped(fname, buf); | 3720 return vim_strsave_escaped(fname, buf); |
3721 #else | 3721 #else |
3722 return vim_strsave_escaped(fname, shell ? SHELL_ESC_CHARS : PATH_ESC_CHARS); | 3722 p = vim_strsave_escaped(fname, shell ? SHELL_ESC_CHARS : PATH_ESC_CHARS); |
3723 if (shell && csh_like_shell() && p != NULL) | |
3724 { | |
3725 char_u *s; | |
3726 | |
3727 /* For csh and similar shells need to put two backslashes before '!'. | |
3728 * One is taken by Vim, one by the shell. */ | |
3729 s = vim_strsave_escaped(p, (char_u *)"!"); | |
3730 vim_free(p); | |
3731 p = s; | |
3732 } | |
3733 return p; | |
3723 #endif | 3734 #endif |
3724 } | 3735 } |
3725 | 3736 |
3726 /* | 3737 /* |
3727 * Put a backslash before the file name in "pp", which is in allocated memory. | 3738 * Put a backslash before the file name in "pp", which is in allocated memory. |
5958 win_T *wp; | 5969 win_T *wp; |
5959 int i; | 5970 int i; |
5960 linenr_T lnum; | 5971 linenr_T lnum; |
5961 int histtype; | 5972 int histtype; |
5962 garray_T winsizes; | 5973 garray_T winsizes; |
5974 #ifdef FEAT_AUTOCMD | |
5963 char_u typestr[2]; | 5975 char_u typestr[2]; |
5976 #endif | |
5964 int save_restart_edit = restart_edit; | 5977 int save_restart_edit = restart_edit; |
5965 int save_State = State; | 5978 int save_State = State; |
5966 int save_exmode = exmode_active; | 5979 int save_exmode = exmode_active; |
5967 #ifdef FEAT_RIGHTLEFT | 5980 #ifdef FEAT_RIGHTLEFT |
5968 int save_cmdmsg_rl = cmdmsg_rl; | 5981 int save_cmdmsg_rl = cmdmsg_rl; |