]> git.lyx.org Git - lyx.git/blobdiff - src/support/os_cygwin.cpp
Don't disable apply button if one (or more) of vertical alignment, rotation,
[lyx.git] / src / support / os_cygwin.cpp
index 19074493216f8d0d12a1bce0772b48e14f62c079..ad97c38bc2a1fd38cb15c860c46b119b6be30111 100644 (file)
@@ -18,6 +18,7 @@
 #include "support/os.h"
 
 #include "support/FileName.h"
+#include "support/lassert.h"
 #include "support/lstrings.h"
 #include "support/debug.h"
 
@@ -45,6 +46,9 @@ namespace os {
 
 namespace {
 
+int argc_ = 0;
+char ** argv_ = 0;
+
 bool windows_style_tex_paths_ = false;
 
 // In both is_posix_path() and is_windows_path() it is assumed that
@@ -202,8 +206,11 @@ BOOL terminate_handler(DWORD event)
 
 } // namespace anon
 
-void init(int, char *[])
+void init(int argc, char * argv[])
 {
+       argc_ = argc;
+       argv_ = argv;
+
        // Make sure that the TEMP variable is set
        // and sync the Windows environment.
        setenv("TEMP", "/tmp", false);
@@ -214,6 +221,17 @@ void init(int, char *[])
 }
 
 
+string utf8_argv(int i)
+{
+       LASSERT(i < argc_, /**/);
+       return to_utf8(from_local8bit(argv_[i]));
+}
+
+
+void remove_internal_args(int, int)
+{}
+
+
 string current_root()
 {
        return string("/");
@@ -290,7 +308,7 @@ string internal_path(string const & p)
 }
 
 
-string safe_internal_path(string const & p)
+string safe_internal_path(string const & p, file_access)
 {
        return convert_path(p, PathStyle(posix));
 }
@@ -357,12 +375,6 @@ string const & nulldev()
 }
 
 
-bool is_terminal(io_channel channel)
-{
-       return isatty(channel);
-}
-
-
 shell_type shell()
 {
        return UNIX;
@@ -411,7 +423,7 @@ string real_path(string const & path)
 {
        char rpath[PATH_MAX + 1];
        char * result = realpath(path.c_str(), rpath);
-       return FileName::fromFilesystemEncoding(result ? rpath : path).absFilename();
+       return FileName::fromFilesystemEncoding(result ? rpath : path).absFileName();
 }
 
 } // namespace os