forked from netheril96/securefs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
29 lines (24 loc) · 643 Bytes
/
main.cpp
File metadata and controls
29 lines (24 loc) · 643 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <clocale>
#include "commands.h"
#include "mystring.h"
#include "myutils.h"
#include "platform.h"
#ifdef WIN32
int wmain(int argc, wchar_t** wargv)
{
::securefs::windows_init();
auto str_argv = securefs::make_unique_array<std::string>(argc);
for (int i = 0; i < argc; ++i)
str_argv[i] = securefs::narrow_string(wargv[i]);
auto argv = securefs::make_unique_array<const char*>(argc + 1);
for (int i = 0; i < argc; ++i)
argv[i] = str_argv[i].c_str();
argv[argc] = nullptr;
return securefs::commands_main(argc, argv.get());
}
#else
int main(int argc, char** argv)
{
return securefs::commands_main(argc, argv);
}
#endif