c85a02f
diff -up magicpoint-1.11b/image/path.c~ magicpoint-1.11b/image/path.c
c85a02f
--- magicpoint-1.11b/image/path.c~	2008-03-30 22:02:58.000000000 +0200
c85a02f
+++ magicpoint-1.11b/image/path.c	2008-03-30 22:02:58.000000000 +0200
c85a02f
@@ -20,9 +20,7 @@
c85a02f
 #if 1 /* SYSV */
c85a02f
 #include <unistd.h>
c85a02f
 #endif
c85a02f
-#ifdef __APPLE__
c85a02f
 #include <stdlib.h>
c85a02f
-#endif
c85a02f
 
c85a02f
 /* SUPPRESS 530 */
c85a02f
 /* SUPPRESS 560 */
c85a02f
diff -up magicpoint-1.11b/image/window.c~ magicpoint-1.11b/image/window.c
c85a02f
--- magicpoint-1.11b/image/window.c~	2008-03-30 22:04:06.000000000 +0200
c85a02f
+++ magicpoint-1.11b/image/window.c	2008-03-30 22:05:22.000000000 +0200
c85a02f
@@ -16,7 +16,7 @@
c85a02f
 #include <signal.h>
c85a02f
 #include <errno.h>
c85a02f
 #include <sys/types.h>
c85a02f
-#ifdef SYSV
c85a02f
+#if 1 /* SYSV */
c85a02f
 #include <unistd.h>
c85a02f
 #endif
c85a02f
 #if TIME_WITH_SYS_TIME
c85a02f
diff -up magicpoint-1.11b/image/misc.c~ magicpoint-1.11b/image/misc.c
c85a02f
--- magicpoint-1.11b/image/misc.c~	2008-03-30 22:01:28.000000000 +0200
c85a02f
+++ magicpoint-1.11b/image/misc.c	2008-03-30 22:01:28.000000000 +0200
c85a02f
@@ -12,9 +12,7 @@
c85a02f
 #include "xloadimage.h"
c85a02f
 #include "patchlevel"
c85a02f
 #include <signal.h>
c85a02f
-#ifdef __APPLE__
c85a02f
 #include <stdlib.h>
c85a02f
-#endif
c85a02f
 
c85a02f
 extern int      _Xdebug;
c85a02f
 extern Display *display;
c85a02f
diff -up magicpoint-1.11b/draw.c~ magicpoint-1.11b/draw.c
c85a02f
--- magicpoint-1.11b/draw.c~	2008-03-30 21:50:02.000000000 +0200
c85a02f
+++ magicpoint-1.11b/draw.c	2008-03-30 21:50:02.000000000 +0200
c85a02f
@@ -2660,7 +2660,7 @@ x_setfont(xfont, csize, registry, truesc
c85a02f
 			fprintf(stderr, "using best [%d] <%s>\n",
c85a02f
 				best, fontlist[best]);
c85a02f
 		}
