aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2019-08-28 11:54:17 +0200
committerCharles <sircharlesaze@gmail.com>2019-08-28 11:54:17 +0200
commitff61da6fb9720106d7869a0e5026810450d8f515 (patch)
treefa12610ddaee05343a0e1dfc9a034d84d1b86337 /main.c
parentf7884d1aec1c803149a63d2811d767704d62ce77 (diff)
downloadmandelbrot-ff61da6fb9720106d7869a0e5026810450d8f515.tar.gz
mandelbrot-ff61da6fb9720106d7869a0e5026810450d8f515.tar.bz2
mandelbrot-ff61da6fb9720106d7869a0e5026810450d8f515.zip
Color Palette, need shortcut
Added color palette instead of brighness level to display the set boundaries. Vim-like shortcut to move around.
Diffstat (limited to 'main.c')
-rw-r--r--main.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/main.c b/main.c
index 7757243..bc3fb6f 100644
--- a/main.c
+++ b/main.c
@@ -1,10 +1,25 @@
+#include <getopt.h>
#include "header.h"
-int main(void)
+int main(int argc, char **argv)
{
- /* mandelbrot_print(); */
+ int opt;
+
+ while ((opt = getopt(argc, argv, "c")) != -1)
+ {
+ switch (opt)
+ {
+ case 'c':
+ mandelbrot_print();
+ exit(EXIT_SUCCESS);
+ break;
+ default:
+ fprintf(stderr, "Usage %s ...", argv[0]);
+ }
+
+ }
GState *gstate = graphics_init();
graphics_run(gstate);
graphics_quit(gstate);
- return 0;
+ return EXIT_SUCCESS;
}