Update of /cvsroot/netrek/client/netrekxp/src
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv25648/src
Modified Files:
data.c defaults.c mswindow.c socket.c
Log Message:
Remove CONTROL_KEY define, add comment about sensing if
control key is down in the keyboard handler function.
Remove RABBIT_EARS, USE_PORTSWAP, NEW_DASHBOARD_2,
these defines were unused.
Remove UDP_PORTSWAP define. Fix bug in sendUdpReq() if portswap
was off with UDP_PORTSWAP defined.
Index: mswindow.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -d -r1.94 -r1.95
--- mswindow.c 8 Jun 2009 22:55:03 -0000 1.94
+++ mswindow.c 9 Jun 2009 01:04:33 -0000 1.95
@@ -2501,14 +2501,11 @@
EventQueue[EventTail].type = W_EV_KEY;
-#ifdef CONTROL_KEY
- if (use_control_key && (GetKeyState (VK_CONTROL) & ~0x1))
+ /* Check if it control key is down - use control keymap */
+ if (GetKeyState (VK_CONTROL) & ~0x1)
EventQueue[EventTail].key = (unsigned char) (j + 96);
else
EventQueue[EventTail].key = (unsigned char) j;
-#else
- EventQueue[EventTail].key = (unsigned char) j;
-#endif
return (0);
case WM_MOUSEMOVE:
Index: defaults.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -d -r1.103 -r1.104
--- defaults.c 9 Jun 2009 00:28:10 -0000 1.103
+++ defaults.c 9 Jun 2009 01:04:33 -0000 1.104
@@ -530,14 +530,12 @@
NULL
}
},
-#ifdef UDP_PORTSWAP
{"portSwap", &portSwap, RC_BOOL,
{
- "Use new UDP code",
+ "Swap ports around to try to use UDP through firewalls",
NULL
}
},
-#endif
{"puckArrow", &puckArrow, RC_BOOL,
{
"Put a small tic mark on the puck to indicate its direction",
@@ -1911,9 +1909,7 @@
shellTools = booleanDefault ("shellTools", shellTools);
#endif
-#ifdef UDP_PORTSWAP
portSwap = booleanDefault ("portSwap", TRUE);
-#endif
#ifdef BEEPLITE
defLite = booleanDefault("defLite", defLite);
Index: socket.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/socket.c,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -d -r1.73 -r1.74
--- socket.c 9 Jun 2009 00:08:04 -0000 1.73
+++ socket.c 9 Jun 2009 01:04:33 -0000 1.74
@@ -4209,12 +4209,10 @@
}
#endif
-#ifdef UDP_PORTSWAP
if (portSwap)
packet.connmode = CONNMODE_PORT; /* have him send his port */
-#else
- packet.connmode = CONNMODE_PACKET; /* we get addr from packet */
-#endif
+ else
+ packet.connmode = CONNMODE_PACKET; /* we get addr from packet */
sendServerPacket ((struct player_spacket *) &packet);
@@ -4230,9 +4228,7 @@
UDPDIAG (("Sent request for %s mode\n", (req == COMM_TCP) ?
"TCP" : "UDP"));
-#ifdef UDP_PORTSWAP
if (!portSwap)
-#endif
if ((req == COMM_UDP) && recvUdpConn () < 0)
{
UDPDIAG (("Sending TCP reset message\n"));
@@ -4296,8 +4292,6 @@
}
else
{
-
-#ifdef UDP_PORTSWAP
if (portSwap)
{
udpServerPort = ntohl (packet->port);
@@ -4319,11 +4313,8 @@
goto send;
}
}
-#else
/* this came down UDP, so we MUST be connected */
/* (do the verify thing anyway just for kicks) */
-#endif
-
UDPDIAG (("Connected to server's UDP port\n"));
commStatus = STAT_VERIFY_UDP;
if (udpWin)
@@ -4465,7 +4456,6 @@
return (0);
}
-#ifdef UDP_PORTSWAP
int
connUdpConn ()
{
@@ -4488,8 +4478,6 @@
return (0);
}
-#endif
-
int
recvUdpConn (void)
{
Index: data.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -d -r1.129 -r1.130
--- data.c 9 Jun 2009 00:28:10 -0000 1.129
+++ data.c 9 Jun 2009 01:04:33 -0000 1.130
@@ -667,11 +667,6 @@
#endif
-#ifdef CONTROL_KEY
-int use_control_key = 1;
-
-#endif
-
#ifdef DOC_WIN
W_Window docwin = NULL, xtrekrcwin = NULL;
int maxdoclines = 0, maxxtrekrclines = 0;
@@ -752,9 +747,7 @@
int F_dead_warp = 0;
#endif
-#ifdef UDP_PORTSWAP
-int portSwap = 0;
-#endif
+int portSwap = 0; /* Swap ports around to try to use UDP through firewalls */
// Load Ship Bitmaps from .BMP files
char *fed_ship_bmp;