Merged pidgin/main into default
[pidgin-git.git] / pidgin / pidgin.c
blob9cf72f7a7354a21ee7563397047be09517bbdb88
1 /*
2 * pidgin
4 * Pidgin is the legal property of its developers, whose names are too numerous
5 * to list here. Please refer to the COPYRIGHT file distributed with this
6 * source distribution.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
24 #include "internal.h"
25 #include "pidgin.h"
27 #ifdef _WIN32
28 /* suppress gcc "no previous prototype" warning */
29 int __cdecl pidgin_main(HINSTANCE hint, int argc, char *argv[]);
30 int __cdecl pidgin_main(HINSTANCE hint, int argc, char *argv[])
31 #else
32 int main(int argc, char *argv[])
33 #endif
35 const gchar *test_prgname;
37 #ifdef _WIN32
38 SetConsoleOutputCP(65001); /* UTF-8 */
39 #endif
41 /* This is for UI testing purposes only, don't use it! */
42 test_prgname = g_getenv("PIDGIN_TEST_PRGNAME");
43 g_set_prgname(test_prgname ? test_prgname : "Pidgin");
44 g_set_application_name(PIDGIN_NAME);
46 #ifdef _WIN32
47 winpidgin_set_exe_hinstance(hint);
48 #endif
50 return pidgin_start(argc, argv);