diff options
| author | Karoly Lorentey | 2004-12-08 22:20:27 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-12-08 22:20:27 +0000 |
| commit | fad2f6858075f49c4c8fd16f0535c287e3f14ac3 (patch) | |
| tree | 843a2ffe6caea6201877e3d2f1b6b954f47344b5 /src/mac.c | |
| parent | 856dd47583918edd7987c13334703d3e7492d8f4 (diff) | |
| parent | b11e88237593ff7556d8535305e8f342e6b61d66 (diff) | |
| download | emacs-fad2f6858075f49c4c8fd16f0535c287e3f14ac3.tar.gz emacs-fad2f6858075f49c4c8fd16f0535c287e3f14ac3.zip | |
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-714
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-271
Diffstat (limited to 'src/mac.c')
| -rw-r--r-- | src/mac.c | 16 |
1 files changed, 16 insertions, 0 deletions
| @@ -262,6 +262,22 @@ posix_to_mac_pathname (const char *ufn, char *mfn, int mfnbuflen) | |||
| 262 | return 1; | 262 | return 1; |
| 263 | } | 263 | } |
| 264 | 264 | ||
| 265 | #if TARGET_API_MAC_CARBON | ||
| 266 | CFStringRef | ||
| 267 | cfstring_create_with_utf8_cstring (c_str) | ||
| 268 | const char *c_str; | ||
| 269 | { | ||
| 270 | CFStringRef str; | ||
| 271 | |||
| 272 | str = CFStringCreateWithCString (NULL, c_str, kCFStringEncodingUTF8); | ||
| 273 | if (str == NULL) | ||
| 274 | /* Failed to interpret as UTF 8. Fall back on Mac Roman. */ | ||
| 275 | str = CFStringCreateWithCString (NULL, c_str, kCFStringEncodingMacRoman); | ||
| 276 | |||
| 277 | return str; | ||
| 278 | } | ||
| 279 | #endif | ||
| 280 | |||
| 265 | #ifndef MAC_OSX | 281 | #ifndef MAC_OSX |
| 266 | 282 | ||
| 267 | /* The following functions with "sys_" prefix are stubs to Unix | 283 | /* The following functions with "sys_" prefix are stubs to Unix |