annotate src/os_mac_conv.c @ 43:f55897d6921d v7.0026

updated for version 7.0026
author vimboss
date Wed, 29 Dec 2004 21:03:02 +0000
parents 4ac1dce8dd5e
children 4d9eabb1396e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
1 /* vi:set ts=8 sts=4 sw=4:
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
2 *
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
3 * VIM - Vi IMproved by Bram Moolenaar
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
4 *
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
5 * Do ":help uganda" in Vim to read copying and usage conditions.
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
6 * Do ":help credits" in Vim to see a list of people who contributed.
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
7 * See README.txt for an overview of the Vim source code.
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
8 */
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
9 /*
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
10 * os_mac_conv.c: Code specifically for Mac string conversions.
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
11 *
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
12 * This code has been put in a separate file to avoid the conflicts that are
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
13 * caused by including both the X11 and Carbon header files.
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
14 */
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
15
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
16 #define NO_X11_INCLUDES
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
17 #include "vim.h"
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
18
20
4ac1dce8dd5e updated for version 7.0012
vimboss
parents: 18
diff changeset
19 #ifdef FEAT_MBYTE
18
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
20 extern char_u *mac_string_convert __ARGS((char_u *ptr, int len, int *lenp, int fail_on_error, int from, int to, int *unconvlenp));
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
21 extern int macroman2enc __ARGS((char_u *ptr, long *sizep, long real_size));
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
22 extern int enc2macroman __ARGS((char_u *from, size_t fromlen, char_u *to, int *tolenp, int maxtolen, char_u *rest, int *restlenp));
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
23
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
24 /*
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
25 * A Mac version of string_convert_ext() for special cases.
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
26 */
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
27 char_u *
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
28 mac_string_convert(ptr, len, lenp, fail_on_error, from_enc, to_enc, unconvlenp)
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
29 char_u *ptr;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
30 int len;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
31 int *lenp;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
32 int fail_on_error;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
33 int from_enc;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
34 int to_enc;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
35 int *unconvlenp;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
36 {
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
37 char_u *retval, *d;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
38 CFStringRef cfstr;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
39 int buflen, in, out, l, i;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
40 CFStringEncoding from;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
41 CFStringEncoding to;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
42
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
43 switch (from_enc)
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
44 {
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
45 case 'l': from = kCFStringEncodingISOLatin1; break;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
46 case 'm': from = kCFStringEncodingMacRoman; break;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
47 case 'u': from = kCFStringEncodingUTF8; break;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
48 default: return NULL;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
49 }
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
50 switch (to_enc)
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
51 {
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
52 case 'l': to = kCFStringEncodingISOLatin1; break;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
53 case 'm': to = kCFStringEncodingMacRoman; break;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
54 case 'u': to = kCFStringEncodingUTF8; break;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
55 default: return NULL;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
56 }
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
57
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
58 if (unconvlenp != NULL)
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
59 *unconvlenp = 0;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
60 cfstr = CFStringCreateWithBytes(NULL, ptr, len, from, 0);
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
61
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
62 /* When conversion failed, try excluding bytes from the end, helps when
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
63 * there is an incomplete byte sequence. Only do up to 6 bytes to avoid
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
64 * looping a long time when there really is something unconvertable. */
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
65 while (cfstr == NULL && unconvlenp != NULL && len > 1 && *unconvlenp < 6)
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
66 {
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
67 --len;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
68 ++*unconvlenp;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
69 cfstr = CFStringCreateWithBytes(NULL, ptr, len, from, 0);
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
70 }
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
71 if (cfstr == NULL)
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
72 return NULL;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
73 if (to == kCFStringEncodingUTF8)
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
74 buflen = len * 6 + 1;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
75 else
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
76 buflen = len + 1;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
77 retval = alloc(buflen);
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
78 if (retval == NULL)
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
79 {
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
80 CFRelease(cfstr);
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
81 return NULL;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
82 }
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
83 if (!CFStringGetCString(cfstr, retval, buflen, to))
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
84 {
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
85 CFRelease(cfstr);
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
86 if (fail_on_error)
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
87 {
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
88 vim_free(retval);
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
89 return NULL;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
90 }
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
91
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
92 /* conversion failed for the whole string, but maybe it will work
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
93 * for each character */
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
94 for (d = retval, in = 0, out = 0; in < len && out < buflen - 1;)
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
95 {
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
96 if (from == kCFStringEncodingUTF8)
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
97 l = utf_ptr2len_check(ptr + in);
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
98 else
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
99 l = 1;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
100 cfstr = CFStringCreateWithBytes(NULL, ptr + in, l, from, 0);
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
101 if (cfstr == NULL)
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
102 {
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
103 *d++ = '?';
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
104 out++;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
105 }
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
106 else
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
107 {
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
108 if (!CFStringGetCString(cfstr, d, buflen - out, to))
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
109 {
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
110 *d++ = '?';
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
111 out++;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
112 }
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
113 else
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
114 {
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
115 i = strlen(d);
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
116 d += i;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
117 out += i;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
118 }
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
119 CFRelease(cfstr);
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
120 }
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
121 in += l;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
122 }
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
123 *d = NUL;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
124 if (lenp != NULL)
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
125 *lenp = out;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
126 return retval;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
127 }
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
128 CFRelease(cfstr);
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
129 if (lenp != NULL)
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
130 *lenp = strlen(retval);
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
131 return retval;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
132 }
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
133
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
134 /*
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
135 * Conversion from Apple MacRoman char encoding to UTF-8 or latin1, using
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
136 * standard Carbon framework.
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
137 * Input: "ptr[*sizep]".
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
138 * "real_size" is the size of the buffer that "ptr" points to.
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
139 * output is in-place, "sizep" is adjusted.
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
140 * Returns OK or FAIL.
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
141 */
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
142 int
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
143 macroman2enc(ptr, sizep, real_size)
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
144 char_u *ptr;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
145 long *sizep;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
146 long real_size;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
147 {
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
148 CFStringRef cfstr;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
149 CFRange r;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
150 CFIndex len = *sizep;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
151
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
152 /* MacRoman is an 8-bit encoding, no need to move bytes to
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
153 * conv_rest[]. */
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
154 cfstr = CFStringCreateWithBytes(NULL, ptr, len,
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
155 kCFStringEncodingMacRoman, 0);
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
156 /*
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
157 * If there is a conversion error, try using another
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
158 * conversion.
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
159 */
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
160 if (cfstr == NULL)
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
161 return FAIL;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
162
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
163 r.location = 0;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
164 r.length = CFStringGetLength(cfstr);
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
165 if (r.length != CFStringGetBytes(cfstr, r,
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
166 (enc_utf8) ? kCFStringEncodingUTF8 : kCFStringEncodingISOLatin1,
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
167 0, /* no lossy conversion */
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
168 0, /* not external representation */
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
169 ptr + *sizep, real_size - *sizep, &len))
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
170 {
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
171 CFRelease(cfstr);
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
172 return FAIL;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
173 }
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
174 CFRelease(cfstr);
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
175 mch_memmove(ptr, ptr + *sizep, len);
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
176 *sizep = len;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
177
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
178 return OK;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
179 }
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
180
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
181 /*
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
182 * Conversion from UTF-8 or latin1 to MacRoman.
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
183 * Input: "from[fromlen]"
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
184 * Output: "to[maxtolen]" length in "*tolenp"
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
185 * Unconverted rest in rest[*restlenp].
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
186 * Returns OK or FAIL.
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
187 */
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
188 int
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
189 enc2macroman(from, fromlen, to, tolenp, maxtolen, rest, restlenp)
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
190 char_u *from;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
191 size_t fromlen;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
192 char_u *to;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
193 int *tolenp;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
194 int maxtolen;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
195 char_u *rest;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
196 int *restlenp;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
197 {
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
198 CFStringRef cfstr;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
199 CFRange r;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
200 CFIndex l;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
201
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
202 *restlenp = 0;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
203 cfstr = CFStringCreateWithBytes(NULL, from, fromlen,
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
204 (enc_utf8) ? kCFStringEncodingUTF8 : kCFStringEncodingISOLatin1,
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
205 0);
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
206 while (cfstr == NULL && *restlenp < 3 && fromlen > 1)
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
207 {
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
208 rest[*restlenp++] = from[--fromlen];
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
209 cfstr = CFStringCreateWithBytes(NULL, from, fromlen,
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
210 (enc_utf8) ? kCFStringEncodingUTF8 : kCFStringEncodingISOLatin1,
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
211 0);
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
212 }
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
213 if (cfstr == NULL)
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
214 return FAIL;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
215
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
216 r.location = 0;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
217 r.length = CFStringGetLength(cfstr);
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
218 if (r.length != CFStringGetBytes(cfstr, r,
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
219 kCFStringEncodingMacRoman,
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
220 0, /* no lossy conversion */
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
221 0, /* not external representation (since vim
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
222 * handles this internally */
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
223 to, maxtolen, &l))
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
224 {
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
225 CFRelease(cfstr);
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
226 return FAIL;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
227 }
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
228 CFRelease(cfstr);
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
229 *tolenp = l;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
230 return OK;
293621502c4d updated for version 7.0010
vimboss
parents:
diff changeset
231 }
20
4ac1dce8dd5e updated for version 7.0012
vimboss
parents: 18
diff changeset
232
4ac1dce8dd5e updated for version 7.0012
vimboss
parents: 18
diff changeset
233 #endif /* FEAT_MBYTE */