Index: mmv.c
--- mmv.c.orig
+++ mmv.c
@@ -88,7 +88,6 @@ on the command line.\n";
 #endif
 
 #include <stdio.h>
-#include <ctype.h>
 
 #ifdef MSDOS
 /* for MS-DOS (under Turbo C 1.5)*/
@@ -121,14 +120,14 @@ extern unsigned _stklen = 10000;
 #else
 /* for various flavors of UN*X */
 
+#include <string.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/file.h>
+#include <ctype.h>
+#include <stdlib.h>
+#include <unistd.h>
 
-extern char *getenv();
-extern long lseek();
-extern char *malloc();
-
 #ifdef DIRENT
 #include <dirent.h>
 typedef struct dirent DIRENTRY;
@@ -142,8 +141,6 @@ typedef struct dirent DIRENTRY;
 typedef struct direct DIRENTRY;
 #endif
 
-#define void char	/* might want to remove this line */
-
 #ifndef O_BINARY
 #define O_BINARY 0
 #endif
@@ -176,7 +173,6 @@ extern char *strcpy(), *strchr();
 
 #else
 /* for System V and BSD */
-#include <string.h>
 #include <sys/signal.h>
 #include <fcntl.h>
 #endif
@@ -370,7 +366,7 @@ static int movealias(/* REP *first, REP *p, int *pprin
 static int snap(/* REP *first, REP *p */);
 static void showdone(/* REP *fin */);
 static void breakout(/*  */);
-static int breakrep(/* */);
+static void breakrep(/* */);
 static void breakstat(/* */);
 static void quit(/*  */);
 static int copymove(/* REP *p */);
@@ -389,7 +385,6 @@ static void cleanup(/*  */);
 static int getstat(/* char *full, FILEINFO *f */);
 static int dwritable(/* HANDLE *h */);
 static int fwritable(/* char *hname, FILEINFO *f */);
-static void memmove(/* void *to, void *from, int k */);
 #endif
 #ifndef RENAME
 static int rename(/* char *from, char *to */);
@@ -410,7 +405,7 @@ static CHUNK *freechunks = NULL;
 static SLICER slicer[2] = {{NULL, NULL, 0}, {NULL, NULL, 0}};
 
 static int badreps = 0, paterr = 0, direrr, failed = 0, gotsig = 0, repbad;
-static FILE *outfile = stdout;
+static FILE *outfile;
 
 static char IDF[] = "$$mmvdid.";
 static char TEMP[] = "$$mmvtmp.";
@@ -471,6 +466,7 @@ int main(argc, argv)
 {
 	char *frompat, *topat;
 
+	outfile = stdout;
 	init();
 	procargs(argc, argv, &frompat, &topat);
 	domatch(frompat, topat);
@@ -2550,10 +2546,9 @@ static void breakout()
 }
 
 
-static int breakrep()
+static void breakrep()
 {
 	gotsig = 1;
-	return(1);
 }
 
 
@@ -2745,7 +2740,7 @@ static int getreply(m, failact)
 	static FILE *tty = NULL;
 	int c, r;
 
-	fprintf(stderr, m);
+	fprintf(stderr, "%s", m);
 	if (tty == NULL && (tty = fopen(TTY, "r")) == NULL) {
 		fprintf(stderr, "Can not open %s to get reply.\n", TTY);
 		if (failact == -1)
@@ -2832,7 +2827,7 @@ static void chgive(p, k)
 }
 
 
-#ifndef MSDOS
+#if 0
 static void memmove(to, from, k)
 	char *to, *from;
 	unsigned k;
