From 48afaed1c5bf9b921ffde00fd105658bec539fbf Mon Sep 17 00:00:00 2001 From: David Phillips Date: Fri, 22 Apr 2016 19:12:30 +1200 Subject: Fix float arguments, fix -T argument --- fractal-gen.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fractal-gen.c b/fractal-gen.c index 855017e..9ceef5d 100644 --- a/fractal-gen.c +++ b/fractal-gen.c @@ -176,15 +176,15 @@ int parse_args(int argc, char **argv) if (argc <= 1) return 1; - while ( (opt = getopt(argc, argv, "s:i:e:c:t:N:T")) != -1 ) + while ( (opt = getopt(argc, argv, "s:i:e:c:t:N:T:")) != -1 ) { switch (opt) { case 's': size = atoi(optarg); break; case 'i': iterat = atoi(optarg); break; - case 'e': power = atoi(optarg); break; + case 'e': power = atof(optarg); break; case 'c': cores = atoi(optarg); break; - case 't': thread_mult = atoi(optarg); break; + case 't': thread_mult = atof(optarg); break; case 'N': clust_id = atoi(optarg); break; case 'T': clust_total = atoi(optarg); break; /* redundant case for '?', but explicitness is best */ -- cgit v1.1