Merge pull request #1 from jlamothe/master

proper number for factor
master
silverwizard 11 years ago
commit ef1de9123c
  1. 6
      .gitignore
  2. 8
      dpu.c

6
.gitignore vendored

@ -0,0 +1,6 @@
*~
*.o
*.dpu
*.exe
dpu
undpu

@ -7,7 +7,13 @@ int main (int argc, char **argv){
FILE *bob,*joe,*moe; FILE *bob,*joe,*moe;
int thing, factor, arg; int thing, factor, arg;
if(argc >= 3){ if(argc >= 3){
factor = atoi (argv[1]); char *end_char;
factor = strtol(argv[1], &end_char, 0);
if(!*(argv[1]) || *end_char)
{
fputs("I can haz number?\n", stderr);
return EXIT_FAILURE;
}
arg = 2; arg = 2;
}else{ }else{
factor = 9; factor = 9;

Loading…
Cancel
Save