--- hiscore.c.orig	Sun May  5 04:09:25 1996
+++ hiscore.c	Sun Oct 31 23:23:42 1999
@@ -5,6 +5,9 @@
  * Copyleft  (c) 1994-1996  Software Research Academy                   *
  ************************************************************************/
 #include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include "config.h"
@@ -12,7 +15,7 @@
 
 static struct Hiscore hiscore[4];
 
-static char *lockf = LOCK_FILE;
+static char *lockfn = LOCK_FILE;
 static char *hiscoref = HISCORE_FILE;
 extern char *same_dir;
 static int lock_file(
@@ -75,7 +78,7 @@
 				break;
 			}
 		}
-		if(i < 10 | new == 1)
+		if(i < 10 || new == 1)
 		{
 			if(lock_file(0) != 0)
 				return(-1);
@@ -98,7 +101,7 @@
 	char lkf[256];
 	int i;
 
-	sprintf(lkf,"%s/%s", same_dir, lockf);
+	sprintf(lkf,"%s/%s", same_dir, lockfn);
 	if(cmd == 1)
 	{
 		if(remove(lkf) != 0)
--- inifile.c.orig	Sun May  5 04:09:25 1996
+++ inifile.c	Sun Oct 31 23:23:42 1999
@@ -5,6 +5,8 @@
  * Copyleft  (c) 1994-1996  Software Research Academy                   *
  ************************************************************************/
 #include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 
 #include "sxsame.h"
 
--- loadbmp.c.orig	Sun May  5 04:09:25 1996
+++ loadbmp.c	Sun Oct 31 23:23:42 1999
@@ -5,6 +5,8 @@
  * Copyleft  (c) 1994-1996  Software Research Academy                   *
  ************************************************************************/
 #include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 #include <X11/Xlib.h>
 #include "sxsame.h"
 
--- loaddata.c.orig	Sun May  5 04:09:25 1996
+++ loaddata.c	Sun Oct 31 23:24:02 1999
@@ -5,6 +5,8 @@
  * Copyleft  (c) 1994-1996  Software Research Academy                   *
  ************************************************************************/
 #include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 #include "config.h"
 #include "sxsame.h"
 
@@ -94,7 +96,7 @@
 	{
 		for(j=0;j<5;j++)
 		{
-			data->xpm_data[i][j] == 0;
+			data->xpm_data[i][j] = 0;
 		}
 	}
 	data->bg_data = 0;
--- sxsame.c.orig	Sun May  5 04:09:26 1996
+++ sxsame.c	Sun Oct 31 23:23:42 1999
@@ -12,6 +12,10 @@
 char *program_version = "3.02";
 
 #include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <time.h>
+#include <string.h>
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
 #ifndef LOCAL_XPM_H
@@ -163,11 +167,21 @@
 int      hisc_height = 80;
 #endif /* !ENABLE_HISCORE */
 
-
+int ReadInitFile(int* width, int* height, int* same_pic);
+int SaveInitFile(int width, int height, int same_pic);
 int CheckSameDataFile(DataFile ***);
 int LoadBMPSameData(Display *dpy, Colormap cmap, SameGame *, char *);
 int LoadSameData(ImportSameData *, char *);
+int CheckSelectSame(int sx, int sy);
+
+static
+int
+Access(const char* path)
+{
+	return access(path, R_OK);
+}
 
+# define access(x)	Access(x)		
 
 void main(argc, argv)
 int argc;
