From 53e83375e988cf637ef5ae7fc146231be575b04f Mon Sep 17 00:00:00 2001 From: David Phillips Date: Mon, 4 Apr 2016 18:33:56 +1200 Subject: Update usage/syntax --- README.md | 4 +++- fractal-gen.c | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 29337bc..2cf16e7 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,9 @@ This is a tiny program which will output a binary [PGM](https://wikipedia.org/wi Syntax ------ - ./mandelbrot-gen [threads] > output.pgm + ./mandelbrot-gen -c size -i max_iterations -e exponent \ + [-c cores] [-t thread_multiplier] + [-N cluster-id -T cluster-total] > output.pgm Also check out the other algorithms like `tricorn-gen` and `burning-ship-gen`. You might then want to consider using a tool such as ImageMagick to then convert the (large) output file into something more sane like a PNG. diff --git a/fractal-gen.c b/fractal-gen.c index 56163ea..c647ad5 100644 --- a/fractal-gen.c +++ b/fractal-gen.c @@ -192,7 +192,6 @@ bool args_parse_okay(int argc, char **argv) /* redundant case for '?', but explicitness is best */ case '?': default: - show_help(); return false; break; } @@ -248,7 +247,8 @@ generator_func select_generator(const char* name) void show_help() { fprintf(stderr, - "%s size iterat power [threads]\n" - "%s size iterat power thread_multiplier cluster-id cluster-total\n", - argv0, argv0); + "%s -s size -i iterat -e exponent\n" + " [-c cores] [-t thread_multiplier]\n" + " [-N cluster-id -T cluster-total]\n", + argv0); } -- cgit v1.1