]> git.lyx.org Git - lyx.git/blobdiff - src/support/os_unix.C
support for wasy symbols
[lyx.git] / src / support / os_unix.C
index 19b8fa88aef0072d67924080205f01bd6b60e916..e5ccd430d9959a1da95f7c3284a9f3edda60d274 100644 (file)
@@ -23,7 +23,7 @@ void os::init(int * /*argc*/, char ** argv[]) /* :cp_(0), _shell(os::UNIX) */ {
        string tmp = *argv[0];
        binname_ = OnlyFilename(tmp);
        tmp = ExpandPath(tmp); // This expands ./ and ~/
-       if (!AbsolutePath(tmp)) {
+       if (!os::is_absolute_path(tmp)) {
                string binsearchpath = GetEnvPath("PATH");
                // This will make "src/lyx" work always :-)
                binsearchpath += ";.";
@@ -34,7 +34,7 @@ void os::init(int * /*argc*/, char ** argv[]) /* :cp_(0), _shell(os::UNIX) */ {
 
        // In case we are running in place and compiled with shared libraries
        if (suffixIs(tmp, "/.libs/"))
-               tmp.erase(tmp.length()-6, string::npos);
+               tmp.erase(tmp.length() - 6, string::npos);
        binpath_ = tmp;
 }
 
@@ -64,7 +64,22 @@ string os::slashify_path(string p) {
        return p;
 }
 
-string os::external_path(string p) {
+string os::external_path(string const &p) {
        return p;
 }
 
+string os::internal_path(string const &p) {
+       return p;
+}
+
+bool os::is_absolute_path(string const & p)
+{
+       return (!p.empty() && p[0] == '/');
+}
+
+// returns a string suitable to be passed to fopen/popen when
+// reading a file
+char const * os::read_mode()
+{
+       return "r";
+}