public
/
FUZIX.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3b60c93
)
factor: main() signature corrected, header fixup
author
Erkin Alp Güney
<erkinalp9035@gmail.com>
Sun, 8 Mar 2015 16:43:32 +0000
(18:43 +0200)
committer
Erkin Alp Güney
<erkinalp9035@gmail.com>
Sun, 8 Mar 2015 16:43:32 +0000
(18:43 +0200)
Applications/util/factor.c
patch
|
blob
|
history
diff --git
a/Applications/util/factor.c
b/Applications/util/factor.c
index
5bba32c
..
3bd4541
100644
(file)
--- a/
Applications/util/factor.c
+++ b/
Applications/util/factor.c
@@
-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;