Skip to content

Commit 45c634c

Browse files
committed
Add program name. Init globals (executor).
1 parent d04100f commit 45c634c

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

src/client/main.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ void command_init(const Strings &args);
6666

6767
int main(int argc, char *argv[])
6868
{
69+
// globals init
70+
Executor e;
71+
getExecutor(&e);
72+
73+
//
74+
6975
Strings args;
7076
for (auto i = 0; i < argc; i++)
7177
args.push_back(argv[i]);
@@ -1065,3 +1071,13 @@ ApiResult api_call(const String &cmd, const Strings &args)
10651071

10661072
return ApiResult::NotHandled;
10671073
}
1074+
1075+
#ifdef _WIN32
1076+
__declspec(dllexport)
1077+
#else
1078+
__attribute__((visibility("default")))
1079+
#endif
1080+
String getProgramName()
1081+
{
1082+
return "cppan";
1083+
}

0 commit comments

Comments
 (0)