string binpath_;
string binname_;
string tmpdir_;
+string homepath_;
+string nulldev_;
+
os::shell_type shell_ = os::UNIX;
unsigned long cp_ = 0;
if (rc != NO_ERROR)
exit(rc);
string p = tmp.get();
- p = slashify_path(p);
+ p = internal_path(p);
binname_ = OnlyFilename(p);
binname_.erase(binname_.length()-4, string::npos);
binpath_ = OnlyPath(p);
// CPList[1] == system default codepage, the rest are auxilary.
// Once cp_ is correctly set, you can call other routines.
cp_ = CPList[1];
+
+ tmpdir_ = "/tmp";
+ homepath_ = GetEnvPath("HOME");
+ nulldev_ = "null";
}
COUNTRYCODE cntry;
cntry.country = 0;
cntry.codepage = cp_;
- string temp1 = slashify_path(p1);
- string temp2 = slashify_path(p2);
+ string temp1 = internal_path(p1);
+ string temp2 = internal_path(p2);
char * tmp1 = const_cast<char *> (temp1.c_str());
char * tmp2 = const_cast<char *> (temp2.c_str());
/* rc = */ DosMapCase(p1.length(), &cntry, tmp1);
}
-string slashify_path(string const & p)
+string internal_path(string const & p)
{
static bool initialized = false;
static bool leadbyte[256] = {false};
}
-string internal_path(string const & p)
-{
- return p;
-}
-
-
bool is_absolute_path(string const & p)
{
return (p.length() > 1
}
-string binpath()
+string const & binpath()
{
return binpath_;
}
-string binname()
+string const & binname()
{
return binname_;
}
}
-string getTmpDir()
+string const & getTmpDir()
{
return tmpdir_;
}
+string const & homepath()
+{
+ return homepath_;
+}
+
+
+string const & nulldev()
+{
+ return nulldev_;
+}
+
+
shell_type shell()
{
return shell_;