Update of /cvsroot/netrek/client/cow
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv10864

Modified Files:
	ChangeLog defaults.c input.c mkcflags.c reserved.c socket.c 
	x11window.c 
Log Message:
some compilation fixes

Index: ChangeLog
===================================================================
RCS file: /cvsroot/netrek/client/cow/ChangeLog,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- ChangeLog	16 May 2006 06:16:35 -0000	1.28
+++ ChangeLog	16 May 2006 06:25:25 -0000	1.29
@@ -1,3 +1,8 @@
+Tue May 16 16:21:29 2006  James Cameron  <quozl at us.netrek.org>
+
+	* x11window.c, socket.c, reserved.c, mkcflags.c, input.c, defaults.c:
+	compilation fixes.
+
 Tue May 16 15:51:12 2006  Bill Balcerski  <williamb at its.caltech.edu>
 
 	* newwin.c (newwin): enlarge planet list window.

Index: input.c
===================================================================
RCS file: /cvsroot/netrek/client/cow/input.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- input.c	22 Jun 2002 04:43:24 -0000	1.11
+++ input.c	16 May 2006 06:25:25 -0000	1.12
@@ -2,6 +2,9 @@
 /* input.c
  *
  * $Log$
+ * Revision 1.12  2006/05/16 06:25:25  quozl
+ * some compilation fixes
+ *
  * Revision 1.11  2002/06/22 04:43:24  tanner
  * Clean up of SDL code. #ifdef'd out functions not needed in SDL.
  *
@@ -476,7 +479,7 @@
     {
       unsigned char   *p;
 
-      if (strlen(str) == 1)
+      if (strlen((char *)str) == 1)
 	{
 	  /* This is a little pointless, but it'll preform as per * the *
 	   * documentation */
@@ -484,12 +487,12 @@
 	}
       else if (!strcmpi(str, "TAB"))
 	{
-	  p = "^i";
+	  p = (unsigned char *) "^i";
 	  mystats->st_keymap[getctrlkey(&p) - 32] = 'X';
 	}
       else if (!strcmpi(str, "ESC"))
 	{
-	  p = "^[";
+	  p = (unsigned char *) "^[";
 	  mystats->st_keymap[getctrlkey(&p) - 32] = 'X';
 	}
     }

Index: mkcflags.c
===================================================================
RCS file: /cvsroot/netrek/client/cow/mkcflags.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- mkcflags.c	28 Feb 2006 01:45:56 -0000	1.3
+++ mkcflags.c	16 May 2006 06:25:25 -0000	1.4
@@ -1,5 +1,6 @@
 #include "config.h"
 
+#include <stdlib.h>
 #include <stdio.h>
 #include <sys/types.h>
 
