summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--attract.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/attract.c b/attract.c
index 47f4a42..66fbee4 100644
--- a/attract.c
+++ b/attract.c
@@ -119,13 +119,18 @@ static void* thread_entry(void *arg_vp){
pthread_exit(NULL);
}
-int main(void){
+int main(int argc,char **argv){
struct config cfg={
.unitsz=200,
.width=500, .height=500,
.exponent=8.5
};
+ assert(argc==1||argc==2);
+ if(argc==2){
+ cfg.exponent=strtod(argv[1],NULL);
+ }
+
unsigned char img[cfg.width*cfg.height*3];
int nthreads=sysconf(_SC_NPROCESSORS_ONLN);