Update of /cvsroot/netrek/client/netrekxp/src
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv25602/src

Modified Files:
	map.c mswindow.c parsemeta.c socket.c sound.c 
Log Message:
Compile fixes picked up by VS6.  Including a SDB free() fix that
was causing exceptions, but only when running in debugger.
Don't know why never caught this one before.

Index: mswindow.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- mswindow.c	14 Mar 2007 23:24:09 -0000	1.46
+++ mswindow.c	17 Mar 2007 17:12:09 -0000	1.47
@@ -640,13 +640,11 @@
     SelectObject (localSDB->mem_dc, localSDB->old_bmp);
     DeleteObject (localSDB->mem_bmp);
     ReleaseDC (((Window *)localSDB->window)->hwnd, localSDB->win_dc);
-    free (localSDB->window);
     free (localSDB);
 
     SelectObject (mapSDB->mem_dc, mapSDB->old_bmp);
     DeleteObject (mapSDB->mem_bmp);
     ReleaseDC (((Window *)mapSDB->window)->hwnd, mapSDB->win_dc);
-    free (mapSDB->window);
     free (mapSDB);
 
     //WinKey Kill Library Stop

Index: sound.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/sound.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- sound.c	15 Mar 2007 01:44:33 -0000	1.35
+++ sound.c	17 Mar 2007 17:12:09 -0000	1.36
@@ -321,7 +321,7 @@
     if (angle >= 0)
     {
         // Adjust volume with distance and angle
-        if (Mix_SetPosition(channel, angle, distance) == 0)
+        if (Mix_SetPosition(channel, (char) angle, (char) distance) == 0)
         {
             LineToConsole("Mix_SetPosition: %s\n", Mix_GetError());
             return;
@@ -330,7 +330,7 @@
     else
     {
         // Adjust volume with distance
-        if (Mix_SetDistance(channel, distance) == 0)
+        if (Mix_SetDistance(channel, (char) distance) == 0)
         {
             LineToConsole("Mix_SetDistance: %s\n", Mix_GetError());
             return;

Index: socket.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/socket.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- socket.c	1 Mar 2007 07:35:45 -0000	1.22
+++ socket.c	17 Mar 2007 17:12:09 -0000	1.23
@@ -3472,7 +3472,7 @@
 		   ((struct you_spacket *) packet)->hostile,
 		   ((struct you_spacket *) packet)->swar,
 		   ((struct you_spacket *) packet)->armies,
-		   ntohs(((struct you_spacket *) packet)->flags),
+		   ntohl(((struct you_spacket *) packet)->flags),
 		   ntohl(((struct you_spacket *) packet)->damage),
 		   ntohl(((struct you_spacket *) packet)->shield),
 		   ntohl(((struct you_spacket *) packet)->fuel),

Index: parsemeta.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/parsemeta.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- parsemeta.c	11 Mar 2007 22:15:58 -0000	1.36
+++ parsemeta.c	17 Mar 2007 17:12:09 -0000	1.37
@@ -373,7 +373,7 @@
 
   /* send request to a multicast metaserver on local area network */
   address.sin_family = AF_INET;
-  address.sin_port = htons(metaPort);
+  address.sin_port = htons((u_short) metaPort);
   address.sin_addr.s_addr = inet_addr("224.0.0.1");
   if (metaVerbose)
     LineToConsole ("Requesting player list from nearby servers on %s\n",
@@ -392,7 +392,7 @@
   while (token != NULL) {
     /* compose the address structure */
     address.sin_family = AF_INET;
-    address.sin_port = htons(metaPort);
+    address.sin_port = htons((u_short) metaPort);
 
     /* skip any blanks */
     while (*token == ' ') token++;

Index: map.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/map.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- map.c	15 Mar 2007 19:09:48 -0000	1.28
+++ map.c	17 Mar 2007 17:12:09 -0000	1.29
@@ -879,7 +879,7 @@
                 lastRedraw[i] = 0;
             }
 
-            if (lastRedraw[i] == server_ups)
+            if (lastRedraw[i] == (u_int) server_ups)
             {
                 /* Redraw stationary ships every update so that these
                    ships are not hidden by planet updates. */