Commit 9fdd46ab authored by Thomas White's avatar Thomas White Committed by Thomas White
Browse files

Fussiness

parent b2a9f6fb
......@@ -1728,7 +1728,7 @@ DisplayWindow *displaywindow_open(const char *filename, const char *peaks,
int boost, int binning, int cmfilter,
int noisefilter, int colscale,
const char *element, const char *geometry,
int show_rings, double *ring_radii, int n_rings,
int show_rings, double *ring_radii, int n_rings,
double ring_size)
{
DisplayWindow *dw;
......
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment