1 // os.h copyright "Ruurd A. Reitsma" <R.A.Reitsma@wbmt.tudelft.nl>
12 /// Do we need a base class for this?
17 UNIX, // Do we have to distinguish sh and csh?
22 static void init(int * argc, char ** argv[]);
25 static string binpath() {return binpath_;}
28 static string binname() {return binname_;}
30 // system_tempdir actually doesn't belong here.
31 // I put it here only to avoid a global variable.
32 static void setTmpDir(string p) {tmpdir_ = p;}
35 static string getTmpDir() {return tmpdir_;}
38 static string current_root();
41 static os::shell_type shell() {return _shell;}
44 static string::size_type common_path(string const &p1,
47 // no-op on UNIX, '\\'->'/' on OS/2 and Win32, ':'->'/' on MacOS, etc.
48 static string slashify_path(string p);
49 // converts a host OS path to unix style
50 static string external_path(string const &p);
51 // converts a unix path to host OS style
52 static string internal_path(string const &p);
54 static bool is_absolute_path(string const & p);
57 static void warn(string mesg);
59 static string binpath_;
60 static string binname_;
61 static string tmpdir_;
62 static os::shell_type _shell;
63 // Used only on OS/2 to determine file system encoding.
64 static unsigned long cp_;
66 // Never initialize static variables in the header!
67 // Anyway I bet this class will never be constructed.