c85a02f
-		strlcpy(fontstring, fontlist[best], sizeof(fontstring));
c85a02f
+		snprintf(fontstring, sizeof(fontstring), "%s", fontlist[best]);
c85a02f
 	} else if (scalable >= 0 || tscalable >= 0) {
c85a02f
 		x_fontname(fontstring, sizeof(fontstring), xfont, csize,
c85a02f
 		    registry);
c85a02f
@@ -4911,23 +4911,23 @@ xft_setfont(xfontarg, csize, registry)
c85a02f
 	 */
c85a02f
 	if ((p = strchr(xfont, '-')) != NULL) {
c85a02f
 		*p++ = 0;
c85a02f
-		strlcpy(font, xfont, sizeof(font));
c85a02f
+		snprintf(font, sizeof(font), "%s", xfont);
c85a02f
 		if (strncmp(p, "bold-i", 6) == 0)
c85a02f
-			strlcpy(style, "Bold Italic", sizeof(style));
c85a02f
+			snprintf(style, sizeof(style), "%s", "Bold Italic");
c85a02f
 		else if (strncmp(p, "bold-", 5) == 0)
c85a02f
-			strlcpy(style, "Bold", sizeof(style));
c85a02f
+			snprintf(style, sizeof(style), "%s", "Bold");
c85a02f
 		else if ((p = strchr(p, '-')) != NULL && p[1] == 'i')
c85a02f
-			strlcpy(style, "Italic", sizeof(style));
c85a02f
+			snprintf(style, sizeof(style), "%s", "Italic");
c85a02f
 	} else if ((p = strchr(xfont, ':')) == NULL)
c85a02f
-		strlcpy(font, xfont, sizeof(font));
c85a02f
+		snprintf(font, sizeof(font), "%s", xfont);
c85a02f
 	else {
c85a02f
 		p2 = p +1;
c85a02f
 		/* allow to use ":style=" syntax */ 
c85a02f
 		if ((strstr(p2, "style=") != NULL) || (strstr(p2, "STYLE=") != NULL)) 
c85a02f
 			p2 += 6;
c85a02f
 		*p = '\0';
c85a02f
-		strlcpy(font, xfont, sizeof(font));
c85a02f
-		strlcpy(style, p2, sizeof(style));
c85a02f
+		snprintf(font, sizeof(font), "%s", xfont);
c85a02f
+		snprintf(style, sizeof(style), "%s", p2);
c85a02f
 	}
c85a02f
 	if (style[0]) {
c85a02f
 		xftfont = XftFontOpen(display, screen,
c85a02f
diff -up magicpoint-1.11b/contrib/xwintoppm/dsimple.c~ magicpoint-1.11b/contrib/xwintoppm/dsimple.c
c85a02f
--- magicpoint-1.11b/contrib/xwintoppm/dsimple.c~	2008-03-30 22:13:20.000000000 +0200
c85a02f
+++ magicpoint-1.11b/contrib/xwintoppm/dsimple.c	2008-03-30 22:13:20.000000000 +0200
c85a02f
@@ -57,6 +57,7 @@ void blip();
c85a02f
 Window Window_With_Name();
c85a02f
 void Fatal_Error();
c85a02f
 void outl(char *msg, ...);
c85a02f
+int usage(void);
c85a02f
 
c85a02f
 /*
c85a02f
  * Just_display: A group of routines designed to make the writting of simple
c85a02f
diff -up magicpoint-1.11b/contrib/xwintoppm/xwintoppm.c~ magicpoint-1.11b/contrib/xwintoppm/xwintoppm.c
c85a02f
--- magicpoint-1.11b/contrib/xwintoppm/xwintoppm.c~	2008-03-30 22:11:46.000000000 +0200
c85a02f
+++ magicpoint-1.11b/contrib/xwintoppm/xwintoppm.c	2008-03-30 22:13:40.000000000 +0200
c85a02f
@@ -96,6 +96,7 @@ in this Software without prior written a
c85a02f
 %*/
c85a02f
 
c85a02f
 #include <stdio.h>
c85a02f
+#include <stdarg.h>
c85a02f
 #include <errno.h>
c85a02f
 #include <X11/Xos.h>
c85a02f
 
c85a02f
@@ -125,6 +126,12 @@ typedef unsigned long Pixel;
c85a02f
 #include <X11/extensions/XKBbells.h>
c85a02f
 #endif
c85a02f
 
c85a02f
+int usage(void);
c85a02f
+int Error(char *);
c85a02f
+void outl(char *msg, ...);
c85a02f
+int Image_Size(XImage *image);
c85a02f
+int Get_XColors(XWindowAttributes *win_info, XColor **colors);
c85a02f
+          
c85a02f
 /* Setable Options */
c85a02f
 
c85a02f
 int format = ZPixmap;
c85a02f
diff -up magicpoint-1.11b/mgp.h~ magicpoint-1.11b/mgp.h
c85a02f
--- magicpoint-1.11b/mgp.h~	2008-03-30 21:59:13.000000000 +0200
c85a02f
+++ magicpoint-1.11b/mgp.h	2008-03-30 21:59:13.000000000 +0200
c85a02f
@@ -799,6 +799,7 @@ extern XImage *tfc_image __P((struct tfo
c85a02f
 
c85a02f
 /* unimap.c */
c85a02f
 extern void latin_unicode_map_init();
c85a02f
+extern void unicode_map_init();
c85a02f
 
c85a02f
 /* embed.c */
c85a02f
 extern char *embed_fname __P((char *));
c85a02f
diff -up magicpoint-1.11b/mgp.c~ magicpoint-1.11b/mgp.c
c85a02f
--- magicpoint-1.11b/mgp.c~	2008-03-30 21:45:20.000000000 +0200
c85a02f
+++ magicpoint-1.11b/mgp.c	2008-03-30 21:45:20.000000000 +0200
c85a02f
@@ -441,7 +441,7 @@ main(argc, argv)
c85a02f
     }
c85a02f
 
c85a02f
 	init_win1(xgeometry);
c85a02f
-	strlcpy(buf, mgp_fname, sizeof(buf));
c85a02f
+	snprintf(buf, sizeof(buf), "%s", mgp_fname);
c85a02f
 	if ((p = rindex(buf, '/'))) {
c85a02f
 		*p = '\0';
c85a02f
         	Paths[NumPaths++]= expandPath(buf);
c85a02f
diff -up magicpoint-1.11b/grammar.y~ magicpoint-1.11b/grammar.y
c85a02f
--- magicpoint-1.11b/grammar.y~	2008-03-30 22:17:54.000000000 +0200
c85a02f
+++ magicpoint-1.11b/grammar.y	2008-03-30 22:17:54.000000000 +0200
c85a02f
@@ -74,6 +74,7 @@ int n_errors = 0;
c85a02f
 struct ctrl *root;
c85a02f
 char *yyfilename;
c85a02f
 int yylineno;
c85a02f
+extern int yylex (void);
c85a02f
 
c85a02f
 #ifdef HAVE_STDARG_H
c85a02f
 /* GCC complains if we declare this function in traditional style */