Author: cazfi Date: Sun Jul 24 12:25:49 2016 New Revision: 33312 URL: http://svn.gna.org/viewcvs/freeciv?rev=33312&view=rev Log: Replaced remaining uses of WIN32_NATIVE with FREECIV_MSWINDOWS
See patch #7495 Modified: trunk/client/audio_sdl.c trunk/client/client_main.c trunk/client/clinet.c trunk/client/connectdlg_common.c trunk/client/gui-gtk-2.0/citydlg.c trunk/client/gui-gtk-2.0/gui_main.c trunk/client/gui-gtk-2.0/mapview.c trunk/client/gui-gtk-3.0/gui_main.c trunk/client/gui-gtk-3.0/mapview.c trunk/client/gui-gtk-3.x/gui_main.c trunk/client/gui-gtk-3.x/mapview.c trunk/client/gui-sdl2/graphics.c trunk/server/civserver.c trunk/tools/mpgui_gtk2.c Modified: trunk/client/audio_sdl.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/audio_sdl.c?rev=33312&r1=33311&r2=33312&view=diff ============================================================================== --- trunk/client/audio_sdl.c (original) +++ trunk/client/audio_sdl.c Sun Jul 24 12:25:49 2016 @@ -1,4 +1,4 @@ -/********************************************************************** +/*********************************************************************** Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -47,7 +47,7 @@ /* Sounds don't sound good on Windows unless the buffer size is 4k, * but this seems to cause strange behaviour on other systems, * such as a delay before playing the sound. */ -#ifdef WIN32_NATIVE +#ifdef FREECIV_MSWINDOWS const size_t buf_size = 4096; #else const size_t buf_size = 1024; Modified: trunk/client/client_main.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/client_main.c?rev=33312&r1=33311&r2=33312&view=diff ============================================================================== --- trunk/client/client_main.c (original) +++ trunk/client/client_main.c Sun Jul 24 12:25:49 2016 @@ -17,7 +17,7 @@ #include "fc_prehdrs.h" -#ifdef WIN32_NATIVE +#ifdef FREECIV_MSWINDOWS #include <windows.h> /* LoadLibrary() */ #endif @@ -325,7 +325,7 @@ int aii; /* Load win32 post-crash debugger */ -#ifdef WIN32_NATIVE +#ifdef FREECIV_MSWINDOWS # ifndef FREECIV_NDEBUG if (LoadLibrary("exchndl.dll") == NULL) { # ifdef FREECIV_DEBUG @@ -333,7 +333,7 @@ # endif /* FREECIV_DEBUG */ } # endif /* FREECIV_NDEBUG */ -#endif /* WIN32_NATIVE */ +#endif /* FREECIV_MSWINDOWS */ i_am_client(); /* Tell to libfreeciv that we are client */ Modified: trunk/client/clinet.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/clinet.c?rev=33312&r1=33311&r2=33312&view=diff ============================================================================== --- trunk/client/clinet.c (original) +++ trunk/client/clinet.c Sun Jul 24 12:25:49 2016 @@ -492,7 +492,7 @@ { char errbuf[512]; static int count = 0; -#ifndef WIN32_NATIVE +#ifndef FREECIV_MSWINDOWS static int warning_shown = 0; #endif @@ -514,7 +514,7 @@ /* Don't call me again */ autoconnecting = FALSE; return FC_INFINITY; -#ifndef WIN32_NATIVE +#ifndef FREECIV_MSWINDOWS /* See PR#4042 for more info on issues with try_to_connect() and errno. */ case ECONNREFUSED: /* Server not available (yet) */ if (!warning_shown) { @@ -525,7 +525,7 @@ } /* Try again in 0.5 seconds */ return 0.001 * AUTOCONNECT_INTERVAL; -#endif /* WIN32_NATIVE */ +#endif /* FREECIV_MSWINDOWS */ default: /* All other errors are fatal */ log_fatal(_("Error contacting server \"%s\" at port %d " "as \"%s\":\n %s\n"), Modified: trunk/client/connectdlg_common.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/connectdlg_common.c?rev=33312&r1=33311&r2=33312&view=diff ============================================================================== --- trunk/client/connectdlg_common.c (original) +++ trunk/client/connectdlg_common.c Sun Jul 24 12:25:49 2016 @@ -1,6 +1,6 @@ -/********************************************************************** -Freeciv - Copyright (C) 2004 - The Freeciv Project - This program is free software; you can redistribute it and / or modify +/*********************************************************************** + Freeciv - Copyright (C) 2004 - The Freeciv Project + This program 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; either version 2, or (at your option) any later version. @@ -9,7 +9,7 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -***********************************************************************/ +***********************************************************************/ #ifdef HAVE_CONFIG_H #include <fc_config.h> #endif @@ -22,7 +22,7 @@ #include <string.h> #include <time.h> -#ifdef WIN32_NATIVE +#ifdef FREECIV_MSWINDOWS #include <windows.h> #endif @@ -67,8 +67,8 @@ #define WAIT_BETWEEN_TRIES 100000 /* usecs */ #define NUMBER_OF_TRIES 500 -#if defined(HAVE_WORKING_FORK) && !defined(WIN32_NATIVE) -/* We are yet to see WIN32_NATIVE setup where even HAVE_WORKING_FORK would +#if defined(HAVE_WORKING_FORK) && !defined(FREECIV_MSWINDOWS) +/* We are yet to see FREECIV_MSWINDOWS setup where even HAVE_WORKING_FORK would * mean fork() that actually works for us. */ #define HAVE_USABLE_FORK #endif @@ -216,10 +216,10 @@ *****************************************************************/ bool client_start_server(void) { -#if !defined(HAVE_USABLE_FORK) && !defined(WIN32_NATIVE) +#if !defined(HAVE_USABLE_FORK) && !defined(FREECIV_MSWINDOWS) /* Can't do much without fork */ return FALSE; -#else /* HAVE_USABLE_FORK || WIN32_NATIVE */ +#else /* HAVE_USABLE_FORK || FREECIV_MSWINDOWS */ char buf[512]; int connect_tries = 0; char savesdir[MAX_LEN_PATH]; @@ -245,7 +245,7 @@ char savefilecmdline[512]; char savescmdline[512]; char scenscmdline[512]; -#endif /* !HAVE_USABLE_FORK -> WIN32_NATIVE */ +#endif /* !HAVE_USABLE_FORK -> FREECIV_MSWINDOWS */ #ifdef FREECIV_IPV6_SUPPORT enum fc_addr_family family = FC_ADDR_ANY; @@ -396,7 +396,7 @@ } } #else /* HAVE_USABLE_FORK */ -#ifdef WIN32_NATIVE +#ifdef FREECIV_MSWINDOWS if (logfile) { loghandle = CreateFile(logfile, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, @@ -503,7 +503,7 @@ server_process = pi.hProcess; -#endif /* WIN32_NATIVE */ +#endif /* FREECIV_MSWINDOWS */ #endif /* HAVE_USABLE_FORK */ /* a reasonable number of tries */ @@ -511,11 +511,11 @@ buf, sizeof(buf)) == -1) { fc_usleep(WAIT_BETWEEN_TRIES); #ifdef HAVE_USABLE_FORK -#ifndef WIN32_NATIVE +#ifndef FREECIV_MSWINDOWS if (waitpid(server_pid, NULL, WNOHANG) != 0) { break; } -#endif /* WIN32_NATIVE */ +#endif /* FREECIV_MSWINDOWS */ #endif /* HAVE_USABLE_FORK */ if (connect_tries++ > NUMBER_OF_TRIES) { log_error("Last error from connect attempts: '%s'", buf); @@ -572,7 +572,7 @@ } return TRUE; -#endif /* HAVE_USABLE_FORK || WIN32_NATIVE */ +#endif /* HAVE_USABLE_FORK || FREECIV_MSWINDOWS */ } /************************************************************************* Modified: trunk/client/gui-gtk-2.0/citydlg.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-2.0/citydlg.c?rev=33312&r1=33311&r2=33312&view=diff ============================================================================== --- trunk/client/gui-gtk-2.0/citydlg.c (original) +++ trunk/client/gui-gtk-2.0/citydlg.c Sun Jul 24 12:25:49 2016 @@ -1319,10 +1319,10 @@ gtk_widget_realize(pdialog->shell); /* keep the icon of the executable on Windows (see PR#36491) */ -#ifndef WIN32_NATIVE +#ifndef FREECIV_MSWINDOWS gtk_window_set_icon(GTK_WINDOW(pdialog->shell), - sprite_get_pixbuf(get_icon_sprite(tileset, ICON_CITYDLG))); -#endif /* WIN32_NATIVE */ + sprite_get_pixbuf(get_icon_sprite(tileset, ICON_CITYDLG))); +#endif /* FREECIV_MSWINDOWS */ /* Restore size of the city dialog. */ gtk_window_set_default_size(GTK_WINDOW(pdialog->shell), Modified: trunk/client/gui-gtk-2.0/gui_main.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-2.0/gui_main.c?rev=33312&r1=33311&r2=33312&view=diff ============================================================================== --- trunk/client/gui-gtk-2.0/gui_main.c (original) +++ trunk/client/gui-gtk-2.0/gui_main.c Sun Jul 24 12:25:49 2016 @@ -1672,7 +1672,7 @@ tileset_load_tiles(tileset); /* keep the icon of the executable on Windows (see PR#36491) */ -#ifndef WIN32_NATIVE +#ifndef FREECIV_MSWINDOWS /* Only call this after tileset_load_tiles is called. */ gtk_window_set_icon(GTK_WINDOW(toplevel), sprite_get_pixbuf(get_icon_sprite(tileset, ICON_FREECIV))); @@ -1960,7 +1960,7 @@ **************************************************************************/ void add_net_input(int sock) { -#ifdef WIN32_NATIVE +#ifdef FREECIV_MSWINDOWS srv_channel = g_io_channel_win32_new_socket(sock); #else srv_channel = g_io_channel_unix_new(sock); Modified: trunk/client/gui-gtk-2.0/mapview.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-2.0/mapview.c?rev=33312&r1=33311&r2=33312&view=diff ============================================================================== --- trunk/client/gui-gtk-2.0/mapview.c (original) +++ trunk/client/gui-gtk-2.0/mapview.c Sun Jul 24 12:25:49 2016 @@ -889,7 +889,7 @@ editgui_tileset_changed(); /* keep the icon of the executable on Windows (see PR#36491) */ -#ifndef WIN32_NATIVE +#ifndef FREECIV_MSWINDOWS gtk_window_set_icon(GTK_WINDOW(toplevel), sprite_get_pixbuf(get_icon_sprite(tileset, ICON_FREECIV))); #endif Modified: trunk/client/gui-gtk-3.0/gui_main.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.0/gui_main.c?rev=33312&r1=33311&r2=33312&view=diff ============================================================================== --- trunk/client/gui-gtk-3.0/gui_main.c (original) +++ trunk/client/gui-gtk-3.0/gui_main.c Sun Jul 24 12:25:49 2016 @@ -1803,7 +1803,7 @@ tileset_load_tiles(tileset); /* keep the icon of the executable on Windows (see PR#36491) */ -#ifndef WIN32_NATIVE +#ifndef FREECIV_MSWINDOWS { GdkPixbuf *pixbuf = sprite_get_pixbuf(get_icon_sprite(tileset, ICON_FREECIV)); @@ -1811,7 +1811,7 @@ gtk_window_set_icon(GTK_WINDOW(toplevel), pixbuf); g_object_unref(pixbuf); } -#endif /* WIN32_NATIVE */ +#endif /* FREECIV_MSWINDOWS */ setup_widgets(); load_cursors(); @@ -2093,7 +2093,7 @@ **************************************************************************/ void add_net_input(int sock) { -#ifdef WIN32_NATIVE +#ifdef FREECIV_MSWINDOWS srv_channel = g_io_channel_win32_new_socket(sock); #else srv_channel = g_io_channel_unix_new(sock); Modified: trunk/client/gui-gtk-3.0/mapview.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.0/mapview.c?rev=33312&r1=33311&r2=33312&view=diff ============================================================================== --- trunk/client/gui-gtk-3.0/mapview.c (original) +++ trunk/client/gui-gtk-3.0/mapview.c Sun Jul 24 12:25:49 2016 @@ -740,7 +740,7 @@ editgui_tileset_changed(); /* keep the icon of the executable on Windows (see PR#36491) */ -#ifndef WIN32_NATIVE +#ifndef FREECIV_MSWINDOWS { GdkPixbuf *pixbuf = sprite_get_pixbuf(get_icon_sprite(tileset, ICON_FREECIV)); @@ -748,5 +748,5 @@ gtk_window_set_icon(GTK_WINDOW(toplevel), pixbuf); g_object_unref(pixbuf); } -#endif /* WIN32_NATIVE */ -} +#endif /* FREECIV_MSWINDOWS */ +} Modified: trunk/client/gui-gtk-3.x/gui_main.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.x/gui_main.c?rev=33312&r1=33311&r2=33312&view=diff ============================================================================== --- trunk/client/gui-gtk-3.x/gui_main.c (original) +++ trunk/client/gui-gtk-3.x/gui_main.c Sun Jul 24 12:25:49 2016 @@ -1803,7 +1803,7 @@ tileset_load_tiles(tileset); /* keep the icon of the executable on Windows (see PR#36491) */ -#ifndef WIN32_NATIVE +#ifndef FREECIV_MSWINDOWS { GdkPixbuf *pixbuf = sprite_get_pixbuf(get_icon_sprite(tileset, ICON_FREECIV)); @@ -1811,7 +1811,7 @@ gtk_window_set_icon(GTK_WINDOW(toplevel), pixbuf); g_object_unref(pixbuf); } -#endif /* WIN32_NATIVE */ +#endif /* FREECIV_MSWINDOWS */ setup_widgets(); load_cursors(); @@ -2093,7 +2093,7 @@ **************************************************************************/ void add_net_input(int sock) { -#ifdef WIN32_NATIVE +#ifdef FREECIV_MSWINDOWS srv_channel = g_io_channel_win32_new_socket(sock); #else srv_channel = g_io_channel_unix_new(sock); Modified: trunk/client/gui-gtk-3.x/mapview.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.x/mapview.c?rev=33312&r1=33311&r2=33312&view=diff ============================================================================== --- trunk/client/gui-gtk-3.x/mapview.c (original) +++ trunk/client/gui-gtk-3.x/mapview.c Sun Jul 24 12:25:49 2016 @@ -751,7 +751,7 @@ editgui_tileset_changed(); /* keep the icon of the executable on Windows (see PR#36491) */ -#ifndef WIN32_NATIVE +#ifndef FREECIV_MSWINDOWS { GdkPixbuf *pixbuf = sprite_get_pixbuf(get_icon_sprite(tileset, ICON_FREECIV)); @@ -759,5 +759,5 @@ gtk_window_set_icon(GTK_WINDOW(toplevel), pixbuf); g_object_unref(pixbuf); } -#endif /* WIN32_NATIVE */ -} +#endif /* FREECIV_MSWINDOWS */ +} Modified: trunk/client/gui-sdl2/graphics.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-sdl2/graphics.c?rev=33312&r1=33311&r2=33312&view=diff ============================================================================== --- trunk/client/gui-sdl2/graphics.c (original) +++ trunk/client/gui-sdl2/graphics.c Sun Jul 24 12:25:49 2016 @@ -454,12 +454,12 @@ return alphablit(pSrc, NULL, pDest, &dest_rect, 255); } -/* - * this is center main application window function - * currently it work only for X but problem is that such - * functions will be needed by others enviroments. - * ( for X it's make by settings "SDL_VIDEO_CENTERED" enviroment ) - */ +/************************************************************************** + This is center main application window function + currently it work only for X but problem is that such + functions will be needed by others enviroments. + ( for X it's make by settings "SDL_VIDEO_CENTERED" enviroment ) +**************************************************************************/ int center_main_window_on_screen(void) { #if 0 @@ -468,12 +468,12 @@ SDL_VERSION(&myinfo.version); if (SDL_GetWMInfo(&myinfo) > 0) { -#ifdef WIN32_NATIVE +#ifdef FREECIV_MSWINDOWS /* Port ME - Write center window code with WinAPI instructions */ return 0; -#else /* WIN32_NATIVE */ +#else /* FREECIV_MSWINDOWS */ #if 0 /* this code is for X and is only example what should be write to other @@ -489,7 +489,7 @@ myinfo.info.x11.unlock_func(); #endif /* 0 */ return 0; -#endif /* WIN32_NATIVE */ +#endif /* FREECIV_MSWINDOWS */ } return -1; #endif /* 0 */ Modified: trunk/server/civserver.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/civserver.c?rev=33312&r1=33311&r2=33312&view=diff ============================================================================== --- trunk/server/civserver.c (original) +++ trunk/server/civserver.c Sun Jul 24 12:25:49 2016 @@ -34,7 +34,7 @@ #include <Dialogs.h> #endif -#ifdef WIN32_NATIVE +#ifdef FREECIV_MSWINDOWS #include <windows.h> #endif Modified: trunk/tools/mpgui_gtk2.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/tools/mpgui_gtk2.c?rev=33312&r1=33311&r2=33312&view=diff ============================================================================== --- trunk/tools/mpgui_gtk2.c (original) +++ trunk/tools/mpgui_gtk2.c Sun Jul 24 12:25:49 2016 @@ -601,7 +601,7 @@ _("Freeciv modpack installer (gtk2)")); /* Keep the icon of the executable on Windows */ -#ifndef WIN32_NATIVE +#ifndef FREECIV_MSWINDOWS { /* Unlike main client, this only works if installed. Ignore any * errors loading the icon. */ @@ -609,7 +609,7 @@ (void) gtk_window_set_icon_from_file(GTK_WINDOW(toplevel), MPICON_PATH, &err); } -#endif /* WIN32_NATIVE */ +#endif /* FREECIV_MSWINDOWS */ g_signal_connect(toplevel, "delete_event", G_CALLBACK(quit_dialog_callback), NULL); _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits