]> git.pld-linux.org Git - packages/vim.git/blob - 7.3.707
- add patches 7.3.619-743
[packages/vim.git] / 7.3.707
1 To: vim_dev@googlegroups.com
2 Subject: Patch 7.3.707
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.707 (after 7.3.701)
11 Problem:    Problems loading a library for a file name with non-latin
12             characters.
13 Solution:   Use wide system functions when possible. (Ken Takata)
14 Files:      src/os_win32.c, src/os_win32.h
15
16
17 *** ../vim-7.3.706/src/os_win32.c       2012-10-21 02:37:02.000000000 +0200
18 --- src/os_win32.c      2012-10-21 21:33:58.000000000 +0200
19 ***************
20 *** 287,313 ****
21       HINSTANCE
22   vimLoadLib(char *name)
23   {
24 !     HINSTANCE dll = NULL;
25 !     TCHAR old_dir[MAXPATHL];
26   
27       /* NOTE: Do not use mch_dirname() and mch_chdir() here, they may call
28        * vimLoadLib() recursively, which causes a stack overflow. */
29       if (exe_path == NULL)
30         get_exe_name();
31 !     if (exe_path != NULL && GetCurrentDirectory(MAXPATHL, old_dir) != 0)
32       {
33 !       /* Change directory to where the executable is, both to make sure we
34 !        * find a .dll there and to avoid looking for a .dll in the current
35 !        * directory. */
36 !       SetCurrentDirectory(exe_path);
37 !       dll = LoadLibrary(name);
38 !       SetCurrentDirectory(old_dir);
39 !     }
40 !     else
41 !     {
42 !       /* We are not able to change directory to where the executable is, try
43 !        * to load library anyway. */
44 !       dll = LoadLibrary(name);
45       }
46       return dll;
47   }
48 --- 287,326 ----
49       HINSTANCE
50   vimLoadLib(char *name)
51   {
52 !     HINSTANCE dll = NULL;
53 !     char      old_dir[MAXPATHL];
54   
55       /* NOTE: Do not use mch_dirname() and mch_chdir() here, they may call
56        * vimLoadLib() recursively, which causes a stack overflow. */
57       if (exe_path == NULL)
58         get_exe_name();
59 !     if (exe_path != NULL)
60       {
61 ! #ifdef FEAT_MBYTE
62 !       WCHAR old_dirw[MAXPATHL];
63
64 !       if (GetCurrentDirectoryW(MAXPATHL, old_dirw) != 0)
65 !       {
66 !           /* Change directory to where the executable is, both to make
67 !            * sure we find a .dll there and to avoid looking for a .dll
68 !            * in the current directory. */
69 !           SetCurrentDirectory(exe_path);
70 !           dll = LoadLibrary(name);
71 !           SetCurrentDirectoryW(old_dirw);
72 !           return dll;
73 !       }
74 !       /* Retry with non-wide function (for Windows 98). */
75 !       if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
76 ! #endif
77 !           if (GetCurrentDirectory(MAXPATHL, old_dir) != 0)
78 !           {
79 !               /* Change directory to where the executable is, both to make
80 !                * sure we find a .dll there and to avoid looking for a .dll
81 !                * in the current directory. */
82 !               SetCurrentDirectory(exe_path);
83 !               dll = LoadLibrary(name);
84 !               SetCurrentDirectory(old_dir);
85 !           }
86       }
87       return dll;
88   }
89 *** ../vim-7.3.706/src/os_win32.h       2011-08-10 17:07:56.000000000 +0200
90 --- src/os_win32.h      2012-10-21 21:33:30.000000000 +0200
91 ***************
92 *** 108,114 ****
93    */
94   #define CMDBUFFSIZE 1024      /* size of the command processing buffer */
95   
96 ! /* _MAX_PATH is only 256 (stdlib.h), but we want more for the 'path' option,
97    * thus use a larger number. */
98   #define MAXPATHL      1024
99   
100 --- 108,114 ----
101    */
102   #define CMDBUFFSIZE 1024      /* size of the command processing buffer */
103   
104 ! /* _MAX_PATH is only 260 (stdlib.h), but we want more for the 'path' option,
105    * thus use a larger number. */
106   #define MAXPATHL      1024
107   
108 *** ../vim-7.3.706/src/version.c        2012-10-21 21:25:17.000000000 +0200
109 --- src/version.c       2012-10-21 21:37:52.000000000 +0200
110 ***************
111 *** 727,728 ****
112 --- 727,730 ----
113   {   /* Add new patch number below this line */
114 + /**/
115 +     707,
116   /**/
117
118 -- 
119 Our job was to build a computer information system for the branch banks.  We
120 were the perfect people for the job: Dean had seen a computer once, and I had
121 heard Dean talk about it.
122                                 (Scott Adams - The Dilbert principle)
123
124  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
125 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
126 \\\  an exciting new programming language -- http://www.Zimbu.org        ///
127  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.046229 seconds and 3 git commands to generate.