#define ASSOCF_INIT_IGNOREUNKNOWN 0
#endif
+#if defined(__MINGW32__)
+#include <stdio.h>
+#endif
+
+
extern "C" {
extern void __wgetmainargs(int * argc, wchar_t *** argv, wchar_t *** envp,
int expand_wildcards, int * new_mode);
}
+void remove_internal_args(int i, int num)
+{
+ argc_ -= num;
+ for (int j = i; j < argc_; ++j)
+ argv_[j] = argv_[j + num];
+}
+
+
string current_root()
{
// _getdrive returns the current drive (1=A, 2=B, and so on).
}
-bool is_terminal(io_channel channel)
-{
- switch (channel) {
- case STDIN:
- if (GetStdHandle(STD_INPUT_HANDLE) == NULL)
- return false;
- break;
- case STDOUT:
- if (GetStdHandle(STD_OUTPUT_HANDLE) == NULL)
- return false;
- break;
- case STDERR:
- if (GetStdHandle(STD_ERROR_HANDLE) == NULL)
- return false;
- break;
- }
- return true;
-}
-
-
shell_type shell()
{
return CMD_EXE;
CloseHandle(hmap);
CloseHandle(hpath);
string const retpath = subst(string(realpath), '\\', '/');
- return FileName::fromFilesystemEncoding(retpath).absFilename();
+ return FileName::fromFilesystemEncoding(retpath).absFileName();
}
} // namespace os