factor: main() signature corrected, header fixup
authorErkin Alp Güney <erkinalp9035@gmail.com>
Sun, 8 Mar 2015 16:43:32 +0000 (18:43 +0200)
committerErkin Alp Güney <erkinalp9035@gmail.com>
Sun, 8 Mar 2015 16:43:32 +0000 (18:43 +0200)
Applications/util/factor.c

index 5bba32c..3bd4541 100644 (file)
@@ -23,7 +23,9 @@ config FACTOR
     Factor integers.
 */
 
-#include "toys.h"
+#include  <stdio.h>
+#include  <ctype.h>
+#include  <string.h>
 
 static void factor(char *s)
 {
@@ -37,7 +39,7 @@ static void factor(char *s)
 
     l = strtol(s, &s, 0);
     if (*s && !isspace(*s)) {
-      error_msg("%s: not integer", err);
+      fprintf(stderr,"%s: not integer", err);
 
       return;
     }
@@ -79,7 +81,7 @@ static void factor(char *s)
   }
 }
 
-void main(int argc,char *argv[])
+int main(int argc,char *argv[])
 {
   if (argc > 1) {
     char **ss;