Mercurial > hg > xemacs-beta
comparison src/sysfile.h @ 4990:8f0cf4fd3d2c
Automatic merge
| author | Ben Wing <ben@xemacs.org> |
|---|---|
| date | Sat, 06 Feb 2010 04:01:46 -0600 |
| parents | 4aebb0131297 |
| children | 308d34e9f07d |
comparison
equal
deleted
inserted
replaced
| 4989:d2ec55325515 | 4990:8f0cf4fd3d2c |
|---|---|
| 89 fcntl.h, and Martin says that a "conforming" system should never | 89 fcntl.h, and Martin says that a "conforming" system should never |
| 90 need this. We will put it back if necessary on systems requiring it. */ | 90 need this. We will put it back if necessary on systems requiring it. */ |
| 91 /* # include <sys/fcntl.h> */ | 91 /* # include <sys/fcntl.h> */ |
| 92 #endif /* WIN32_NATIVE */ | 92 #endif /* WIN32_NATIVE */ |
| 93 | 93 |
| 94 /* Needed for C_STRING_TO_TSTR, MAX_XETCHAR_SIZE below; but syswindows.h | 94 /* Needed for ITEXT_TO_TSTR, MAX_XETCHAR_SIZE below; but syswindows.h |
| 95 depends on lisp.h being previously included. */ | 95 depends on lisp.h being previously included. */ |
| 96 #if defined (WIN32_ANY) && defined (emacs) | 96 #if defined (WIN32_ANY) && defined (emacs) |
| 97 # include "syswindows.h" | 97 # include "syswindows.h" |
| 98 #endif | 98 #endif |
| 99 | 99 |
| 495 | 495 |
| 496 return XCHAR (Vdirectory_sep_char); | 496 return XCHAR (Vdirectory_sep_char); |
| 497 } | 497 } |
| 498 #define DIRECTORY_SEP sysfile_get_directory_sep() | 498 #define DIRECTORY_SEP sysfile_get_directory_sep() |
| 499 | 499 |
| 500 #define DEFAULT_DIRECTORY_FALLBACK ((const CIbyte *)"C:\\") | 500 #define DEFAULT_DIRECTORY_FALLBACK "C:\\" |
| 501 | 501 |
| 502 #else /* not emacs */ | 502 #else /* not emacs */ |
| 503 | 503 |
| 504 /* The above Lisp variables are not available to make-docfile, etc. */ | 504 /* The above Lisp variables are not available to make-docfile, etc. */ |
| 505 #define DIRECTORY_SEP DEFAULT_DIRECTORY_SEP | 505 #define DIRECTORY_SEP DEFAULT_DIRECTORY_SEP |
| 509 #else /* not WIN32_NATIVE */ | 509 #else /* not WIN32_NATIVE */ |
| 510 | 510 |
| 511 #define SEPCHAR ':' | 511 #define SEPCHAR ':' |
| 512 #define DEFAULT_DIRECTORY_SEP '/' | 512 #define DEFAULT_DIRECTORY_SEP '/' |
| 513 #define DIRECTORY_SEP '/' | 513 #define DIRECTORY_SEP '/' |
| 514 #define DEFAULT_DIRECTORY_FALLBACK ((const CIbyte *)"/") | 514 #define DEFAULT_DIRECTORY_FALLBACK "/" |
| 515 | 515 |
| 516 #endif /* WIN32_NATIVE */ | 516 #endif /* WIN32_NATIVE */ |
| 517 | 517 |
| 518 | 518 |
| 519 #ifdef WIN32_ANY | 519 #ifdef WIN32_ANY |
| 595 #define PATHNAME_CONVERT_OUT_TSTR(path, pathout) \ | 595 #define PATHNAME_CONVERT_OUT_TSTR(path, pathout) \ |
| 596 do \ | 596 do \ |
| 597 { \ | 597 { \ |
| 598 const Ibyte *_pco_path_; \ | 598 const Ibyte *_pco_path_; \ |
| 599 PATHNAME_RESOLVE_LINKS (path, _pco_path_); \ | 599 PATHNAME_RESOLVE_LINKS (path, _pco_path_); \ |
| 600 C_STRING_TO_TSTR (_pco_path_, pathout); \ | 600 (pathout) = ITEXT_TO_TSTR (_pco_path_); \ |
| 601 } while (0) | 601 } while (0) |
| 602 | 602 |
| 603 #define PATHNAME_CONVERT_OUT_UTF_8(path, pathout) \ | 603 #define PATHNAME_CONVERT_OUT_UTF_8(path, pathout) \ |
| 604 do \ | 604 do \ |
| 605 { \ | 605 { \ |
| 606 const Ibyte *_pco_path_; \ | 606 const Ibyte *_pco_path_; \ |
| 607 PATHNAME_RESOLVE_LINKS (path, _pco_path_); \ | 607 PATHNAME_RESOLVE_LINKS (path, _pco_path_); \ |
| 608 C_STRING_TO_EXTERNAL (_pco_path_, pathout, Qutf_8); \ | 608 (pathout) = ITEXT_TO_EXTERNAL (_pco_path_, Qutf_8); \ |
| 609 } while (0) | 609 } while (0) |
| 610 | 610 |
| 611 #ifdef WIN32_NATIVE | 611 #ifdef WIN32_NATIVE |
| 612 #define PATHNAME_CONVERT_OUT(path, pathout) \ | 612 #define PATHNAME_CONVERT_OUT(path, pathout) \ |
| 613 PATHNAME_CONVERT_OUT_TSTR (path, pathout) | 613 PATHNAME_CONVERT_OUT_TSTR (path, pathout) |
| 614 #else | 614 #else |
| 615 # define PATHNAME_CONVERT_OUT(path, pathout) \ | 615 # define PATHNAME_CONVERT_OUT(path, pathout) \ |
| 616 C_STRING_TO_EXTERNAL (path, pathout, Qfile_name) | 616 do \ |
| 617 { \ | |
| 618 (pathout) = ITEXT_TO_EXTERNAL (path, Qfile_name); \ | |
| 619 } while (0) | |
| 617 #endif | 620 #endif |
| 618 | 621 |
| 619 #define LISP_PATHNAME_CONVERT_OUT(path, pathout) \ | 622 #define LISP_PATHNAME_CONVERT_OUT(path, pathout) \ |
| 620 PATHNAME_CONVERT_OUT (XSTRING_DATA (path), pathout) | 623 PATHNAME_CONVERT_OUT (XSTRING_DATA (path), pathout) |
| 621 | 624 |
