[julia] add option for color displacement
This commit is contained in:
parent
5c74874352
commit
6627e3f08e
13
julia.c
13
julia.c
@ -128,7 +128,7 @@ usage(void)
|
|||||||
fprintf(stderr, "Usage: %s julia [-L] [-x julia_x] [-y julia_y]\n"
|
fprintf(stderr, "Usage: %s julia [-L] [-x julia_x] [-y julia_y]\n"
|
||||||
" [-n niters] [-h height] [-w width] [-z zoom]\n"
|
" [-n niters] [-h height] [-w width] [-z zoom]\n"
|
||||||
" [-a center_x] [-b center_y] [-l light_intensity]\n"
|
" [-a center_x] [-b center_y] [-l light_intensity]\n"
|
||||||
" [-d density] [-c contour]\n",
|
" [-d density] [-c contour] [-D displacement]\n",
|
||||||
xgetprogname());
|
xgetprogname());
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
@ -161,7 +161,7 @@ julia_main(int argc, char *argv[])
|
|||||||
i, j;
|
i, j;
|
||||||
int ch, do_light = 0;
|
int ch, do_light = 0;
|
||||||
|
|
||||||
while ((ch = getopt(argc, argv, "a:b:c:d:h:Ll:n:w:x:y:z:")) != -1)
|
while ((ch = getopt(argc, argv, "a:b:c:D:d:h:Ll:n:w:x:y:z:")) != -1)
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
case 'a':
|
case 'a':
|
||||||
errno = 0;
|
errno = 0;
|
||||||
@ -191,6 +191,15 @@ julia_main(int argc, char *argv[])
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'D':
|
||||||
|
errno = 0;
|
||||||
|
displacement = strtold(optarg, &end);
|
||||||
|
if (end == optarg || *end != '\0' || errno != 0) {
|
||||||
|
fprintf(stderr, "-d: invalid value \"%s\"",
|
||||||
|
optarg);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 'd':
|
case 'd':
|
||||||
errno = 0;
|
errno = 0;
|
||||||
density = strtold(optarg, &end);
|
density = strtold(optarg, &end);
|
||||||
|
Loading…
Reference in New Issue
Block a user