aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
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;
}