Update: Translations from eints
[openttd-github.git] / src / os / unix / unix_main.cpp
blob4a71b886b388833b3b4edc13078f29af2d901dce
1 /*
2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
6 */
8 /** @file unix_main.cpp Main entry for Unix. */
10 #include "../../stdafx.h"
11 #include "../../openttd.h"
12 #include "../../crashlog.h"
13 #include "../../core/random_func.hpp"
14 #include "../../string_func.h"
16 #include <time.h>
17 #include <signal.h>
19 #include "../../safeguards.h"
21 int CDECL main(int argc, char *argv[])
23 /* Make sure our arguments contain only valid UTF-8 characters. */
24 for (int i = 0; i < argc; i++) StrMakeValidInPlace(argv[i]);
26 CrashLog::InitialiseCrashLog();
28 SetRandomSeed(time(nullptr));
30 signal(SIGPIPE, SIG_IGN);
32 return openttd_main(std::span(argv, argc));