]> git.pld-linux.org Git - packages/vim.git/blob - 7.3.269
- new
[packages/vim.git] / 7.3.269
1 To: vim_dev@googlegroups.com
2 Subject: Patch 7.3.269
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 7.3.269
11 Problem:    'shellcmdflag' only works with one flag. 
12 Solution:   Split into multiple arguments. (Gary Johnson)
13 Files:      src/os_unix.c
14
15
16 *** ../vim-7.3.268/src/os_unix.c        2011-08-04 19:36:47.000000000 +0200
17 --- src/os_unix.c       2011-08-04 20:27:13.000000000 +0200
18 ***************
19 *** 3795,3802 ****
20 --- 3795,3804 ----
21       int               retval = -1;
22       char      **argv = NULL;
23       int               argc;
24 +     char_u    *p_shcf_copy = NULL;
25       int               i;
26       char_u    *p;
27 +     char_u    *s;
28       int               inquote;
29       int               pty_master_fd = -1;         /* for pty's */
30   # ifdef FEAT_GUI
31 ***************
32 *** 3855,3860 ****
33 --- 3857,3875 ----
34         }
35         if (argv == NULL)
36         {
37 +           /*
38 +            * Account for possible multiple args in p_shcf.
39 +            */
40 +           p = p_shcf;
41 +           for (;;)
42 +           {
43 +               p = skiptowhite(p);
44 +               if (*p == NUL)
45 +                   break;
46 +               ++argc;
47 +               p = skipwhite(p);
48 +           }
49
50             argv = (char **)alloc((unsigned)((argc + 4) * sizeof(char *)));
51             if (argv == NULL)       /* out of memory */
52                 goto error;
53 ***************
54 *** 3864,3870 ****
55       {
56         if (extra_shell_arg != NULL)
57             argv[argc++] = (char *)extra_shell_arg;
58 !       argv[argc++] = (char *)p_shcf;
59         argv[argc++] = (char *)cmd;
60       }
61       argv[argc] = NULL;
62 --- 3879,3901 ----
63       {
64         if (extra_shell_arg != NULL)
65             argv[argc++] = (char *)extra_shell_arg;
66
67 !       /* Break 'shellcmdflag' into white separated parts.  This doesn't
68 !        * handle quoted strings, they are very unlikely to appear. */
69 !       p_shcf_copy = alloc((unsigned)STRLEN(p_shcf) + 1);
70 !       if (p_shcf_copy == NULL)    /* out of memory */
71 !           goto error;
72 !       s = p_shcf_copy;
73 !       p = p_shcf;
74 !       while (*p != NUL)
75 !       {
76 !           argv[argc++] = (char *)s;
77 !           while (*p && *p != ' ' && *p != TAB)
78 !               *s++ = *p++;
79 !           *s++ = NUL;
80 !           p = skipwhite(p);
81 !       }
82
83         argv[argc++] = (char *)cmd;
84       }
85       argv[argc] = NULL;
86 ***************
87 *** 4677,4682 ****
88 --- 4708,4714 ----
89         }
90       }
91       vim_free(argv);
92 +     vim_free(p_shcf_copy);
93   
94   error:
95       if (!did_settmode)
96 *** ../vim-7.3.268/src/version.c        2011-08-04 19:36:47.000000000 +0200
97 --- src/version.c       2011-08-04 20:30:44.000000000 +0200
98 ***************
99 *** 711,712 ****
100 --- 711,714 ----
101   {   /* Add new patch number below this line */
102 + /**/
103 +     269,
104   /**/
105
106 -- 
107 Be nice to your kids...  they'll be the ones choosing your nursing home.
108
109  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
110 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
111 \\\  an exciting new programming language -- http://www.Zimbu.org        ///
112  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.089655 seconds and 3 git commands to generate.