Update of /cvsroot/netrek/server/Vanilla/pledit
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23267/pledit

Modified Files:
	edit.c input.c pledit.h 
Log Message:
compilation fixes pledit

Index: pledit.h
===================================================================
RCS file: /cvsroot/netrek/server/Vanilla/pledit/pledit.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- pledit.h	28 Sep 2005 12:14:05 -0000	1.2
+++ pledit.h	8 May 2006 08:22:42 -0000	1.3
@@ -6,6 +6,11 @@
 
 #include "config.h"
 
+/* prototypes */
+void fatal(int nerrno, const char *fmt, ...);
+int get_input(WINDOW *w, int row, int col);
+int get_line(WINDOW *w, int row, int col, int width, char *buf);
+
 /* how many seconds to look at a popup (add more for slow terminals) */
 #define POP_DELAY	2
 

Index: edit.c
===================================================================
RCS file: /cvsroot/netrek/server/Vanilla/pledit/edit.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- edit.c	28 Sep 2005 12:14:05 -0000	1.2
+++ edit.c	8 May 2006 08:22:42 -0000	1.3
@@ -9,6 +9,7 @@
 #ifndef LTD_STATS
 
 #include <stdio.h>
+#include <unistd.h>
 #include <fcntl.h>
 #include <errno.h>
 #include <curses.h>
@@ -464,7 +465,7 @@
 }
 
 
-add_player()
+void add_player()
 {
     struct statentry *sep;
     int i;
@@ -586,12 +587,12 @@
 struct status *glp;
 {
     char *crypt(const char*, const char*);
-    int idx, newidx, res, new;
+    int idx, newidx, res, new = FALSE;
     char field[81], tmp[32];
     char oldpw[16];
     int ival;
-    float fval;
-    char *sval;
+    float fval = 0.0;
+    char *sval = '\0';
     saltbuf sb;
 
     strcpy(oldpw, sep->password);

Index: input.c
===================================================================
RCS file: /cvsroot/netrek/server/Vanilla/pledit/input.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- input.c	30 Sep 2005 05:57:43 -0000	1.2
+++ input.c	8 May 2006 08:22:42 -0000	1.3
@@ -10,6 +10,7 @@
 
 #include <stdio.h>
 #include <signal.h>
+#include <unistd.h>
 #include <curses.h>
 #include "pledit.h"
 #include "defs.h"
@@ -445,16 +446,12 @@
 
 /* called during editing */
 /* (result: 1 = no change, 2 = new string, -1/-2 = same but BKTAB, 3 = ESC) */
-int
-get_line(w, row, col, width, buf)
-WINDOW *w;
-int row, col, width;
-char *buf;
+int get_line(WINDOW *w, int row, int col, int width, char *buf)
 {
     enum { NOTHING, EDITING } mode;
     int changed, posn;
     int ch, res;
-    int match, last_match;
+    int match, last_match = 0;
     char new[81], blanks[81];
 
     strcpy(new, buf);
@@ -586,10 +583,7 @@
 
 
 /* called from main loop */
-int
-get_input(w, row, col)
-WINDOW *w;
-int row, col;
+int get_input(WINDOW *w, int row, int col)
 {
     int key;