diff options
author | Thomas White <taw@bitwiz.org.uk> | 2012-01-28 03:22:21 -0800 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:44 +0100 |
commit | 9fdd46abcc06256d0f29d74ccb45551210765cf1 (patch) | |
tree | 873f34292680c6747d3a64078988bf20d7cd4df6 /src/hdfsee.c | |
parent | b2a9f6fbde9564fdbb0909e20c2fe5538f0f7686 (diff) |
Fussiness
Diffstat (limited to 'src/hdfsee.c')
-rw-r--r-- | src/hdfsee.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/hdfsee.c b/src/hdfsee.c index 0ec15212..72738286 100644 --- a/src/hdfsee.c +++ b/src/hdfsee.c @@ -46,7 +46,7 @@ static void show_help(const char *s) " values.\n" " --show-rings Overlay rings that indicate resolution.\n" " --simple-rings=XX,YY,... Overlay rings at specified radii XX, YY, ...\n" -" in pixel units.\n" +" in pixel units.\n" " -c, --colscale=<scale> Use the given colour scale. Choose from:\n" " mono : Greyscale, black is zero.\n" " invmono : Greyscale, white is zero.\n" @@ -105,7 +105,7 @@ int main(int argc, char *argv[]) char *reslist = NULL; double ring_radii[128]; int n_rings = -1; - + /* Long options */ const struct option longopts[] = { {"help", 0, NULL, 'h'}, @@ -175,26 +175,30 @@ int main(int argc, char *argv[]) ERROR("Ring size must be numerical.\n"); return 1; } + case 'r' : config_showrings = 1; reslist = strdup(optarg); int nchar = strlen(reslist); char thisvalue[128]; int i; - int j=0; + int j = 0; n_rings = 0; for ( i=0; i<=nchar; i++ ) { - if ( ( reslist[i] != ',' ) && ( reslist[i] != '\0' ) ) { + if ( ( reslist[i] != ',' ) + && ( reslist[i] != '\0' ) ) + { thisvalue[j] = reslist[i]; j++; } else { - j=0; + j = 0; thisvalue[i] = '\0'; ring_radii[n_rings] = atof(thisvalue); n_rings++; } } break; + case 0 : break; |