diff --git a/dutmp.c b/dutmp.c
index c5307b6..a9e879d 100644
--- a/dutmp.c
+++ b/dutmp.c
@@ -19,7 +19,7 @@
     "\tDump file or stdin utmp file format to stdout, pipe delimited.\n"
     "\tdutmp /var/run/utmp\n";
 
-static int dutmp_main (int argc, char **argv)
+extern int dutmp_main (int argc, char **argv)
 {
 
     FILE *f = stdin;
diff --git a/findutils/grep.c b/findutils/grep.c
index 9495bf8..50a2961 100644
--- a/findutils/grep.c
+++ b/findutils/grep.c
@@ -43,6 +43,33 @@
 "This version of grep matches strings (not full regexps).\n";
 #endif
 
+int tellName=TRUE;
+int ignoreCase=FALSE;
+int tellLine=FALSE;
+
+static do_grep(char* needle, char* haystack )
+{
+	line = 0;
+
+	while (fgets (haystack, sizeof (haystack), fp)) {
+	    line++;
+	    cp = &haystack[strlen (haystack) - 1];
+
+	    if (*cp != '\n')
+		fprintf (stderr, "%s: Line too long\n", name);
+
+	    if (find_match(haystack, needle, ignoreCase) == TRUE) {
+		if (tellName==TRUE)
+		    printf ("%s: ", name);
+
+		if (tellLine==TRUE)
+		    printf ("%ld: ", line);
+
+		fputs (haystack, stdout);
+	    }
+	}
+}
+
 
 extern int grep_main (int argc, char **argv)
 {
@@ -50,9 +77,6 @@
     char *needle;
     char *name;
     char *cp;
-    int tellName=TRUE;
-    int ignoreCase=FALSE;
-    int tellLine=FALSE;
     long line;
     char haystack[BUF_SIZE];
 
@@ -91,7 +115,16 @@
     needle = *argv++;
     argc--;
 
+
     while (argc-- > 0) {
+
+	if (argc==0) {
+	    file = stdin;
+	}
+	else
+	    file = fopen(*argv, "r");
+
+
 	name = *argv++;
 
 	fp = fopen (name, "r");
@@ -100,26 +133,6 @@
 	    continue;
 	}
 
-	line = 0;
-
-	while (fgets (haystack, sizeof (haystack), fp)) {
-	    line++;
-	    cp = &haystack[strlen (haystack) - 1];
-
-	    if (*cp != '\n')
-		fprintf (stderr, "%s: Line too long\n", name);
-
-	    if (find_match(haystack, needle, ignoreCase) == TRUE) {
-		if (tellName==TRUE)
-		    printf ("%s: ", name);
-
-		if (tellLine==TRUE)
-		    printf ("%ld: ", line);
-
-		fputs (haystack, stdout);
-	    }
-	}
-
 	if (ferror (fp))
 	    perror (name);
 
diff --git a/grep.c b/grep.c
index 9495bf8..50a2961 100644
--- a/grep.c
+++ b/grep.c
@@ -43,6 +43,33 @@
 "This version of grep matches strings (not full regexps).\n";
 #endif
 
+int tellName=TRUE;
+int ignoreCase=FALSE;
+int tellLine=FALSE;
+
+static do_grep(char* needle, char* haystack )
+{
+	line = 0;
+
+	while (fgets (haystack, sizeof (haystack), fp)) {
+	    line++;
+	    cp = &haystack[strlen (haystack) - 1];
+
+	    if (*cp != '\n')
+		fprintf (stderr, "%s: Line too long\n", name);
+
+	    if (find_match(haystack, needle, ignoreCase) == TRUE) {
+		if (tellName==TRUE)
+		    printf ("%s: ", name);
+
+		if (tellLine==TRUE)
+		    printf ("%ld: ", line);
+
+		fputs (haystack, stdout);
+	    }
+	}
+}
+
 
 extern int grep_main (int argc, char **argv)
 {
@@ -50,9 +77,6 @@
     char *needle;
     char *name;
     char *cp;
-    int tellName=TRUE;
-    int ignoreCase=FALSE;
-    int tellLine=FALSE;
     long line;
     char haystack[BUF_SIZE];
 
@@ -91,7 +115,16 @@
     needle = *argv++;
     argc--;
 
+
     while (argc-- > 0) {
+
+	if (argc==0) {
+	    file = stdin;
+	}
+	else
+	    file = fopen(*argv, "r");
+
+
 	name = *argv++;
 
 	fp = fopen (name, "r");
@@ -100,26 +133,6 @@
 	    continue;
 	}
 
-	line = 0;
-
-	while (fgets (haystack, sizeof (haystack), fp)) {
-	    line++;
-	    cp = &haystack[strlen (haystack) - 1];
-
-	    if (*cp != '\n')
-		fprintf (stderr, "%s: Line too long\n", name);
-
-	    if (find_match(haystack, needle, ignoreCase) == TRUE) {
-		if (tellName==TRUE)
-		    printf ("%s: ", name);
-
-		if (tellLine==TRUE)
-		    printf ("%ld: ", line);
-
-		fputs (haystack, stdout);
-	    }
-	}
-
 	if (ferror (fp))
 	    perror (name);
 
diff --git a/init.c b/init.c
index 707b191..a354f8a 100644
--- a/init.c
+++ b/init.c
@@ -192,7 +192,7 @@
     if ((s = getenv("CONSOLE")) != NULL) {
 	console = s;
     }
-#if defined (__sparc__)
+#if #cpu(sparc)
     /* sparc kernel supports console=tty[ab] parameter which is also 
      * passed to init, so catch it here */
     else if ((s = getenv("console")) != NULL) {
diff --git a/init/init.c b/init/init.c
index 707b191..a354f8a 100644
--- a/init/init.c
+++ b/init/init.c
@@ -192,7 +192,7 @@
     if ((s = getenv("CONSOLE")) != NULL) {
 	console = s;
     }
-#if defined (__sparc__)
+#if #cpu(sparc)
     /* sparc kernel supports console=tty[ab] parameter which is also 
      * passed to init, so catch it here */
     else if ((s = getenv("console")) != NULL) {
diff --git a/miscutils/dutmp.c b/miscutils/dutmp.c
index c5307b6..a9e879d 100644
--- a/miscutils/dutmp.c
+++ b/miscutils/dutmp.c
@@ -19,7 +19,7 @@
     "\tDump file or stdin utmp file format to stdout, pipe delimited.\n"
     "\tdutmp /var/run/utmp\n";
 
-static int dutmp_main (int argc, char **argv)
+extern int dutmp_main (int argc, char **argv)
 {
 
     FILE *f = stdin;
diff --git a/more.c b/more.c
index bc38505..ea5e225 100644
--- a/more.c
+++ b/more.c
@@ -41,8 +41,7 @@
 /* ED: sparc termios is broken: revert back to old termio handling. */
 #ifdef BB_MORE_TERM
 
-
-#if defined (__sparc__)
+#if #cpu(sparc)
 #      define USE_OLD_TERMIO
 #      include <termio.h>
 #      include <sys/ioctl.h>
@@ -69,13 +68,13 @@
     struct stat st;	
     FILE *file;
 
-    if ( strcmp(*argv,"--help")==0 || strcmp(*argv,"-h")==0 ) {
-	usage (more_usage);
-    }
     argc--;
     argv++;
 
-    while (argc >= 0) {
+    if ( argc > 0 && (strcmp(*argv,"--help")==0 || strcmp(*argv,"-h")==0) ) {
+	usage (more_usage);
+    }
+    do {
 	if (argc==0) {
 	    file = stdin;
 	}
@@ -103,6 +102,9 @@
 	stty(fileno(cin), &new_settings);
 	
 	(void) signal(SIGINT, gotsig);
+	(void) signal(SIGQUIT, gotsig);
+	(void) signal(SIGTERM, gotsig);
+
 
 #endif
 	while ((c = getc(file)) != EOF) {
@@ -141,18 +143,17 @@
 	    }
 	    if (input=='q')
 		goto end;
-	    if (input==' ' &&  c == '\n' )
+	    if (input=='\n' &&  c == '\n' )
 		next_page = 1;
-	    if ( c == '\n' && ++lines == 24 )
+	    if ( c == ' ' && ++lines == 24 )
 		next_page = 1;
 	    putc(c, stdout);
 	}
 	fclose(file);
 	fflush(stdout);
 
-	argc--;
 	argv++;
-    }
+    } while (--argc > 0);
 end:
 #ifdef BB_MORE_TERM
     gotsig(0);
diff --git a/util-linux/more.c b/util-linux/more.c
index bc38505..ea5e225 100644
--- a/util-linux/more.c
+++ b/util-linux/more.c
@@ -41,8 +41,7 @@
 /* ED: sparc termios is broken: revert back to old termio handling. */
 #ifdef BB_MORE_TERM
 
-
-#if defined (__sparc__)
+#if #cpu(sparc)
 #      define USE_OLD_TERMIO
 #      include <termio.h>
 #      include <sys/ioctl.h>
@@ -69,13 +68,13 @@
     struct stat st;	
     FILE *file;
 
-    if ( strcmp(*argv,"--help")==0 || strcmp(*argv,"-h")==0 ) {
-	usage (more_usage);
-    }
     argc--;
     argv++;
 
-    while (argc >= 0) {
+    if ( argc > 0 && (strcmp(*argv,"--help")==0 || strcmp(*argv,"-h")==0) ) {
+	usage (more_usage);
+    }
+    do {
 	if (argc==0) {
 	    file = stdin;
 	}
@@ -103,6 +102,9 @@
 	stty(fileno(cin), &new_settings);
 	
 	(void) signal(SIGINT, gotsig);
+	(void) signal(SIGQUIT, gotsig);
+	(void) signal(SIGTERM, gotsig);
+
 
 #endif
 	while ((c = getc(file)) != EOF) {
@@ -141,18 +143,17 @@
 	    }
 	    if (input=='q')
 		goto end;
-	    if (input==' ' &&  c == '\n' )
+	    if (input=='\n' &&  c == '\n' )
 		next_page = 1;
-	    if ( c == '\n' && ++lines == 24 )
+	    if ( c == ' ' && ++lines == 24 )
 		next_page = 1;
 	    putc(c, stdout);
 	}
 	fclose(file);
 	fflush(stdout);
 
-	argc--;
 	argv++;
-    }
+    } while (--argc > 0);
 end:
 #ifdef BB_MORE_TERM
     gotsig(0);
