diff options
-rw-r--r-- | attract.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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); |