#include "os.h"
#include "support/filetools.h"
+#include "support/lstrings.h"
+#include "debug.h"
#include <windows.h>
#include <io.h>
os::shell_type os::_shell = os::UNIX;
unsigned long os::cp_ = 0;
-void os::init(int * argc, char ** argv[]) {
+using std::endl;
+
+void os::init(int * /* argc */, char ** argv[]) {
static bool initialized = false;
if (initialized) return;
initialized = true;
if (p.empty())
return false;
- bool isDosPath = (path.length() > 1 && path[1] == ':');
- bool isUnixPath = (path[0] == '/');
+ bool isDosPath = (p.length() > 1 && p[1] == ':');
+ bool isUnixPath = (p[0] == '/');
return isDosPath | isUnixPath;
}
+
+// returns a string suitable to be passed to fopen/popen when
+// reading a file
+char const * os::read_mode()
+{
+ return "rb";
+}