summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--airport_gui.c9
-rw-r--r--network_core.h6
-rw-r--r--win32.c4
3 files changed, 9 insertions, 10 deletions
diff --git a/airport_gui.c b/airport_gui.c
index 235cb7494..fea726ef6 100644
--- a/airport_gui.c
+++ b/airport_gui.c
@@ -122,11 +122,10 @@ void ShowBuildAirToolbar()
static void BuildAirportPickerWndProc(Window *w, WindowEvent *e)
{
- int rad;
-
switch(e->event) {
case WE_PAINT: {
int sel;
+ int rad = 4; // default catchment radious
if (WP(w,def_d).close)
return;
@@ -154,12 +153,8 @@ static void BuildAirportPickerWndProc(Window *w, WindowEvent *e)
case AT_LARGE: rad = CA_AIR_LARGE; break;
case AT_METROPOLITAN: rad = CA_AIR_METRO; break;
case AT_INTERNATIONAL: rad = CA_AIR_INTER; break;
- default: rad = 4; break;
}
- } else {
- rad = 4;
- }
-
+ }
if (_station_show_coverage) SetTileSelectBigSize(-rad, -rad, 2 * rad, 2 * rad);
diff --git a/network_core.h b/network_core.h
index c426b1957..d6a408c33 100644
--- a/network_core.h
+++ b/network_core.h
@@ -12,7 +12,11 @@
# include <windows.h>
# include <winsock2.h>
# include <ws2tcpip.h>
-# pragma comment (lib, "ws2_32.lib")
+
+#ifdef _MSC_VER
+#pragma comment (lib, "ws2_32.lib")
+#endif //_MSC_VER
+
# define ENABLE_NETWORK // On windows, the network is always enabled
# define GET_LAST_ERROR() WSAGetLastError()
# define EWOULDBLOCK WSAEWOULDBLOCK
diff --git a/win32.c b/win32.c
index 98102760f..8e07c41d1 100644
--- a/win32.c
+++ b/win32.c
@@ -1533,7 +1533,7 @@ FiosItem *FiosGetSavegameList(int *num, int mode)
if (h != INVALID_HANDLE_VALUE) {
do {
if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY &&
- !(fd.cFileName[0]=='.' && (fd.cFileName[1]==0 || fd.cFileName[1]=='.' && fd.cFileName[2]==0))) {
+ !(fd.cFileName[0] == '.' && (fd.cFileName[1] == 0 || (fd.cFileName[1] == '.' && fd.cFileName[2] == 0)))) {
fios = FiosAlloc();
fios->type = FIOS_TYPE_DIR;
strcpy(fios->name, fd.cFileName);
@@ -1631,7 +1631,7 @@ FiosItem *FiosGetScenarioList(int *num, int mode)
if (h != INVALID_HANDLE_VALUE && mode != SLD_NEW_GAME) {
do {
if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY &&
- !(fd.cFileName[0]=='.' && (fd.cFileName[1]==0 || fd.cFileName[1]=='.' && fd.cFileName[2]==0))) {
+ !(fd.cFileName[0] == '.' && (fd.cFileName[1] == 0 || (fd.cFileName[1] == '.' && fd.cFileName[2] == 0)))) {
fios = FiosAlloc();
fios->type = FIOS_TYPE_DIR;
strcpy(fios->name, fd.cFileName);