@@ -21,6 +22,9 @@
 /*****************************************************************************/
 /*
  * $Log$
+ * Revision 1.4  2006/05/16 06:25:25  quozl
+ * some compilation fixes
+ *
  * Revision 1.3  2006/02/28 01:45:56  quozl
  * prerelease
  *

Index: defaults.c
===================================================================
RCS file: /cvsroot/netrek/client/cow/defaults.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- defaults.c	28 Apr 2001 04:03:56 -0000	1.4
+++ defaults.c	16 May 2006 06:25:25 -0000	1.5
@@ -8,6 +8,9 @@
 /****************************************************************************/
 /*
  * $Log$
+ * Revision 1.5  2006/05/16 06:25:25  quozl
+ * some compilation fixes
+ *
  * Revision 1.4  2001/04/28 04:03:56  quozl
  * change -U to also adopt a local port number for TCP mode.
  * 		-- Benjamin `Quisar' Lerman  <quisar at quisar.ambre.net>
@@ -25,6 +28,7 @@
 #include "config.h"
 #include "copyright2.h"
 #include <stdio.h>
+#include <string.h>
 #include "Wlib.h"
 #include "defs.h"
 #include "struct.h"
@@ -366,7 +370,7 @@
 	{
 	  int     keycnt;
 
-	  if ((keycnt = strlen(keys)) == MAX_KEY - 1)
+	  if ((keycnt = strlen((char *) keys)) == MAX_KEY - 1)
 	    {
 	      fprintf(stderr, "Maximum number of keys is %d\n", MAX_KEY - 1);
 	    }

Index: reserved.c
===================================================================
RCS file: /cvsroot/netrek/client/cow/reserved.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- reserved.c	25 Mar 1999 20:56:26 -0000	1.2
+++ reserved.c	16 May 2006 06:25:25 -0000	1.3
@@ -4,6 +4,9 @@
  * Kevin P. Smith   7/3/89
  *
  * $Log$
+ * Revision 1.3  2006/05/16 06:25:25  quozl
+ * some compilation fixes
+ *
  * Revision 1.2  1999/03/25 20:56:26  siegl
  * CygWin32 autoconfig fixes
  *
@@ -86,7 +89,7 @@
   if (netaddr == 0)
     {
       len = sizeof(saddr);
-      if (getpeername(sock, (struct sockaddr *) &saddr, &len) < 0)
+      if (getpeername(sock, (struct sockaddr *) &saddr, (socklen_t *) &len) < 0)
 	{
 	  perror("getpeername(sock)");
 	  terminate(1);

Index: x11window.c
===================================================================
RCS file: /cvsroot/netrek/client/cow/x11window.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- x11window.c	22 Jun 2002 04:43:24 -0000	1.6
+++ x11window.c	16 May 2006 06:25:25 -0000	1.7
@@ -4,6 +4,9 @@
  * Kevin P. Smith  6/11/89 Much modified by Jerry Frain and Joe Young
  *
  * $Log$
+ * Revision 1.7  2006/05/16 06:25:25  quozl
+ * some compilation fixes
+ *
  * Revision 1.6  2002/06/22 04:43:24  tanner
  * Clean up of SDL code. #ifdef'd out functions not needed in SDL.
  *
@@ -30,6 +33,7 @@
 
 #include "config.h"
 #include <stdio.h>
+#include <stdlib.h>
 #include INC_SYS_SELECT
 #include INC_STRINGS
 #include <X11/Xlib.h>
@@ -1364,9 +1368,9 @@
 	  if (
 
 #ifdef FUNCTION_KEYS
-	     ((XLookupString(key, &ch, 1, &sym, NULL) > 0) || sym == XK_Tab)
+	     ((XLookupString(key, (char *) &ch, 1, &sym, NULL) > 0) || sym == XK_Tab)
 #else
-	       (XLookupString(key, &ch, 1, NULL, NULL) > 0)
+	       (XLookupString(key, (char *) &ch, 1, NULL, NULL) > 0)
 #endif
 
 	      )

Index: socket.c
===================================================================
RCS file: /cvsroot/netrek/client/cow/socket.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- socket.c	27 Jan 2006 09:57:27 -0000	1.8
+++ socket.c	16 May 2006 06:25:25 -0000	1.9
@@ -8,6 +8,9 @@
  * Routines to allow connection to the xtrek server.
  *
  * $Log$
+ * Revision 1.9  2006/05/16 06:25:25  quozl
+ * some compilation fixes
+ *
  * Revision 1.8  2006/01/27 09:57:27  quozl
  * *** empty log message ***
  *
@@ -751,7 +754,7 @@
       terminate(0);
     }
 
-  sock = accept(s, (struct sockaddr *) &naddr, &len);
+  sock = accept(s, (struct sockaddr *) &naddr, (socklen_t *) &len);
 
   if (sock == -1)
     {
@@ -771,7 +774,7 @@
    * "serverName" and "serveraddr" appropriately. */
   len = sizeof(struct sockaddr_in);
 
-  if (getpeername(sock, (struct sockaddr *) &addr, &len) < 0)
+  if (getpeername(sock, (struct sockaddr *) &addr, (socklen_t *) &len) < 0)
     {
       perror("unable to get peername");
       serverName = "nowhere";
@@ -1511,6 +1514,9 @@
   if (!F_many_self)
     {
       me = (ghoststart ? &players[ghost_pno] : pl);
+      if (log_packets) {
+	fprintf(stderr, "handleSelf: my player number is %d\n", packet->pnum);
+      }
       myship = &(me->p_ship);
       mystats = &(me->p_stats);
     }