]>
Commit | Line | Data |
---|---|---|
bb987377 ER |
1 | To: vim_dev@googlegroups.com |
2 | Subject: Patch 7.3.177 | |
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.177 | |
11 | Problem: MS-Windows: mkdir() doesn't work properly when 'encoding' is | |
12 | "utf-8". | |
13 | Solution: Convert to utf-16. (Yukihiro Nakadaira) | |
14 | Files: src/os_win32.c, src/os_win32.h, src/proto/os_win32.pro | |
15 | ||
16 | ||
17 | *** ../vim-7.3.176/src/os_win32.c 2011-05-05 16:41:19.000000000 +0200 | |
18 | --- src/os_win32.c 2011-05-05 18:24:36.000000000 +0200 | |
19 | *************** | |
20 | *** 2640,2645 **** | |
21 | --- 2640,2669 ---- | |
22 | } | |
23 | ||
24 | /* | |
25 | + * Create directory "name". | |
26 | + * Return 0 on success, -1 on error. | |
27 | + */ | |
28 | + int | |
29 | + mch_mkdir(char_u *name) | |
30 | + { | |
31 | + #ifdef FEAT_MBYTE | |
32 | + if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) | |
33 | + { | |
34 | + WCHAR *p; | |
35 | + int retval; | |
36 | + | |
37 | + p = enc_to_utf16(name, NULL); | |
38 | + if (p == NULL) | |
39 | + return -1; | |
40 | + retval = _wmkdir(p); | |
41 | + vim_free(p); | |
42 | + return retval; | |
43 | + } | |
44 | + #endif | |
45 | + return _mkdir(name); | |
46 | + } | |
47 | + | |
48 | + /* | |
49 | * Return TRUE if file "fname" has more than one link. | |
50 | */ | |
51 | int | |
52 | *** ../vim-7.3.176/src/os_win32.h 2010-08-15 21:57:30.000000000 +0200 | |
53 | --- src/os_win32.h 2011-05-05 18:25:44.000000000 +0200 | |
54 | *************** | |
55 | *** 191,195 **** | |
56 | #ifdef __BORLANDC__ | |
57 | # define vim_mkdir(x, y) mkdir(x) | |
58 | #else | |
59 | ! # define vim_mkdir(x, y) _mkdir(x) | |
60 | #endif | |
61 | --- 191,195 ---- | |
62 | #ifdef __BORLANDC__ | |
63 | # define vim_mkdir(x, y) mkdir(x) | |
64 | #else | |
65 | ! # define vim_mkdir(x, y) mch_mkdir(x) | |
66 | #endif | |
67 | *** ../vim-7.3.176/src/proto/os_win32.pro 2011-05-05 16:41:19.000000000 +0200 | |
68 | --- src/proto/os_win32.pro 2011-05-05 18:26:20.000000000 +0200 | |
69 | *************** | |
70 | *** 20,25 **** | |
71 | --- 20,26 ---- | |
72 | int mch_setperm __ARGS((char_u *name, long perm)); | |
73 | void mch_hide __ARGS((char_u *name)); | |
74 | int mch_isdir __ARGS((char_u *name)); | |
75 | + int mch_mkdir __ARGS((char_u *name)); | |
76 | int mch_is_linked __ARGS((char_u *fname)); | |
77 | int win32_fileinfo __ARGS((char_u *name, BY_HANDLE_FILE_INFORMATION *lpFileInfo)); | |
78 | int mch_writable __ARGS((char_u *name)); | |
79 | *** ../vim-7.3.176/src/version.c 2011-05-05 18:10:11.000000000 +0200 | |
80 | --- src/version.c 2011-05-05 18:27:56.000000000 +0200 | |
81 | *************** | |
82 | *** 716,717 **** | |
83 | --- 716,719 ---- | |
84 | { /* Add new patch number below this line */ | |
85 | + /**/ | |
86 | + 177, | |
87 | /**/ | |
88 | ||
89 | -- | |
90 | hundred-and-one symptoms of being an internet addict: | |
91 | 56. You leave the modem speaker on after connecting because you think it | |
92 | sounds like the ocean wind...the perfect soundtrack for "surfing the net". | |
93 | ||
94 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
95 | /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
96 | \\\ an exciting new programming language -- http://www.Zimbu.org /// | |
97 | \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |