metasurf
changeset 6:c1a60ab45bf7
added commandline option in volume example to set the iso threshold
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Wed, 26 Oct 2011 23:38:20 +0300 |
parents | dedd153d2ceb |
children | 246260d95415 |
files | examples/volume/src/volume.c |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line diff
1.1 --- a/examples/volume/src/volume.c Tue Oct 25 23:38:39 2011 +0300 1.2 +++ b/examples/volume/src/volume.c Wed Oct 26 23:38:20 2011 +0300 1.3 @@ -304,6 +304,7 @@ 1.4 int parse_args(int argc, char **argv) 1.5 { 1.6 int i; 1.7 + char *endp; 1.8 struct list_node *head = 0, *tail = 0; 1.9 1.10 for(i=1; i<argc; i++) { 1.11 @@ -317,6 +318,14 @@ 1.12 stereo = !stereo; 1.13 break; 1.14 1.15 + case 't': 1.16 + threshold = strtod(argv[++i], &endp); 1.17 + if(endp == argv[i]) { 1.18 + fprintf(stderr, "-t must be followed by a number\n"); 1.19 + return -1; 1.20 + } 1.21 + break; 1.22 + 1.23 case 'h': 1.24 printf("usage: %s [opt]\n", argv[0]); 1.25 printf("options:\n");