4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Ruurd A. Reitsma
9 * Full author contact details are available in file CREDITS.
11 * wrap OS-specific stuff
25 UNIX, // Do we have to distinguish sh and csh?
29 /// Do some work just once.
30 void init(int argc, char * argv[]);
32 /// Returns the name of the NULL device (/dev/null, null).
33 std::string const & nulldev();
35 /// Returns "/" on *nix, "C:/", etc on Windows.
36 std::string current_root();
41 /// Extract the path common to both @c p1 and @c p2. DBCS aware!
42 std::string::size_type common_path(std::string const & p1, std::string const & p2);
44 /// Converts a unix style path to host OS style.
45 std::string external_path(std::string const & p);
47 /// Converts a host OS style path to unix style.
48 std::string internal_path(std::string const & p);
50 /// Converts a unix style path list to host OS style.
51 std::string external_path_list(std::string const & p);
53 /// Converts a host OS style path list to unix style.
54 std::string internal_path_list(std::string const & p);
57 * Converts a unix style path into a form suitable for inclusion in a LaTeX
59 * Caution: This function handles only the OS specific part of that task.
60 * Never use it directly, use lyx::support::latex_path instead.
62 std::string latex_path(std::string const & p);
64 /// Is the path absolute?
65 bool is_absolute_path(std::string const & p);
67 /** Returns a string suitable to be passed to popen when
70 char const * popen_read_mode();
72 /** The character used to separate paths returned by the
73 * PATH environment variable.
75 char path_separator();
77 /** If @c use_cygwin_paths is true, LyX will output cygwin style paths
78 * rather than native Win32 ones. Obviously, this option is used only
81 void cygwin_path_fix(bool use_cygwin_paths);
84 } // namespace support