Mercurial > hg > xemacs-beta
comparison src/sysfile.h @ 4834:b3ea9c582280
Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Tue, 12 Jan 2010 01:38:04 -0600 |
parents | aa5ed11f473b |
children | 95c4ced5c07c |
comparison
equal
deleted
inserted
replaced
4833:4dd2389173fc | 4834:b3ea9c582280 |
---|---|
577 /* The documentation in VC++ claims that the pathname library functions | 577 /* The documentation in VC++ claims that the pathname library functions |
578 accept strings in the current locale-specific encoding, but that's | 578 accept strings in the current locale-specific encoding, but that's |
579 false, because they just call the native Win32 routines directly, which | 579 false, because they just call the native Win32 routines directly, which |
580 always use the system-default encoding (which is what Qmswindows_tstr | 580 always use the system-default encoding (which is what Qmswindows_tstr |
581 will give us when not XEUNICODE_P). */ | 581 will give us when not XEUNICODE_P). */ |
582 #define PATHNAME_CONVERT_OUT_TSTR(path, pathout) \ | |
583 do \ | |
584 { \ | |
585 const Ibyte *_pco_path_; \ | |
586 PATHNAME_RESOLVE_LINKS (path, _pco_path_); \ | |
587 C_STRING_TO_TSTR (_pco_path_, pathout); \ | |
588 } while (0) | |
589 | |
590 #define PATHNAME_CONVERT_OUT_UTF_8(path, pathout) \ | |
591 do \ | |
592 { \ | |
593 const Ibyte *_pco_path_; \ | |
594 PATHNAME_RESOLVE_LINKS (path, _pco_path_); \ | |
595 C_STRING_TO_EXTERNAL (_pco_path_, pathout, Qutf_8); \ | |
596 } while (0) | |
597 | |
582 #ifdef WIN32_NATIVE | 598 #ifdef WIN32_NATIVE |
583 # define PATHNAME_CONVERT_OUT(path, pathout) \ | 599 #define PATHNAME_CONVERT_OUT(path, pathout) \ |
584 do \ | 600 PATHNAME_CONVERT_OUT_TSTR (path, pathout) |
585 { \ | |
586 const Ibyte *_pco_path_; \ | |
587 PATHNAME_RESOLVE_LINKS (path, _pco_path_); \ | |
588 C_STRING_TO_TSTR (_pco_path_, pathout); \ | |
589 } while (0) | |
590 #else | 601 #else |
591 # define PATHNAME_CONVERT_OUT(path, pathout) \ | 602 # define PATHNAME_CONVERT_OUT(path, pathout) \ |
592 C_STRING_TO_EXTERNAL (path, pathout, Qfile_name) | 603 C_STRING_TO_EXTERNAL (path, pathout, Qfile_name) |
593 #endif | 604 #endif |
594 | 605 |