[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] (no subject)
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] (no subject) |
Date: |
Mon, 30 May 2016 12:00:32 +0000 (UTC) |
branch: master
commit 28d8bf49f0116d8ea8996c47ae7250a47d2913f8
Author: Mohammad Akhlaghi <address@hidden>
Date: Mon May 30 20:35:24 2016 +0900
Error messages conform with the GNU Coding Standards
Most of the error messages started with a capital letter and finished with
a period (`.'). This was contrary to the GNU Coding Standards. With this
commit, all the error messages start with a lower-case letter and the
period is removed from their end.
This fixes bug #46609.
---
lib/checkset.c | 34 ++++++-------
lib/configfiles.c | 8 ++--
lib/fitsarrayvv.c | 104 ++++++++++++++++++++--------------------
lib/gnuastro/checkset.h | 6 +--
lib/gnuastro/commonargs.h | 12 ++---
lib/gnuastro/configfiles.h | 8 ++--
lib/linkedlist.c | 3 +-
lib/mesh.c | 38 +++++++--------
lib/mode.c | 4 +-
lib/polygon.c | 8 ++--
lib/spatialconvolve.c | 4 +-
lib/statistics.c | 18 +++----
lib/threads.c | 12 ++---
lib/txtarrayvv.c | 10 ++--
src/arithmetic/args.h | 6 +--
src/arithmetic/arithmetic.c | 40 ++++++++--------
src/arithmetic/ui.c | 2 +-
src/convertt/args.h | 12 ++---
src/convertt/convertt.c | 14 +++---
src/convertt/eps.c | 16 +++----
src/convertt/jpeg.c | 12 ++---
src/convertt/ui.c | 60 +++++++++++------------
src/convolve/args.h | 18 +++----
src/convolve/convolve.c | 20 ++++----
src/convolve/ui.c | 14 +++---
src/cosmiccal/args.h | 8 ++--
src/cosmiccal/ui.c | 6 +--
src/header/args.h | 12 ++---
src/header/header.c | 14 +++---
src/header/ui.c | 22 ++++-----
src/imgcrop/args.h | 16 +++----
src/imgcrop/crop.c | 48 +++++++++----------
src/imgcrop/imgcrop.c | 14 +++---
src/imgcrop/ui.c | 78 +++++++++++++++---------------
src/imgcrop/wcsmode.c | 14 +++---
src/imgstat/args.h | 12 ++---
src/imgstat/imgstat.c | 2 +-
src/imgstat/ui.c | 54 ++++++++++-----------
src/imgwarp/args.h | 14 +++---
src/imgwarp/imgwarp.c | 2 +-
src/imgwarp/ui.c | 28 +++++------
src/mkcatalog/args.h | 12 ++---
src/mkcatalog/columns.c | 48 +++++++++----------
src/mkcatalog/mkcatalog.c | 4 +-
src/mkcatalog/ui.c | 28 +++++------
src/mknoise/args.h | 12 ++---
src/mknoise/ui.c | 2 +-
src/mkprof/args.h | 14 +++---
src/mkprof/mkprof.c | 18 +++----
src/mkprof/oneprofile.c | 8 ++--
src/mkprof/profiles.c | 4 +-
src/mkprof/ui.c | 26 +++++-----
src/noisechisel/args.h | 12 ++---
src/noisechisel/binary.c | 12 ++---
src/noisechisel/clumps.c | 12 ++---
src/noisechisel/detection.c | 6 +--
src/noisechisel/label.c | 4 +-
src/noisechisel/segmentation.c | 10 ++--
src/noisechisel/thresh.c | 4 +-
src/noisechisel/ui.c | 22 ++++-----
src/subtractsky/args.h | 12 ++---
src/subtractsky/subtractsky.c | 4 +-
src/subtractsky/ui.c | 22 ++++-----
63 files changed, 562 insertions(+), 561 deletions(-)
diff --git a/lib/checkset.c b/lib/checkset.c
index d0d1098..1e089ba 100644
--- a/lib/checkset.c
+++ b/lib/checkset.c
@@ -36,12 +36,12 @@ along with Gnuastro. If not, see
<http://www.gnu.org/licenses/>.
#define FIXEDFORFILE "The value of `%s` (given as %s)"
#define FIXEDFOROPTION "The value of `--%s (-%c)` (given as %s)"
-#define NOTEMSG_NOTNUMBER "not readable as number."
-#define NOTEMSG_EQZEROORONE "should be ==0 or ==1."
-#define NOTEMSG_LEQZERO "should be >=0."
-#define NOTEMSG_LARGERZERO "should be >0."
-#define NOTEMSG_4OR8 "should be either 4 or 8."
-#define NOTEMSG_SMALLERONE "should be >=0 and <=1."
+#define NOTEMSG_NOTNUMBER "not readable as number"
+#define NOTEMSG_EQZEROORONE "should be ==0 or ==1"
+#define NOTEMSG_LEQZERO "should be >=0"
+#define NOTEMSG_LARGERZERO "should be >0"
+#define NOTEMSG_4OR8 "should be either 4 or 8"
+#define NOTEMSG_SMALLERONE "should be >=0 and <=1"
#define CHECKFULLNUMBER if(*tailptr!='\0'){ \
@@ -329,7 +329,7 @@ gal_checkset_sizet_p_odd(char *optarg, size_t *var, char
*lo, char so,
error_at_line(EXIT_FAILURE, 0, filename, lineno,
FIXEDFORFILE" should be >0 and odd.", lo, optarg);
else
- error(EXIT_FAILURE, 0, FIXEDFOROPTION" should be >0 and odd.",
+ error(EXIT_FAILURE, 0, FIXEDFOROPTION" should be >0 and odd",
lo, so, optarg);
}
}
@@ -533,7 +533,7 @@ gal_checkset_malloc_cat(char *inname, char *toappend)
out=malloc(inl+apl+1);
if(out==NULL)
error(EXIT_FAILURE, errno,
- "Allocating %lu bytes in gal_checkset_malloc_cat", inl+apl+1);
+ "allocating %lu bytes in gal_checkset_malloc_cat", inl+apl+1);
strcpy(out, inname);
strcat(out, toappend);
@@ -643,7 +643,7 @@ gal_checkset_check_remove_file(char *filename, int
dontdelete)
if(dontdelete)
error(EXIT_FAILURE, 0, "%s already exists and you have "
"asked to not remove it with the `--dontdelete` "
- "(`-D`) option.", filename);
+ "(`-D`) option", filename);
/* Delete the file: */
errno=0;
@@ -672,10 +672,10 @@ gal_checkset_dir_0_file_1(char *name, int dontdelete)
struct stat nameinfo;
if(name==NULL)
- error(EXIT_FAILURE, 0, "A bug! The input to the gal_checkset_dir_0_file_1 "
+ error(EXIT_FAILURE, 0, "a bug! The input to the gal_checkset_dir_0_file_1 "
"function in checkset.c should not be NULL. Please contact us at "
PACKAGE_BUGREPORT" so we can see what went wrong and fix it in "
- "future updates.");
+ "future updates");
errno=0;
if(stat(name, &nameinfo)!=0)
@@ -710,12 +710,12 @@ gal_checkset_dir_0_file_1(char *name, int dontdelete)
return 1;
}
else /* Not a file or a dir, ABORT */
- error(EXIT_FAILURE, 0, "%s not a file or a directory.", name);
+ error(EXIT_FAILURE, 0, "%s not a file or a directory", name);
- error(EXIT_FAILURE, 0, "A bug! In gal_checkset_dir_0_file_1, (in checkset.c)
"
+ error(EXIT_FAILURE, 0, "a bug! In gal_checkset_dir_0_file_1, (in checkset.c)
"
"The process should not reach the end of the function! Please "
"contact us at "PACKAGE_BUGREPORT" so we can see what went wrong "
- "and fix it in future updates.");
+ "and fix it in future updates");
return 0;
}
@@ -876,13 +876,13 @@ gal_checkset_check_dir_write_add_slash(char **dirname)
errno=0;
file_d=mkstemp(tmpname);
if(file_d==-1)
- error(EXIT_FAILURE, errno, "Cannot write output in the directory %s",
+ error(EXIT_FAILURE, errno, "cannot write output in the directory %s",
indir);
/*
errno=0;
printf("\n\n%s\n\n", tmpname);
if( write(file_d, buf, strlen(buf)) == -1 )
- error(EXIT_FAILURE, errno, "%s: Writing to this temporary file to "
+ error(EXIT_FAILURE, errno, "%s: writing to this temporary file to "
"check the given `%s` directory", tmpname, indir);
*/
errno=0;
@@ -893,7 +893,7 @@ gal_checkset_check_dir_write_add_slash(char **dirname)
/* Delete the temporary file: */
errno=0;
if(unlink(tmpname)==-1)
- error(EXIT_FAILURE, errno, "%s: Removing this temporary file made "
+ error(EXIT_FAILURE, errno, "%s: removing this temporary file made "
"to check the given `%s directory`", tmpname, indir);
/* Remove the extra characters that were added for the random name. */
diff --git a/lib/configfiles.c b/lib/configfiles.c
index c65f62b..dd29de5 100644
--- a/lib/configfiles.c
+++ b/lib/configfiles.c
@@ -47,8 +47,8 @@ gal_configfiles_add_home_dir(char *dir)
/* Get the home environment variable. */
home=getenv("HOME");
if(home==NULL)
- error(EXIT_FAILURE, 0, "The HOME environment variable "
- "is not defined.");
+ error(EXIT_FAILURE, 0, "the HOME environment variable "
+ "is not defined");
/* Concatenate the two strings together: */
return gal_checkset_malloc_cat(home, dir);
@@ -160,9 +160,9 @@ gal_configfiles_write_local_config_stop(char *indir, char
*filename,
{
errno=0;
if(mkdir(indir, S_IRWXU)==-1)
- error(EXIT_FAILURE, errno, "%s: Could not be created. Try "
+ error(EXIT_FAILURE, errno, "%s: could not be created. Try "
"running:\n\n mkdir -p %s\n\nto built it and run "
- "your previous command again.", indir, indir);
+ "your previous command again", indir, indir);
}
else
error(EXIT_FAILURE, errno, "%s", indir);
diff --git a/lib/fitsarrayvv.c b/lib/fitsarrayvv.c
index 5ae28a0..57957a6 100644
--- a/lib/fitsarrayvv.c
+++ b/lib/fitsarrayvv.c
@@ -137,12 +137,12 @@ gal_fitsarray_img_bitpix_size(fitsfile *fptr, int
*bitpix, long *naxes)
gal_fitsarray_io_error(status, NULL);
if(naxis!=2)
- error(EXIT_FAILURE, 0, "Currently only a 2 dimensional image array "
+ error(EXIT_FAILURE, 0, "currently only a 2 dimensional image array "
"is supported. Your array is %d dimension(s). %s", naxis,
naxis ? "Please contact us to add this feature." : "This might "
"Be due to the fact that the data in images with multiple "
"extensions are sometimes put on the second extension. If this is "
- "the case, try changing the hdu (maybe to --hdu=1).");
+ "the case, try changing the hdu (maybe to --hdu=1)");
}
@@ -168,7 +168,7 @@ gal_fitsarray_bitpix_to_dtype(int bitpix)
case DOUBLE_IMG:
return TDOUBLE;
default:
- error(EXIT_FAILURE, 0, "Bitpix value of %d not recognized.",
+ error(EXIT_FAILURE, 0, "bitpix value of %d not recognized",
bitpix);
}
return 0;
@@ -234,7 +234,7 @@ gal_fitsarray_bitpix_blank(int bitpix)
return d;
default:
- error(EXIT_FAILURE, 0, "Bitpix value of %d not recognized.",
+ error(EXIT_FAILURE, 0, "bitpix value of %d not recognized",
bitpix);
}
@@ -274,7 +274,7 @@ gal_fitsarray_bitpix_alloc(size_t size, int bitpix)
if(sizeof(float)!=4)
error(EXIT_FAILURE, 0,
"`float` is not 32bits on this machine. The FITS standard "
- "Requires this size.");
+ "Requires this size");
size*=sizeof(float);
break;
@@ -282,18 +282,18 @@ gal_fitsarray_bitpix_alloc(size_t size, int bitpix)
if(sizeof(double)!=8)
error(EXIT_FAILURE, 0,
"`double` is not 64bits on this machine. The FITS standard "
- "requires this size.");
+ "requires this size");
size*=sizeof(double);
break;
default:
- error(EXIT_FAILURE, 0, "Bitpix value of %d not recognized.", bitpix);
+ error(EXIT_FAILURE, 0, "bitpix value of %d not recognized", bitpix);
}
errno=0;
array=malloc(size);
if(array==NULL)
- error(EXIT_FAILURE, errno, "Array of %lu bytes", size);
+ error(EXIT_FAILURE, errno, "array of %lu bytes", size);
return array;
}
@@ -345,9 +345,9 @@ blanktovalue(void *array, int bitpix, size_t size, void
*value)
break;
default:
- error(EXIT_FAILURE, 0, "A bug! Bitpix value of %d not recognized. "
+ error(EXIT_FAILURE, 0, "a bug! Bitpix value of %d not recognized. "
"This should not happen here (blanktovalue in fitsarrayvv.c). "
- "Please contact us at %s to see how this happened.", bitpix,
+ "Please contact us at %s to see how this happened", bitpix,
PACKAGE_BUGREPORT);
}
}
@@ -411,9 +411,9 @@ gal_fitsarray_change_type(void *in, int inbitpix, size_t
size, int anyblank,
while(++i!=size);}
return;
default:
- error(EXIT_FAILURE, 0, "A bug! In gal_fitsarray_change_type "
+ error(EXIT_FAILURE, 0, "a bug! In gal_fitsarray_change_type "
"(fitsarrayvv.c). BITPIX=%d of input not recognized. Please "
- "contact us so we can fix it.", inbitpix);
+ "contact us so we can fix it", inbitpix);
}
break;
@@ -456,7 +456,7 @@ gal_fitsarray_change_type(void *in, int inbitpix, size_t
size, int anyblank,
while(++i!=size);}
return;
default:
- error(EXIT_FAILURE, 0, "A bug! In gal_fitsarray_change_type "
+ error(EXIT_FAILURE, 0, "a bug! In gal_fitsarray_change_type "
"(fitsarrayvv.c). BITPIX=%d of input not recognized. Please "
"contact us so we can fix it", inbitpix);
}
@@ -501,9 +501,9 @@ gal_fitsarray_change_type(void *in, int inbitpix, size_t
size, int anyblank,
while(++i!=size);}
return;
default:
- error(EXIT_FAILURE, 0, "A bug! In gal_fitsarray_change_type "
+ error(EXIT_FAILURE, 0, "a bug! In gal_fitsarray_change_type "
"(fitsarrayvv.c). BITPIX=%d of input not recognized. Please "
- "contact us so we can fix it.", inbitpix);
+ "contact us so we can fix it", inbitpix);
}
break;
@@ -546,9 +546,9 @@ gal_fitsarray_change_type(void *in, int inbitpix, size_t
size, int anyblank,
while(++i!=size);}
return;
default:
- error(EXIT_FAILURE, 0, "A bug! In gal_fitsarray_change_type "
+ error(EXIT_FAILURE, 0, "a bug! In gal_fitsarray_change_type "
"(fitsarrayvv.c). BITPIX=%d of input not recognized. Please "
- "contact us so we can fix it.", inbitpix);
+ "contact us so we can fix it", inbitpix);
}
break;
@@ -588,9 +588,9 @@ gal_fitsarray_change_type(void *in, int inbitpix, size_t
size, int anyblank,
case DOUBLE_IMG:
ff=(f=*out)+size; do *f=*id++; while(++f<ff); return;
default:
- error(EXIT_FAILURE, 0, "A bug! In gal_fitsarray_change_type "
+ error(EXIT_FAILURE, 0, "a bug! In gal_fitsarray_change_type "
"(fitsarrayvv.c). BITPIX=%d of input not recognized. Please "
- "contact us so we can fix it.", inbitpix);
+ "contact us so we can fix it", inbitpix);
}
break;
@@ -630,18 +630,18 @@ gal_fitsarray_change_type(void *in, int inbitpix, size_t
size, int anyblank,
case DOUBLE_IMG:
df=(d=*out)+size; do *d=*id++; while(++d<df); return;
default:
- error(EXIT_FAILURE, 0, "A bug! In gal_fitsarray_change_type "
+ error(EXIT_FAILURE, 0, "a bug! In gal_fitsarray_change_type "
"(fitsarrayvv.c). BITPIX=%d of input not recognized. Please "
- "contact us so we can fix it.", inbitpix);
+ "contact us so we can fix it", inbitpix);
}
break;
default:
- error(EXIT_FAILURE, 0, "A bug! Output Bitpix value of %d is not "
- "recognized. This should not happen here (gal_fitsarray_change_type
in "
- "fitsarrayvv.c). Please contact us to see how this happened.",
- outbitpix);
+ error(EXIT_FAILURE, 0, "a bug! Output Bitpix value of %d is not "
+ "recognized. This should not happen here "
+ "(gal_fitsarray_change_type in fitsarrayvv.c). Please "
+ "contact us to see how this happened", outbitpix);
}
}
@@ -717,7 +717,7 @@ hdutypestring(int hdutype)
return "a binary table";
break;
default:
- error(EXIT_FAILURE, 0, "HDU code %d in CFITSIO not recognized.",
+ error(EXIT_FAILURE, 0, "HDU code %d in CFITSIO not recognized",
hdutype);
}
return NULL;
@@ -748,7 +748,7 @@ gal_fitsarray_read_fits_hdu(char *filename, char *hdu, int
desiredtype,
/* Open the FITS file: */
if( fits_open_file(outfptr, ffname, READONLY, &status) )
- gal_fitsarray_io_error(status, "Reading this FITS file.");
+ gal_fitsarray_io_error(status, "reading this FITS file");
fptr=*outfptr;
/* Check the Type of the given HDU: */
@@ -756,7 +756,7 @@ gal_fitsarray_read_fits_hdu(char *filename, char *hdu, int
desiredtype,
gal_fitsarray_io_error(status, NULL);
if(hdutype!=desiredtype)
- error(EXIT_FAILURE, 0, "%s: HDU %s is %s, not %s.",
+ error(EXIT_FAILURE, 0, "%s: HDU %s is %s, not %s",
filename, hdu, hdutypestring(hdutype),
hdutypestring(desiredtype));
@@ -792,7 +792,7 @@ gal_fitsarray_read_keywords(char *filename, char *hdu,
/* Open the FITS file: */
if( fits_open_file(&fptr, ffname, READONLY, &status) )
- gal_fitsarray_io_error(status, "Reading this FITS file.");
+ gal_fitsarray_io_error(status, "reading this FITS file");
/* Get the desired keywords. */
for(i=0;i<num;++i)
@@ -821,12 +821,12 @@ gal_fitsarray_read_keywords(char *filename, char *hdu,
valueptr=&keys[i].d;
break;
default:
- error(EXIT_FAILURE, 0, "The value of keys[%lu].datatype (=%d) "
- "is not recognized.", i, keys[i].datatype);
+ error(EXIT_FAILURE, 0, "the value of keys[%lu].datatype (=%d) "
+ "is not recognized", i, keys[i].datatype);
}
if( fits_read_key(fptr, keys[i].datatype, keys[i].keyname,
valueptr, NULL, &status) )
- gal_fitsarray_io_error(status, "Reading the keyword.");
+ gal_fitsarray_io_error(status, "reading the keyword");
}
/* Close the FITS file. */
@@ -876,7 +876,7 @@ gal_fitsarray_add_to_fits_header_ll(struct
gal_fitsarray_header_ll **list,
newnode=malloc(sizeof *newnode);
if(newnode==NULL)
error(EXIT_FAILURE, errno,
- "linkedlist: New element in gal_fitsarray_header_ll");
+ "linkedlist: new element in gal_fitsarray_header_ll");
newnode->datatype=datatype;
newnode->keyname=keyname;
newnode->value=value;
@@ -907,7 +907,7 @@ gal_fitsarray_add_to_fits_header_ll_end(struct
gal_fitsarray_header_ll **list,
newnode=malloc(sizeof *newnode);
if(newnode==NULL)
error(EXIT_FAILURE, errno,
- "linkedlist: New element in gal_fitsarray_header_ll");
+ "linkedlist: new element in gal_fitsarray_header_ll");
newnode->datatype=datatype;
newnode->keyname=keyname;
newnode->value=value;
@@ -989,9 +989,9 @@ gal_fitsarray_file_name_in_keywords(char *keynamebase, char
*filename,
break;
}
if(j==0)
- error(EXIT_FAILURE, 0, "The filename `%sP has at least one span "
+ error(EXIT_FAILURE, 0, "the filename `%sP has at least one span "
"of %lu characters without a `/`. It cannot be written "
- "to the header of the output fits file.", filename,
+ "to the header of the output fits file", filename,
maxlength);
/* Convert the last useful character and save the file name.*/
@@ -1242,8 +1242,8 @@ gal_fitsarray_read_wcs(fitsfile *fptr, int *nwcs, struct
wcsprm **wcs,
*wcs=NULL; *nwcs=0;
}
if (fits_free_memory(fullheader, &status) )
- gal_fitsarray_io_error(status, "Problem in fitsarrayvv.c for freeing "
- "the memory used to keep all the headers.");
+ gal_fitsarray_io_error(status, "problem in fitsarrayvv.c for freeing "
+ "the memory used to keep all the headers");
/* Set the internal structure: */
status=wcsset(*wcs);
@@ -1385,7 +1385,7 @@ gal_fitsarray_array_to_fits_img(char *filename, char
*hdu, int bitpix,
blank=gal_fitsarray_bitpix_blank(bitpix);
if(fits_write_key(fptr, datatype, "BLANK", blank,
"Pixels with no data.", &status) )
- gal_fitsarray_io_error(status, "Adding the BLANK keyword.");
+ gal_fitsarray_io_error(status, "adding the BLANK keyword");
free(blank);
}
@@ -1397,7 +1397,7 @@ gal_fitsarray_array_to_fits_img(char *filename, char
*hdu, int bitpix,
/* Convert the WCS information to text. */
status=wcshdo(WCSHDO_safe, wcs, &nkeyrec, &wcsheader);
if(status)
- error(EXIT_FAILURE, 0, "wcshdo ERROR %d: %s.", status,
+ error(EXIT_FAILURE, 0, "wcshdo ERROR %d: %s", status,
wcs_errmsg[status]);
gal_fitsarray_add_wcs_to_header(fptr, wcsheader, nkeyrec);
}
@@ -1495,19 +1495,19 @@ gal_fitsarray_file_or_ext_name(char *inputname, char
*inhdu, int othernameset,
HDU are optional. So just to be safe, we will check this all
the time. */
if(ohduset==0)
- error(EXIT_FAILURE, 0, "A %s image was specified (%s). However, "
+ error(EXIT_FAILURE, 0, "a %s image was specified (%s). However, "
"no HDU is given for it. Please add a HDU. If you regularly "
"use the same HDU as %s, you may consider adding it to "
"the configuration file. For more information, please see the "
"`Configuration files' section of the %s manual by running "
- "` info gnuastro ' on the command-line.", type, *othername,
+ "` info gnuastro ' on the command-line", type, *othername,
type, PACKAGE_NAME);
if(strcmp(inputname, *othername)==0)
{
if(strcmp(ohdu, inhdu)==0)
- error(EXIT_FAILURE, 0, "The specified %s name and "
+ error(EXIT_FAILURE, 0, "the specified %s name and "
"input image name (%s) are the same while the input "
- "image hdu name and mask hdu are also identical (%s)!",
+ "image hdu name and mask hdu are also identical (%s)",
type, inputname, inhdu);
}
}
@@ -1568,9 +1568,9 @@ gal_fitsarray_file_to_float(char *inputname, char
*maskname, char *inhdu,
maskbitpix==FLOAT_IMG ? "single" : "double", maskbitpix);
if(s0!=*ins0 || s1!=*ins1)
- error(EXIT_FAILURE, 0, "The input image %s (hdu: %s) has size: "
+ error(EXIT_FAILURE, 0, "the input image %s (hdu: %s) has size: "
"%lu x %lu. The mask image %s (hdu: %s) has size %lu x %lu. "
- "The two images have to have the same size.", inputname,
+ "The two images have to have the same size", inputname,
inhdu, *ins1, *ins0, maskname, mhdu, s1, s0);
if(maskbitpix==FLOAT_IMG)
@@ -1634,9 +1634,9 @@ gal_fitsarray_file_to_double(char *inputname, char
*maskname, char *inhdu,
maskbitpix==FLOAT_IMG ? "single" : "double", maskbitpix);
if(s0!=*ins0 || s1!=*ins1)
- error(EXIT_FAILURE, 0, "The input image %s (hdu: %s) has size: "
+ error(EXIT_FAILURE, 0, "the input image %s (hdu: %s) has size: "
"%lu x %lu. The mask image %s (hdu: %s) has size %lu x %lu. "
- "The two images have to have the same size.", inputname,
+ "The two images have to have the same size", inputname,
inhdu, *ins1, *ins0, maskname, mhdu, s1, s0);
if(maskbitpix==DOUBLE_IMG)
@@ -1701,9 +1701,9 @@ gal_fitsarray_prep_float_kernel(char *inputname, char
*inhdu, float **outkernel,
/* Simple sanity check: */
if(*ins0%2==0 || *ins1%2==0)
- error(EXIT_FAILURE, 0, "The kernel image has to have an odd number "
+ error(EXIT_FAILURE, 0, "the kernel image has to have an odd number "
"of pixels on both sides (there has to be on pixel in the "
- "center). %s (hdu: %s) is %lu by %lu.", inputname, inhdu,
+ "center). %s (hdu: %s) is %lu by %lu", inputname, inhdu,
*ins1, *ins0);
/* If there are any NaN pixels, set them to zero and normalize it.*/
@@ -1776,7 +1776,7 @@ gal_fitsarray_xy_array_to_radec(struct wcsprm *wcs,
double *xy, double *radec,
status=wcsp2s(wcs, ncoord, nelem, xy+i*width, imgcrd, &phi,
&theta, radec+i*width, &stat);
if(status)
- error(EXIT_FAILURE, 0, "wcsp2s ERROR %d: %s.", status,
+ error(EXIT_FAILURE, 0, "wcsp2s ERROR %d: %s", status,
wcs_errmsg[status]);
/* For a check:
@@ -1808,7 +1808,7 @@ gal_fitsarray_radec_array_to_xy(struct wcsprm *wcs,
double *radec, double *xy,
status=wcss2p(wcs, ncoord, nelem, radec+i*width, &phi, &theta,
imgcrd, xy+i*width, &stat);
if(status)
- error(EXIT_FAILURE, 0, "wcss2p ERROR %d: %s.", status,
+ error(EXIT_FAILURE, 0, "wcss2p ERROR %d: %s", status,
wcs_errmsg[status]);
/* For a check:
printf("(%f, %f) --> (%f, %f)\n", xy[i*width], xy[i*width+1],
diff --git a/lib/gnuastro/checkset.h b/lib/gnuastro/checkset.h
index 15cc24d..712b144 100644
--- a/lib/gnuastro/checkset.h
+++ b/lib/gnuastro/checkset.h
@@ -36,13 +36,13 @@ along with Gnuastro. If not, see
<http://www.gnu.org/licenses/>.
if( (INCOL) >= p->cs1 ) \
error(EXIT_FAILURE, 0, "%s only has %lu columns while you " \
"have requested column %lu (counting from zero) for " \
- "`--%s`.", p->up.catname, p->cs1, (INCOL), (NAME)); \
+ "`--%s`", p->up.catname, p->cs1, (INCOL), (NAME)); \
\
for(i=0;i<p->cs0;++i) \
if( isnan(p->cat[i*p->cs1+(INCOL)]) ) \
- error(EXIT_FAILURE, 0, "%s: Column %lu (--%s) in row %lu " \
+ error(EXIT_FAILURE, 0, "%s: column %lu (--%s) in row %lu " \
"could not be read as a number. See %s. Note that " \
- "counting starts from zero.", \
+ "counting starts from zero", \
p->up.catname, (INCOL), (NAME), i, GAL_TXTARRAY_LOG); \
}
diff --git a/lib/gnuastro/commonargs.h b/lib/gnuastro/commonargs.h
index 95ac6fe..c696f2a 100644
--- a/lib/gnuastro/commonargs.h
+++ b/lib/gnuastro/commonargs.h
@@ -206,10 +206,10 @@ gal_checkset_commonargs_cparse_opt(int key, char *arg,
struct argp_state *state)
check if the first character of arg is the equal sign, then the
user is warned and the program is stopped: */
if(arg && arg[0]=='=')
- argp_error(state, "Incorrect use of the equal sign (`=`). For short "
+ argp_error(state, "incorrect use of the equal sign (`=`). For short "
"options, `=` should not be used and for long options, "
"there should be no space between the option, equal sign "
- "and value.");
+ "and value");
switch(key)
{
@@ -250,14 +250,14 @@ gal_checkset_commonargs_cparse_opt(int key, char *arg,
struct argp_state *state)
case 'h':
errno=0;
cp->hdu=malloc(strlen(arg)+1);
- if(cp->hdu==NULL) error(EXIT_FAILURE, 0, "Space for hdu");
+ if(cp->hdu==NULL) error(EXIT_FAILURE, 0, "space for hdu");
strcpy(cp->hdu, arg);
cp->hduset=1;
break;
case 'o':
errno=0;
cp->output=malloc(strlen(arg)+1);
- if(cp->output==NULL) error(EXIT_FAILURE, 0, "Space for output");
+ if(cp->output==NULL) error(EXIT_FAILURE, 0, "space for output");
strcpy(cp->output, arg); /* This allocation is done so cp->output */
cp->outputset=1; /* Can always be freed when set, because */
break; /* It usually needs modifications. */
@@ -272,9 +272,9 @@ gal_checkset_commonargs_cparse_opt(int key, char *arg,
struct argp_state *state)
/* Once finished: */
case ARGP_KEY_END:
if(cp->setdirconf && cp->setusrconf)
- error(EXIT_FAILURE, 0, "Only one of `--setusrconf` or "
+ error(EXIT_FAILURE, 0, "only one of `--setusrconf` or "
"`--setdirconf` may be set in each run. You have asked "
- "for both.");
+ "for both");
break;
/* If the argument is not known. */
diff --git a/lib/gnuastro/configfiles.h b/lib/gnuastro/configfiles.h
index 34f4ce6..94f1ad1 100644
--- a/lib/gnuastro/configfiles.h
+++ b/lib/gnuastro/configfiles.h
@@ -59,8 +59,8 @@ along with Gnuastro. If not, see
<http://www.gnu.org/licenses/>.
command=gal_checkset_malloc_cat("cat ", outfilename); \
printf("Values saved in %s:\n\n", outfilename); \
if(system(command)) \
- error(EXIT_FAILURE, 0, "The `%s` command could not be run or " \
- "failed.", command); \
+ error(EXIT_FAILURE, 0, "the `%s` command could not be run or " \
+ "failed", command); \
free(outfilename); \
free(command); \
exit(EXIT_SUCCESS);
\
@@ -77,7 +77,7 @@ along with Gnuastro. If not, see
<http://www.gnu.org/licenses/>.
if(cp->setdirconf) \
GAL_CONFIGFILES_SAVE_LOCAL_CONFIG(CURDIRCONFIG_DIR); \
if(cp->onlyversionset && strcmp(cp->onlyversion, PACKAGE_VERSION)) \
- error(EXIT_FAILURE, 0, "You are currently running Gnuastro %s. " \
+ error(EXIT_FAILURE, 0, "you are currently running Gnuastro %s. " \
"However, this run should be with version `%s'.\n\n" \
"To resolve the situation, use the the '--onlyversion' " \
"option, either on the command-line or in a configuration " \
@@ -87,7 +87,7 @@ along with Gnuastro. If not, see
<http://www.gnu.org/licenses/>.
"Alternatively, you can install Gnuastro %s.\n\n" \
"NOTE: If you didn't set this option on the command-line, " \
"it was probably intended for reproducability. If so, it " \
- "is advised to install Gnuastro %s.", \
+ "is advised to install Gnuastro %s", \
PACKAGE_VERSION, cp->onlyversion, PACKAGE_VERSION, \
PACKAGE_VERSION, cp->onlyversion, cp->onlyversion); \
\
diff --git a/lib/linkedlist.c b/lib/linkedlist.c
index ce93e0c..be93b10 100644
--- a/lib/linkedlist.c
+++ b/lib/linkedlist.c
@@ -189,7 +189,8 @@ gal_linkedlist_add_to_fll(struct gal_linkedlist_fll **list,
float value)
errno=0;
newnode=malloc(sizeof *newnode);
if(newnode==NULL)
- error(EXIT_FAILURE, errno, "linkedlist: New element in
gal_linkedlist_fll");
+ error(EXIT_FAILURE, errno, "linkedlist: New element in "
+ "gal_linkedlist_fll");
newnode->v=value;
newnode->next=*list;
diff --git a/lib/mesh.c b/lib/mesh.c
index f9b5909..0e6d3f5 100644
--- a/lib/mesh.c
+++ b/lib/mesh.c
@@ -295,10 +295,10 @@ gal_mesh_full_garray(struct gal_mesh_params *mp, int
reverse)
{
/* A simple sanity check */
if(reverse)
- error(EXIT_FAILURE, 0, "A bug! Please contact us at %s so we can "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at %s so we can "
"fix this problem. For some reason, gal_mesh_full_garray "
"has been called with the `reverse' flag set to true while "
- "fgarray is not allocated! This should not happen.",
+ "fgarray is not allocated! This should not happen",
PACKAGE_BUGREPORT);
/* Allocate the fgarrays */
@@ -392,7 +392,7 @@ gal_check_mesh_id(struct gal_mesh_params *mp, long **out)
errno=0;
*out=calloc(mp->s0*mp->s1, sizeof **out);
if(*out==NULL)
- error(EXIT_FAILURE, errno, "The array to show mesh labels in checkmesh.");
+ error(EXIT_FAILURE, errno, "the array to show mesh labels in checkmesh");
/* Fill the indexs: */
for(i=0;i<mp->nmeshi;++i)
@@ -703,9 +703,9 @@ fillmeshinfo(struct gal_mesh_params *mp, size_t chs0,
size_t chs1,
/* Just for a check: */
if(totalmeshcount!=mp->nmeshi)
- error(EXIT_FAILURE, 0, "A bug! Please contact us at %s so we can fix it. "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at %s so we can fix it. "
"The basic information for some meshes has not been found (in "
- "fillmeshinfo of mesh.c).", PACKAGE_BUGREPORT);
+ "fillmeshinfo of mesh.c)", PACKAGE_BUGREPORT);
}
@@ -790,13 +790,13 @@ gal_mesh_make_mesh(struct gal_mesh_params *mp)
types. Irrespective of which channel they lie in. */
mp->cgarray1=mp->cgarray2=mp->fgarray1=mp->fgarray2=NULL;
errno=0; mp->start=malloc(mp->nmeshi*sizeof *mp->start);
- if(mp->start==NULL) error(EXIT_FAILURE, errno, "Mesh starting points");
+ if(mp->start==NULL) error(EXIT_FAILURE, errno, "mesh starting points");
errno=0; mp->types=malloc(mp->nmeshi*sizeof *mp->types);
- if(mp->types==NULL) error(EXIT_FAILURE, errno, "Mesh types");
+ if(mp->types==NULL) error(EXIT_FAILURE, errno, "mesh types");
errno=0; mp->chindex=malloc(mp->nmeshi*sizeof *mp->chindex);
- if(mp->chindex==NULL) error(EXIT_FAILURE, errno, "Mesh in channel index");
+ if(mp->chindex==NULL) error(EXIT_FAILURE, errno, "mesh in channel index");
errno=0; mp->imgindex=malloc(mp->nmeshi*sizeof *mp->imgindex);
- if(mp->imgindex==NULL) error(EXIT_FAILURE, errno, "Mesh in image index");
+ if(mp->imgindex==NULL) error(EXIT_FAILURE, errno, "mesh in image index");
/* Distribute the meshes in all the threads. */
gal_threads_dist_in_threads(mp->nmeshi, mp->numthreads, &mp->indexs,
@@ -934,8 +934,8 @@ gal_mesh_operate_on_mesh(struct gal_mesh_params *mp, void
*(*meshfunc)(void *),
errno=0;
mp->oneforall=malloc(numthreads*mp->maxs0*mp->maxs1*oneforallsize);
if(mp->oneforall==NULL)
- error(EXIT_FAILURE, errno, "Unable to allocate %lu bytes for"
- "mtp->oneforall in fillmesh of mesh.c.",
+ error(EXIT_FAILURE, errno, "unable to allocate %lu bytes for"
+ "mtp->oneforall in fillmesh of mesh.c",
numthreads*mp->maxs0*mp->maxs1*oneforallsize);
}
@@ -963,7 +963,7 @@ gal_mesh_operate_on_mesh(struct gal_mesh_params *mp, void
*(*meshfunc)(void *),
mtp[i].id=i;
mtp[i].mp=mp;
err=pthread_create(&t, &attr, meshfunc, &mtp[i]);
- if(err) error(EXIT_FAILURE, 0, "Can't create thread %lu.", i);
+ if(err) error(EXIT_FAILURE, 0, "can't create thread %lu", i);
}
/* Wait for all threads to finish and free the spaces. */
@@ -1055,7 +1055,7 @@ preparemeshinterparrays(struct gal_mesh_params *mp)
mp->nearest1=malloc(numthreads*mp->numnearest*sizeof *mp->nearest1);
if(mp->nearest1==NULL)
error(EXIT_FAILURE, errno, "%lu bytes for the array to keep the "
- "nearest1 values for interpolation (mesh.c).",
+ "nearest1 values for interpolation (mesh.c)",
numthreads*mp->numnearest*sizeof *mp->nearest1);
if(mp->ngarrays==2)
{
@@ -1063,7 +1063,7 @@ preparemeshinterparrays(struct gal_mesh_params *mp)
mp->nearest2=malloc(numthreads*mp->numnearest*sizeof *mp->nearest2);
if(mp->nearest2==NULL)
error(EXIT_FAILURE, errno, "%lu bytes for the array to keep the "
- "nearest2 values for interpolation (mesh.c).",
+ "nearest2 values for interpolation (mesh.c)",
numthreads*mp->numnearest*sizeof *mp->nearest2);
}
@@ -1206,7 +1206,7 @@ meshinterponthread(void *inparams)
"points or decrease the number of nearest points to "
"use for interpolation. Problem encountered on thread "
"%lu, for pixel %lu. When running on multiple threads, "
- "This message might be repeated for different threads.\n",
+ "This message might be repeated for different threads",
mp->errstart, currentnum, thisind/mp->nmeshc, mtp->id,
thisind);
}
@@ -1286,7 +1286,7 @@ gal_mesh_interpolate(struct gal_mesh_params *mp, char
*errstart)
mtp[i].id=i;
mtp[i].mp=mp;
err=pthread_create(&t, &attr, meshinterponthread, &mtp[i]);
- if(err) error(EXIT_FAILURE, 0, "Can't create thread %lu.", i);
+ if(err) error(EXIT_FAILURE, 0, "can't create thread %lu", i);
}
/* Wait for all threads to finish and free the spaces. */
@@ -1578,7 +1578,7 @@ gal_mesh_spatial_convolve_on_mesh(struct gal_mesh_params
*mp, float **conv)
/* Allocate space for the convolved array. */
errno=0; *conv=malloc(mp->s0*mp->s1* sizeof **conv);
if(*conv==NULL)
- error(EXIT_FAILURE, errno, "%lu bytes for convolution on mesh output.",
+ error(EXIT_FAILURE, errno, "%lu bytes for convolution on mesh output",
mp->s0*mp->s1* sizeof **conv);
@@ -1641,7 +1641,7 @@ gal_mesh_spatial_convolve_on_mesh(struct gal_mesh_params
*mp, float **conv)
mtp[i].conv=*conv;
mtp[i].chbrd=chbrd;
err=pthread_create(&t, &attr, meshspatialconvonthreads, &mtp[i]);
- if(err) error(EXIT_FAILURE, 0, "Can't create thread %lu.", i);
+ if(err) error(EXIT_FAILURE, 0, "can't create thread %lu", i);
}
/* Wait for all threads to finish and free the spaces. */
@@ -1855,7 +1855,7 @@ gal_mesh_change_to_full_convolution(struct
gal_mesh_params *mp, float *conv)
conv, &indexs[i*thrdcols], &scp[i]);
err=pthread_create(&t, &attr, gal_spatialconvolve_thread, &scp[i]);
if(err)
- error(EXIT_FAILURE, 0, "Can't create thread %lu.", i);
+ error(EXIT_FAILURE, 0, "can't create thread %lu", i);
}
/* Wait for all threads to finish and free the spaces. */
diff --git a/lib/mode.c b/lib/mode.c
index fde3b74..ec20608 100644
--- a/lib/mode.c
+++ b/lib/mode.c
@@ -172,7 +172,7 @@ gal_mode_make_mirror_plots(float *sorted, size_t size,
size_t mirrorindex,
errno=0;
fp=fopen(histsname, "w");
if(fp==NULL)
- error(EXIT_FAILURE, errno, "Could not open file %s", histsname);
+ error(EXIT_FAILURE, errno, "could not open file %s", histsname);
fprintf(fp, "# Histogram of actual and mirrored distributions.\n");
fprintf(fp, "# Column 0: Value in the middle of this bin.\n");
fprintf(fp, "# Column 1: Input data.\n");
@@ -203,7 +203,7 @@ gal_mode_make_mirror_plots(float *sorted, size_t size,
size_t mirrorindex,
else maxcfp=msize;
errno=0;
fp=fopen(cfpsname, "w");
- if(fp==NULL) error(EXIT_FAILURE, errno, "Could not open file %s", cfpsname);
+ if(fp==NULL) error(EXIT_FAILURE, errno, "could not open file %s", cfpsname);
fprintf(fp, "# Cumulative frequency plot (average index in bin) of\n"
"# Actual and mirrored distributions.\n");
fprintf(fp, "# Column 0: Value in the middle of this bin.\n");
diff --git a/lib/polygon.c b/lib/polygon.c
index f68b7c0..ad3a2de 100644
--- a/lib/polygon.c
+++ b/lib/polygon.c
@@ -89,11 +89,11 @@ gal_polygon_ordered_corners(double *in, size_t n, size_t
*ordinds)
tindexs[GAL_POLYGON_MAX_CORNERS];
if(n>GAL_POLYGON_MAX_CORNERS)
- error(EXIT_FAILURE, 0, "Most probably a bug! The number of corners "
+ error(EXIT_FAILURE, 0, "most probably a bug! The number of corners "
"given to `gal_polygon_ordered_corners' is more than %d. This is an "
"internal value and cannot be set from the outside. Most probably "
"Some bug has caused this un-normal value. Please contact us at "
- PACKAGE_BUGREPORT" so we can solve this problem.",
+ PACKAGE_BUGREPORT" so we can solve this problem",
GAL_POLYGON_MAX_CORNERS);
/* For a check:
@@ -348,9 +348,9 @@ gal_polygon_clip(double *s, size_t n, double *c, size_t m,
/*
if(n>GAL_POLYGON_MAX_CORNERS || m>GAL_POLYGON_MAX_CORNERS)
- error(EXIT_FAILURE, 0, "The two polygons given to the function "
+ error(EXIT_FAILURE, 0, "the two polygons given to the function "
"gal_polygon_clip in polygon.c have %lu and %lu vertices. They
cannot"
- " have any values larger than %lu.", n, m, GAL_POLYGON_MAX_CORNERS);
+ " have any values larger than %lu", n, m, GAL_POLYGON_MAX_CORNERS);
*/
/* 2*outnum because for each vertice, there are two elements. */
diff --git a/lib/spatialconvolve.c b/lib/spatialconvolve.c
index 2fc7a09..7b72872 100644
--- a/lib/spatialconvolve.c
+++ b/lib/spatialconvolve.c
@@ -184,7 +184,7 @@ gal_spatialconvolve_convolve(float *input, size_t is0,
size_t is1,
errno=0;
*out=malloc(is0*is1*sizeof **out);
if(*out==NULL)
- error(EXIT_FAILURE, errno, "%lu bytes for convolution output.",
+ error(EXIT_FAILURE, errno, "%lu bytes for convolution output",
is0*is1*sizeof **out);
@@ -218,7 +218,7 @@ gal_spatialconvolve_convolve(float *input, size_t is0,
size_t is1,
&indexs[i*thrdcols], &scp[i]);
err=pthread_create(&t, &attr, gal_spatialconvolve_thread, &scp[i]);
if(err)
- error(EXIT_FAILURE, 0, "Can't create thread %lu.", i);
+ error(EXIT_FAILURE, 0, "can't create thread %lu", i);
}
/* Wait for all threads to finish and free the spaces. */
diff --git a/lib/statistics.c b/lib/statistics.c
index eeffe80..c35cca4 100644
--- a/lib/statistics.c
+++ b/lib/statistics.c
@@ -625,10 +625,10 @@ gal_statistics_f_ave_std(float *in, size_t size, float
*ave,
sum=gal_statistics_float_sum_mask(in, mask, size, &nsize1);
sum2=gal_statistics_float_sum_squared_mask(in, mask, size, &nsize2);
if(nsize1!=nsize2)
- error(EXIT_FAILURE, 0, "A bug in gal_statistics_f_ave_std "
+ error(EXIT_FAILURE, 0, "a bug in gal_statistics_f_ave_std "
"(lib/statistics.h). Somehow the number of masked pixels is "
"measured differently. Please contact us so we can find the "
- "cause.");
+ "cause");
size=nsize1;
}
else
@@ -662,9 +662,9 @@ gal_statistics_f_ave_std_l(float *in, size_t size, float
*ave,
sum=gal_statistics_float_sum_mask_l(in, mask, size, &nsize1);
sum2=gal_statistics_float_sum_squared_mask_l(in, mask, size, &nsize2);
if(nsize1!=nsize2)
- error(EXIT_FAILURE, 0, "A bug in favestl (lib/statistics.h). "
+ error(EXIT_FAILURE, 0, "a bug in favestl (lib/statistics.h). "
"Somehow the number of masked pixels is measured "
- "differently. Please contact us so we can find the cause.");
+ "differently. Please contact us so we can find the cause");
size=nsize1;
}
*ave=sum/size;
@@ -882,8 +882,8 @@ gal_statistics_histogram(float *sorted, size_t size, float
*bins,
size_t histrow=0, i;
if((long)numbins<=0)
- error(EXIT_FAILURE, 0, "The number of bins in gal_statistics_histogram "
- "(statistics.h) must be >0. You have given asked for %ld.",
+ error(EXIT_FAILURE, 0, "the number of bins in gal_statistics_histogram "
+ "(statistics.h) must be >0. You have given asked for %ld",
(long)numbins);
/* Fill the histogram. */
@@ -1042,7 +1042,7 @@ gal_statistics_save_hist(float *sorted, size_t size,
size_t numbins,
errno=0;
fp=fopen(filename, "w");
if(fp==NULL)
- error(EXIT_FAILURE, errno, "Couldn't open file %s", filename);
+ error(EXIT_FAILURE, errno, "couldn't open file %s", filename);
fprintf(fp, "%s\n", comment);
fprintf(fp, "# The input %lu points binned in %lu bins\n#\n",
size, numbins);
@@ -1084,8 +1084,8 @@ gal_statistics_index_from_quantile(size_t size, float
quant)
float floatindex;
if(quant>1.0f)
- error(EXIT_FAILURE, 0, "The quantile in gal_statistics_index_from_quantile
"
- "(statistics.c) Should be smaller.");
+ error(EXIT_FAILURE, 0, "the quantile in gal_statistics_index_from_quantile
"
+ "(statistics.c) Should be smaller");
/* Find the index of the quantile. */
floatindex=(float)size*quant;
diff --git a/lib/threads.c b/lib/threads.c
index 37e6b79..8eebe4f 100644
--- a/lib/threads.c
+++ b/lib/threads.c
@@ -59,14 +59,14 @@ pthread_barrier_init(pthread_barrier_t *b,
pthread_barrierattr_t *attr,
/* Initialize the mutex: */
err=pthread_mutex_init(&b->mutex, 0);
if(err)
- error(EXIT_FAILURE, err, "Inializing mutex in pthread_barrier_init");
+ error(EXIT_FAILURE, err, "inializing mutex in pthread_barrier_init");
/* Initialize the condition variable: */
err=pthread_cond_init(&b->cond, 0);
if(err)
{
pthread_mutex_destroy(&b->mutex);
- error(EXIT_FAILURE, err, "Inializing cond in pthread_barrier_init");
+ error(EXIT_FAILURE, err, "inializing cond in pthread_barrier_init");
}
/* set the values: */
@@ -152,7 +152,7 @@ gal_threads_dist_in_threads(size_t nindexs, size_t nthrds,
size_t **outthrds,
errno=0;
thrds=*outthrds=malloc(nthrds*thrdcols*sizeof *thrds);
if(thrds==NULL)
- error(EXIT_FAILURE, errno, "Allocating thrds in prepindexsinthreads");
+ error(EXIT_FAILURE, errno, "allocating thrds in prepindexsinthreads");
/* Initialize all the elements to NONINDEX. */
fp=(sp=thrds)+nthrds*thrdcols;
@@ -187,9 +187,9 @@ gal_threads_attr_barrier_init(pthread_attr_t *attr,
pthread_barrier_t *b,
int err;
err=pthread_attr_init(attr);
- if(err) error(EXIT_FAILURE, 0, "Thread attr not initialized.");
+ if(err) error(EXIT_FAILURE, 0, "thread attr not initialized");
err=pthread_attr_setdetachstate(attr, PTHREAD_CREATE_DETACHED);
- if(err) error(EXIT_FAILURE, 0, "Thread attr not detached.");
+ if(err) error(EXIT_FAILURE, 0, "thread attr not detached");
err=pthread_barrier_init(b, NULL, numthreads);
- if(err) error(EXIT_FAILURE, 0, "Thread barrier not initialized.");
+ if(err) error(EXIT_FAILURE, 0, "thread barrier not initialized");
}
diff --git a/lib/txtarrayvv.c b/lib/txtarrayvv.c
index a6664d6..26ad22d 100644
--- a/lib/txtarrayvv.c
+++ b/lib/txtarrayvv.c
@@ -101,7 +101,7 @@ txttablesize(char *filename, size_t *outs0, size_t *outs1)
error(EXIT_FAILURE, errno, "%s", filename);
if(s0==0 && s1==0)
- error(EXIT_FAILURE, 0, "No table could be read in %s.", filename);
+ error(EXIT_FAILURE, 0, "no table could be read in %s", filename);
*outs0=s0;
*outs1=s1;
@@ -364,19 +364,19 @@ gal_txtarray_array_to_txt(double *array, size_t s0,
size_t s1, char *comments,
for(i=0;int_cols[i]>0;++i)
if(int_cols[i]>=s1)
error(EXIT_FAILURE, 0, "gal_txtarray_array_to_txt: In int_cols[], %d is "
- "larger than the number of columns: %lu.", int_cols[i], s1);
+ "larger than the number of columns: %lu", int_cols[i], s1);
for(i=0;accu_cols[i]>0;++i)
if(accu_cols[i]>=s1)
error(EXIT_FAILURE, 0, "gal_txtarray_array_to_txt: In accu_cols[], %d is
"
- "larger than the number of columns: %lu.", accu_cols[i], s1);
+ "larger than the number of columns: %lu", accu_cols[i], s1);
for(i=0;i<3;++i)
if(space[i]<=0)
error(EXIT_FAILURE, 0, "gal_txtarray_array_to_txt: In space[], %d is "
- "smaller or equal to zero.", space[i]);
+ "smaller or equal to zero", space[i]);
for(i=0;i<2;++i)
if(prec[i]<0)
error(EXIT_FAILURE, 0, "gal_txtarray_array_to_txt: In prec[], %d is "
- "smaller than zero.", space[i]);
+ "smaller than zero", space[i]);
/* Allocate the spaces: */
errno=0;
diff --git a/src/arithmetic/args.h b/src/arithmetic/args.h
index 4c8d9bd..ff096bd 100644
--- a/src/arithmetic/args.h
+++ b/src/arithmetic/args.h
@@ -164,10 +164,10 @@ parse_opt(int key, char *arg, struct argp_state *state)
check if the first character of arg is the equal sign, then the
user is warned and the program is stopped: */
if(arg && arg[0]=='=')
- argp_error(state, "Incorrect use of the equal sign (`=`). For short "
+ argp_error(state, "incorrect use of the equal sign (`=`). For short "
"options, `=` should not be used and for long options, "
"there should be no space between the option, equal sign "
- "and value.");
+ "and value");
switch(key)
{
@@ -216,7 +216,7 @@ parse_opt(int key, char *arg, struct argp_state *state)
&& p->cp.printparams==0)
{
if(state->arg_num==0)
- argp_error(state, "No argument given!");
+ argp_error(state, "no argument given");
}
break;
diff --git a/src/arithmetic/arithmetic.c b/src/arithmetic/arithmetic.c
index b305ea1..7269408 100644
--- a/src/arithmetic/arithmetic.c
+++ b/src/arithmetic/arithmetic.c
@@ -105,7 +105,7 @@ pop_operand(struct imgarithparams *p, double *number,
double **array,
/* If the operand linked list has finished, then give an error and
exit. */
if(operands==NULL)
- error(EXIT_FAILURE, 0, "Not enough operands for the \"%s\" operator.",
+ error(EXIT_FAILURE, 0, "not enough operands for the \"%s\" operator",
operator);
@@ -118,9 +118,9 @@ pop_operand(struct imgarithparams *p, double *number,
double **array,
warnings.*/
if( (strlen(operands->filename)>0) + !(isnan(operands->number))
+ (operands->array!=NOOPTARRAY) != 1)
- error(EXIT_FAILURE, 0, "A bug! Please contact us at %s so we can fix the "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at %s so we can fix the "
"problem. For some reason, one node in the operands linked list "
- "has more than one value.", PACKAGE_BUGREPORT);
+ "has more than one value", PACKAGE_BUGREPORT);
/* Set the array output. If filename is present then read the file
@@ -163,7 +163,7 @@ pop_operand(struct imgarithparams *p, double *number,
double **array,
error(EXIT_FAILURE, 0, "%s (hdu=%s): has size of %lu x %lu. "
"However, previous images had a size of %lu x %lu. All "
"the images must be the same size in order for "
- "ImageArithmetic to work.", filename, hdu, s0, s1,
+ "ImageArithmetic to work", filename, hdu, s0, s1,
p->s0, p->s1);
}
@@ -480,9 +480,9 @@ alloppixs(struct imgarithparams *p, char *operator)
else if(!strcmp(operator, "average"))
thisfunction = &gal_statistics_double_average;
else
- error(EXIT_FAILURE, 0, "A bug! Please contact us at %s so we "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at %s so we "
"can address the problem. The value of `operator' in "
- "alloppixs (%s) is not recognized.",
+ "alloppixs (%s) is not recognized",
PACKAGE_BUGREPORT, operator);
@@ -491,12 +491,12 @@ alloppixs(struct imgarithparams *p, char *operator)
errno=0;
allarrays=malloc(numop*sizeof *allarrays);
if(allarrays==NULL)
- error(EXIT_FAILURE, errno, "%lu bytes for allarrays in alloppixs.",
+ error(EXIT_FAILURE, errno, "%lu bytes for allarrays in alloppixs",
numop*sizeof *allarrays);
errno=0;
allpixels=malloc(numop*sizeof *allpixels);
if(allpixels==NULL)
- error(EXIT_FAILURE, errno, "%lu bytes for allpixels in alloppixs.",
+ error(EXIT_FAILURE, errno, "%lu bytes for allpixels in alloppixs",
numop*sizeof *allpixels);
@@ -522,13 +522,13 @@ alloppixs(struct imgarithparams *p, char *operator)
allarrays[i]=arr;
break;
case 0:
- error(EXIT_FAILURE, 0, "For the %s operator, all operands "
- "must be either an array or number.", operator);
+ error(EXIT_FAILURE, 0, "for the %s operator, all operands "
+ "must be either an array or number", operator);
break;
default:
- error(EXIT_FAILURE, 0, "A Bug! Please contact us at %s so we "
+ error(EXIT_FAILURE, 0, "a Bug! Please contact us at %s so we "
"can address the problem. The value of firstisarray (%d) "
- "in the alloppixs function is not recognized.",
+ "in the alloppixs function is not recognized",
PACKAGE_BUGREPORT, firstisarray);
}
else
@@ -542,13 +542,13 @@ alloppixs(struct imgarithparams *p, char *operator)
allpixels[i]=num;
break;
case 1:
- error(EXIT_FAILURE, 0, "For the %s operator, all operands "
- "must be either an array or number.", operator);
+ error(EXIT_FAILURE, 0, "for the %s operator, all operands "
+ "must be either an array or number", operator);
break;
default:
- error(EXIT_FAILURE, 0, "A Bug! Please contact us at %s so we "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at %s so we "
"can address the problem. The value of firstisarray (%d) "
- "in the alloppixs function is not recognized.",
+ "in the alloppixs function is not recognized",
PACKAGE_BUGREPORT, firstisarray);
}
}
@@ -824,16 +824,16 @@ reversepolish(struct imgarithparams *p)
|| !strcmp(token->v, "average")
|| !strcmp(token->v, "median")) alloppixs(p, token->v);
else
- error(EXIT_FAILURE, 0, "The argument \"%s\" could not be "
- "interpretted as an operator.", token->v);
+ error(EXIT_FAILURE, 0, "the argument \"%s\" could not be "
+ "interpretted as an operator", token->v);
}
}
/* If there is more than one node in the operands stack, then the
user has given too many operands and there is an error. */
if(p->operands->next!=NULL)
- error(EXIT_FAILURE, 0, "There are too many operands for the operators "
- "in the given expression.");
+ error(EXIT_FAILURE, 0, "there are too many operands for the operators "
+ "in the given expression");
/* If the remaining operand is an array then save the array as a
diff --git a/src/arithmetic/ui.c b/src/arithmetic/ui.c
index e33bb4c..023d92f 100644
--- a/src/arithmetic/ui.c
+++ b/src/arithmetic/ui.c
@@ -356,7 +356,7 @@ setparams(int argc, char *argv[], struct imgarithparams *p)
/* Read the arguments. */
errno=0;
if(argp_parse(&thisargp, argc, argv, 0, 0, p))
- error(EXIT_FAILURE, errno, "Parsing arguments");
+ error(EXIT_FAILURE, errno, "parsing arguments");
/* Revert the conversion of the hyphen above back to the original
character. */
diff --git a/src/convertt/args.h b/src/convertt/args.h
index 58e159c..af53594 100644
--- a/src/convertt/args.h
+++ b/src/convertt/args.h
@@ -268,10 +268,10 @@ parse_opt(int key, char *arg, struct argp_state *state)
check if the first character of arg is the equal sign, then the
user is warned and the program is stopped: */
if(arg && arg[0]=='=')
- argp_error(state, "Incorrect use of the equal sign (`=`). For short "
+ argp_error(state, "incorrect use of the equal sign (`=`). For short "
"options, `=` should not be used and for long options, "
"there should be no space between the option, equal sign "
- "and value.");
+ "and value");
switch(key)
{
@@ -303,7 +303,7 @@ parse_opt(int key, char *arg, struct argp_state *state)
gal_checkset_int_smaller_equal_to(arg, &p->quality, "quality", key,
p->cp.spack, NULL, 0, 100);
if(p->quality<0)
- error(EXIT_FAILURE, 0, "The quality option should be positive.");
+ error(EXIT_FAILURE, 0, "the quality option should be positive");
p->up.qualityset=1;
break;
case 'x':
@@ -324,7 +324,7 @@ parse_opt(int key, char *arg, struct argp_state *state)
case 'm':
gal_checkset_int_smaller_equal_to(arg, &tmp, "maxbyte", key,
p->cp.spack, NULL, 0, UINT8_MAX);
- if(tmp<0) error(EXIT_FAILURE, 0, "--maxbyte (-m) should be positive.");
+ if(tmp<0) error(EXIT_FAILURE, 0, "--maxbyte (-m) should be positive");
p->maxbyte=tmp;
p->up.maxbyteset=1;
break;
@@ -365,9 +365,9 @@ parse_opt(int key, char *arg, struct argp_state *state)
&& p->cp.printparams==0)
{
if(state->arg_num==0)
- argp_error(state, "No argument given!");
+ argp_error(state, "no argument given");
if(p->inputnames==NULL)
- argp_error(state, "No input files provided!");
+ argp_error(state, "no input files provided");
}
break;
diff --git a/src/convertt/convertt.c b/src/convertt/convertt.c
index 7238895..266a607 100644
--- a/src/convertt/convertt.c
+++ b/src/convertt/convertt.c
@@ -60,7 +60,7 @@ changevalue(struct converttparams *p)
to=malloc(numchange*sizeof *to);
from=malloc(numchange*sizeof *from);
if(to==NULL || from==NULL)
- error(EXIT_FAILURE, errno, "%lu bytes for `to` or `from` in convert.",
+ error(EXIT_FAILURE, errno, "%lu bytes for `to` or `from` in convert",
numchange*sizeof *from);
i=1;
tmp=p->change;
@@ -308,10 +308,10 @@ doubleto8bit(struct converttparams *p)
{fu=(u=ech[i])+size; do *u=0; while(++u<fu);}
else if(numch==4) /* CMYK */
{fu=(u=ech[i])+size; do *u=UINT8_MAX; while(++u<fu);}
- else error(EXIT_FAILURE, 0, "A bug! The number of channels in "
+ else error(EXIT_FAILURE, 0, "a bug! The number of channels in "
"doubleto8bit is not 3 or 4 when there is a blank "
"channel, this should not happen. Please contact us "
- "So we can fix it.");
+ "So we can fix it");
}
else
{
@@ -405,10 +405,10 @@ convertt(struct converttparams *p)
#ifdef HAS_LIBJPEG
savejpeg(p);
#else
- error(EXIT_FAILURE, 0, "You have asked for a JPEG output, however, "
+ error(EXIT_FAILURE, 0, "you have asked for a JPEG output, however, "
"when %s was configured libjpeg was not available. To write "
"to JPEG files, libjpeg is required. Please install it and "
- "configure, make and install %s again.", PACKAGE_STRING,
+ "configure, make and install %s again", PACKAGE_STRING,
PACKAGE_STRING);
#endif
break;
@@ -417,9 +417,9 @@ convertt(struct converttparams *p)
saveepsorpdf(p);
break;
default:
- error(EXIT_FAILURE, 0, "A bug! The internal type of the output is "
+ error(EXIT_FAILURE, 0, "a bug! The internal type of the output is "
"not recognized. Please contact us so we can find the problem "
- "and fix it.");
+ "and fix it");
}
/* Free the ech arrays. Note that if they have not been
diff --git a/src/convertt/eps.c b/src/convertt/eps.c
index 28e5cc6..2fb7f22 100644
--- a/src/convertt/eps.c
+++ b/src/convertt/eps.c
@@ -182,7 +182,7 @@ blackandwhite(struct converttparams *p)
errno=0;
bits=calloc(bytesinimg, sizeof *bits);
if(bits==NULL)
- error(EXIT_FAILURE, errno, "Allocating %lu bytes in blackandwhite",
+ error(EXIT_FAILURE, errno, "allocating %lu bytes in blackandwhite",
bytesinimg);
for(i=0;i<s0;++i)
@@ -318,9 +318,9 @@ writeepsimage(struct converttparams *p, FILE *fp)
else if(p->numch==3) fprintf(fp, "/DeviceRGB setcolorspace\n");
else if(p->numch==4) fprintf(fp, "/DeviceCMYK setcolorspace\n");
else
- error(EXIT_FAILURE, 0, "A bug! In saveepsorpdf the number of channels "
+ error(EXIT_FAILURE, 0, "a bug! In saveepsorpdf the number of channels "
"is not 1, 3 or 4. Please contact us so we can find the issue "
- "and fix it.");
+ "and fix it");
fprintf(fp, "<<\n");
fprintf(fp, " /ImageType 1\n");
fprintf(fp, " /Width %lu\n", p->s1[0]);
@@ -364,8 +364,8 @@ saveepsorpdf(struct converttparams *p)
&epsfilename);
}
else
- error(EXIT_FAILURE, 0, "A bug! In `saveeps`, for outputtype is "
- "neither eps or pdf! Please contact us so we fix it.");
+ error(EXIT_FAILURE, 0, "a bug! In `saveeps`, for outputtype is "
+ "neither eps or pdf! Please contact us so we fix it");
@@ -433,15 +433,15 @@ saveepsorpdf(struct converttparams *p)
" -dDEVICEHEIGHTPOINTS=%lu -dPDFFitPage %s", p->cp.output,
winpt+2*p->borderwidth, hinpt+2*p->borderwidth, epsfilename);
if(system(command))
- error(EXIT_FAILURE, 0, "The command to convert a PostScript file to "
+ error(EXIT_FAILURE, 0, "the command to convert a PostScript file to "
"PDF (`%s') was not successful! The PostScript file (%s) is "
"left if you want to convert or use it through any other "
- "means.", command, epsfilename);
+ "means", command, epsfilename);
sprintf(command, "rm %s", epsfilename);
if(system(command))
error(EXIT_FAILURE, 0, "The PDF output (%s) was created, but the "
"PostScript file which was used to make it (%s) could not be"
- "removed.", p->cp.output, epsfilename);
+ "removed", p->cp.output, epsfilename);
free(epsfilename);
}
}
diff --git a/src/convertt/jpeg.c b/src/convertt/jpeg.c
index d1231bc..f985497 100644
--- a/src/convertt/jpeg.c
+++ b/src/convertt/jpeg.c
@@ -182,7 +182,7 @@ readjpg(char *inname, size_t *outs0, size_t *outs1, size_t
*numcolors)
{
jpeg_destroy_decompress(&cinfo);
fclose(infile);
- error(EXIT_FAILURE, 0, "Problem in reading %s", inname);
+ error(EXIT_FAILURE, 0, "problem in reading %s", inname);
}
jpeg_create_decompress(&cinfo);
jpeg_stdio_src(&cinfo, infile);
@@ -252,9 +252,9 @@ preparejpeg(struct converttparams *p, char *filename)
/* Check if the number of colors that will be added with this JPEG
image does not exceed 4. */
if(p->numch+numcolors>4)
- error(EXIT_FAILURE, 0, "The number of channels in %s added with the "
+ error(EXIT_FAILURE, 0, "the number of channels in %s added with the "
"previous inputs will exceed 4 (the maximum number of color "
- "channels). Can't continue.", filename);
+ "channels). Can't continue", filename);
/* Add each channel to the final set of channels. */
for(i=0;i<numcolors;++i)
@@ -332,9 +332,9 @@ writejpeg(JSAMPLE *jsr, struct converttparams *p)
cinfo.in_color_space = JCS_CMYK;
break;
default:
- error(EXIT_FAILURE, 0, "A bug! The number of channels in writejpeg "
+ error(EXIT_FAILURE, 0, "a bug! The number of channels in writejpeg "
"is not 1, 3 or 4, but %lu. This should not happen. Please "
- "contact us so we can fix the problem.", p->numch);
+ "contact us so we can fix the problem", p->numch);
}
jpeg_set_defaults(&cinfo);
@@ -370,7 +370,7 @@ savejpeg(struct converttparams *p)
/* Make sure the JSAMPLE is 8bits, then allocate the necessary space
based on the number of channels. */
if(sizeof *jsr!=1)
- error(EXIT_FAILURE, 0, "JSAMPLE has to be 8bit!");
+ error(EXIT_FAILURE, 0, "JSAMPLE has to be 8bit");
size=p->numch*p->s0[0]*p->s1[0];
errno=0;
jsr=malloc(size*sizeof *jsr);
diff --git a/src/convertt/ui.c b/src/convertt/ui.c
index 07c2f8e..b9001e6 100644
--- a/src/convertt/ui.c
+++ b/src/convertt/ui.c
@@ -115,7 +115,7 @@ readconfig(char *filename, struct converttparams *p)
gal_checkset_int_smaller_equal_to(value, &p->quality, name, key,
p->cp.spack, filename, lineno,
100);
if(p->quality<0)
- error(EXIT_FAILURE, 0, "The quality option should be positive.");
+ error(EXIT_FAILURE, 0, "the quality option should be positive");
up->qualityset=1;
}
else if(strcmp(name, "widthincm")==0)
@@ -158,7 +158,7 @@ readconfig(char *filename, struct converttparams *p)
gal_checkset_int_smaller_equal_to(value, &tmp, "maxbyte", key,
p->cp.spack, NULL, 0, UINT8_MAX);
if(tmp<0)
- error(EXIT_FAILURE, 0, "--maxbyte (-m) should be positive.");
+ error(EXIT_FAILURE, 0, "--maxbyte (-m) should be positive");
p->maxbyte=tmp;
p->up.maxbyteset=1;
}
@@ -378,7 +378,7 @@ adddotautomaticoutput(struct converttparams *p)
errno=0;
tmp=malloc(strlen(cp->output)+10*sizeof *tmp);
if(tmp==NULL)
- error(EXIT_FAILURE, errno, "%lu bytes for suffix name.",
+ error(EXIT_FAILURE, errno, "%lu bytes for suffix name",
strlen(cp->output)+10*sizeof *tmp);
sprintf(tmp, ".%s", cp->output);
free(cp->output);
@@ -389,7 +389,7 @@ adddotautomaticoutput(struct converttparams *p)
gal_checkset_automatic_output(basename, cp->output, cp->removedirinfo,
cp->dontdelete, &cp->output);
if( gal_checkset_dir_0_file_1(cp->output, cp->dontdelete)==0 )
- error(EXIT_FAILURE, 0, "%s is a directory.", cp->output);
+ error(EXIT_FAILURE, 0, "%s is a directory", cp->output);
}
@@ -404,17 +404,17 @@ sanitycheck(struct converttparams *p)
/* The flux range: */
if(p->fluxlow>p->fluxhigh)
- error(EXIT_FAILURE, 0, "The value of `--fluxlow` (`-L`, %.3f) is "
- "larger than `--fluxhigh` (`-H`, %.3f).", p->fluxlow, p->fluxhigh);
+ error(EXIT_FAILURE, 0, "the value of `--fluxlow` (`-L`, %.3f) is "
+ "larger than `--fluxhigh` (`-H`, %.3f)", p->fluxlow, p->fluxhigh);
/* Make sure there are 1 (for grayscale), 3 (for RGB) or 4 (for
CMYK) color channels. */
if(p->numch!=1 && p->numch!=3 && p->numch!=4)
- error(EXIT_FAILURE, 0, "The number of input color channels has to be "
+ error(EXIT_FAILURE, 0, "the number of input color channels has to be "
"1 (for non image data, grayscale or only K channel in CMYK), "
"3 (for RGB) and 4 (for CMYK). You have given %lu color channels. "
"Note that some file formats (for example JPEG) can contain more "
- "than one color channel.", p->numch);
+ "than one color channel", p->numch);
/* Make sure that there is atleast one input file (not only blank)
and set the sizes of the blank channels to the first non-blank
@@ -422,7 +422,7 @@ sanitycheck(struct converttparams *p)
for(i=0;i<p->numch;++i)
if(p->isblank[i]==0) break;
if(i==p->numch)
- error(EXIT_FAILURE, 0, "All the input(s) are of type blank!");
+ error(EXIT_FAILURE, 0, "all the input(s) are of type blank");
for(j=0;j<p->numch;++j)
if(p->isblank[j])
{
@@ -441,8 +441,8 @@ sanitycheck(struct converttparams *p)
for(i=0;i<p->numch;++i)
fprintf(stderr, "Channel %lu is %lu x %lu pixels.\n", i,
p->s1[i], p->s0[i]);
- error(EXIT_FAILURE, 0, "The input color channels have different "
- "sizes.");
+ error(EXIT_FAILURE, 0, "the input color channels have different "
+ "sizes");
}
}
@@ -453,7 +453,7 @@ sanitycheck(struct converttparams *p)
errno=0;
p->ch[i]=calloc(p->s0[0]*p->s1[0], sizeof *p->ch[i]);
if(p->ch[i]==NULL)
- error(EXIT_FAILURE, errno, "Allocating %lu bytes for the blank "
+ error(EXIT_FAILURE, errno, "allocating %lu bytes for the blank "
"channel %lu", p->s0[0]*p->s1[0]*sizeof *p->ch[i], i);
}
@@ -469,10 +469,10 @@ sanitycheck(struct converttparams *p)
else if(nameisjpeg(cp->output))
{
#ifndef HAS_LIBJPEG
- error(EXIT_FAILURE, 0, "You have asked for a JPEG output, however, "
+ error(EXIT_FAILURE, 0, "you have asked for a JPEG output, however, "
"when %s was configured libjpeg was not available. To write "
"to JPEG files, libjpeg is required. Please install it and "
- "configure, make and install %s again.", PACKAGE_STRING,
+ "configure, make and install %s again", PACKAGE_STRING,
PACKAGE_STRING);
#else
p->outputtype=JPEGFORMAT;
@@ -497,10 +497,10 @@ sanitycheck(struct converttparams *p)
/* If the length of the name is shorter than 4 characters, it is
most probably a mis-spelled extension, warn the user. */
if(strlen(cp->output)<=5)
- error(EXIT_FAILURE, 0, ": (Warning) Your output file name is "
+ error(EXIT_FAILURE, 0, "your output file name is "
"`%s`, based on its length, it might be a mis-spelled "
"extension. Your input is converted to a plain text "
- "format file with That name.",
+ "format file with That name",
cp->output);
p->outputtype=TXTFORMAT;
@@ -508,23 +508,23 @@ sanitycheck(struct converttparams *p)
/* If output type is not an image, there should only be one color
channel: */
if(p->numch>1)
- error(EXIT_FAILURE, 0, "Text output (`--output=%s`) can only be "
+ error(EXIT_FAILURE, 0, "text output (`--output=%s`) can only be "
"completed with one input color channel. You have given "
"%lu. Note that some formats (for example JPEG) can have "
"more than one color channel in each file. You can first "
"convert the file to FITS, then convert the desired "
- "channel to text by specifying the HDU.",
+ "channel to text by specifying the HDU",
cp->output, p->numch);
}
}
else
- error(EXIT_FAILURE, 0, "No ouput file name or extension is specified, "
+ error(EXIT_FAILURE, 0, "no ouput file name or extension is specified, "
"Please run "SPACK" again with the `--output' or `-o' option.\n\n"
"The value to this option doesn't have to be a file name, you "
"can also only give an extension (in which case your input file"
"name will be used for the base name of the output. For example "
"running `"SPACK" filename.fits -ojpg') will produce the output "
- "file `filename.jpg').");
+ "file `filename.jpg')");
}
@@ -568,9 +568,9 @@ preparearrays(struct converttparams *p)
{
/* Check if p->numch has not exceeded 4. */
if(p->numch>=4)
- error(EXIT_FAILURE, 0, "The number of input color channels (not "
+ error(EXIT_FAILURE, 0, "the number of input color channels (not "
"files) has exceeded 4! Note that one file can contain more "
- "than one color channel.");
+ "than one color channel");
/* Make sure this input file exists (if it isn't blank). */
if(strcmp(names[i], "blank")) gal_checkset_check_file(names[i]);
@@ -582,10 +582,10 @@ preparearrays(struct converttparams *p)
{
case 0: hdu=p->cp.hdu; break; case 1: hdu=p->up.hdu2; break;
case 2: hdu=p->up.hdu3; break; case 3: hdu=p->up.hdu4; break;
- default: error(EXIT_FAILURE, 0, "A bug! In parsing the input "
+ default: error(EXIT_FAILURE, 0, "a bug! In parsing the input "
"FITS files, it has gone beyond four! Please "
"contact us so we can see what caused this "
- "problem and fix it.");
+ "problem and fix it");
}
p->numnul[p->numch]=
gal_fitsarray_fits_img_to_array(names[i], hdu,
@@ -606,10 +606,10 @@ preparearrays(struct converttparams *p)
else if ( nameisjpeg(names[i]) )
{
#ifndef HAS_LIBJPEG
- error(EXIT_FAILURE, 0, "You are giving a JPEG input, however, "
+ error(EXIT_FAILURE, 0, "you are giving a JPEG input, however, "
"when %s was configured libjpeg was not available. To read "
"from JPEG files, libjpeg is required. Please install it and "
- "configure, make and install %s again.", PACKAGE_STRING,
+ "configure, make and install %s again", PACKAGE_STRING,
PACKAGE_STRING);
#else
preparejpeg(p, names[i]);
@@ -632,7 +632,7 @@ preparearrays(struct converttparams *p)
else if ( nameiseps(names[i]) )
error(EXIT_FAILURE, 0, "EPS files cannot be used as input. Since "
"EPS files are not raster graphics, they are only used as "
- "output.");
+ "output");
@@ -640,7 +640,7 @@ preparearrays(struct converttparams *p)
else if ( nameispdf(names[i]) )
error(EXIT_FAILURE, 0, "PDF files cannot be used as input. Since "
"PDF files are not raster graphics, they are only used as "
- "output.");
+ "output");
/* Text: */
@@ -653,7 +653,7 @@ preparearrays(struct converttparams *p)
if(d==df)
gal_checkset_check_remove_file(GAL_TXTARRAY_LOG, 0);
else
- error(EXIT_FAILURE, 0, "%s contains non-numeric data, see %s.",
+ error(EXIT_FAILURE, 0, "%s contains non-numeric data, see %s",
names[i], GAL_TXTARRAY_LOG);
p->bitpixs[p->numch]=DOUBLE_IMG;
++p->numch;
@@ -697,7 +697,7 @@ setparams(int argc, char *argv[], struct converttparams *p)
/* Read the arguments. */
errno=0;
if(argp_parse(&thisargp, argc, argv, 0, 0, p))
- error(EXIT_FAILURE, errno, "Parsing arguments");
+ error(EXIT_FAILURE, errno, "parsing arguments");
/* Add the user default values and save them if asked. */
GAL_CONFIGFILES_CHECK_SET_CONFIG;
diff --git a/src/convolve/args.h b/src/convolve/args.h
index 6eb334e..adc86b7 100644
--- a/src/convolve/args.h
+++ b/src/convolve/args.h
@@ -263,10 +263,10 @@ parse_opt(int key, char *arg, struct argp_state *state)
check if the first character of arg is the equal sign, then the
user is warned and the program is stopped: */
if(arg && arg[0]=='=')
- argp_error(state, "Incorrect use of the equal sign (`=`). For short "
+ argp_error(state, "incorrect use of the equal sign (`=`). For short "
"options, `=` should not be used and for long options, "
"there should be no space between the option, equal sign "
- "and value.");
+ "and value");
switch(key)
{
@@ -327,16 +327,16 @@ parse_opt(int key, char *arg, struct argp_state *state)
/* Operating mode: */
case 'p':
if(p->up.frequencyset)
- argp_error(state, "Only one of spatial or frequency domain "
- "convolution modes may be chosen.");
+ argp_error(state, "only one of spatial or frequency domain "
+ "convolution modes may be chosen");
p->spatial=1;
p->frequency=0;
p->up.spatialset=p->up.frequencyset=1;
break;
case 'f':
if(p->up.spatialset)
- argp_error(state, "Only one of spatial or frequency domain "
- "convolution modes may be chosen.");
+ argp_error(state, "only one of spatial or frequency domain "
+ "convolution modes may be chosen");
p->spatial=0;
p->frequency=1;
p->up.spatialset=p->up.frequencyset=1;
@@ -356,7 +356,7 @@ parse_opt(int key, char *arg, struct argp_state *state)
/* Read the non-option arguments: */
case ARGP_KEY_ARG:
if(p->up.inputname)
- argp_error(state, "Only one input file (argument) is required.");
+ argp_error(state, "only one input file (argument) is required");
p->up.inputname=arg;
break;
@@ -371,9 +371,9 @@ parse_opt(int key, char *arg, struct argp_state *state)
&& p->cp.printparams==0)
{
if(state->arg_num==0)
- argp_error(state, "No argument given!");
+ argp_error(state, "no argument given");
if(p->up.inputname==NULL)
- argp_error(state, "No input files provided!");
+ argp_error(state, "no input files provided");
}
break;
diff --git a/src/convolve/convolve.c b/src/convolve/convolve.c
index e2433bb..6062897 100644
--- a/src/convolve/convolve.c
+++ b/src/convolve/convolve.c
@@ -73,9 +73,9 @@ complextoreal(double *c, size_t size, int action, double
**output)
do { *o++ = *c; c+=2; } while(o<of);
break;
default:
- error(EXIT_FAILURE, 0, "A bug! Please contact us at %s so we can "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at %s so we can "
"correct it. For some reason, the action code for complextoreal "
- "in convolve.c (%d) is not recognized.", PACKAGE_BUGREPORT,
+ "in convolve.c (%d) is not recognized", PACKAGE_BUGREPORT,
action);
}
}
@@ -204,7 +204,7 @@ makepaddedcomplex(struct convolveparams *p)
errno=0;
pimg=p->pimg=malloc(2*ps0*ps1*sizeof *pimg);
if(pimg==NULL)
- error(EXIT_FAILURE, errno, "%lu bytes for pimg.", ps0*ps1*sizeof *pimg);
+ error(EXIT_FAILURE, errno, "%lu bytes for pimg", ps0*ps1*sizeof *pimg);
for(i=0;i<ps0;++i)
{
op=(o=pimg+i*2*ps1)+2*ps1; /* pimg is complex. */
@@ -221,7 +221,7 @@ makepaddedcomplex(struct convolveparams *p)
errno=0;
pker=p->pker=malloc(2*ps0*ps1*sizeof *pker);
if(pker==NULL)
- error(EXIT_FAILURE, errno, "%lu bytes for pker.", ps0*ps1*sizeof *pker);
+ error(EXIT_FAILURE, errno, "%lu bytes for pker", ps0*ps1*sizeof *pker);
for(i=0;i<ps0;++i)
{
op=(o=pker+i*2*ps1)+2*ps1; /* pker is complex. */
@@ -361,9 +361,9 @@ correctdeconvolve(struct convolveparams *p, double
**spatial)
/* Check if the image has even sides. */
if(ps0%2 || ps1%2)
- error(EXIT_FAILURE, 0, "A bug! Please contact us at %s. In "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at %s. In "
"correctdeconvolve, the padded image sides are not an "
- "even number!", PACKAGE_BUGREPORT);
+ "even number", PACKAGE_BUGREPORT);
/* First convert the complex image to a real image: */
complextoreal(p->pimg, ps0*ps1, COMPLEXTOREALSPEC, &s);
@@ -529,10 +529,10 @@ twodimensionfft(struct convolveparams *p, struct
fftonthreadparams *fp,
if(forward1backwardn1==1) multiple=2;
else if(forward1backwardn1==-1) multiple=1;
else
- error(EXIT_FAILURE, 0, "A bug! In forward2dfft, the value of the "
+ error(EXIT_FAILURE, 0, "a bug! In forward2dfft, the value of the "
"variable forward1backwardn1 is somehow not 1 or 2, but %d. "
"Please contact us at "PACKAGE_BUGREPORT" so we can find the "
- "cause of the problem and fix it.", forward1backwardn1);
+ "cause of the problem and fix it", forward1backwardn1);
/* ==================== */
@@ -567,7 +567,7 @@ twodimensionfft(struct convolveparams *p, struct
fftonthreadparams *fp,
fp[i].forward1backwardn1=forward1backwardn1;
err=pthread_create(&t, &attr, onedimensionfft, &fp[i]);
if(err)
- error(EXIT_FAILURE, 0, "Can't create thread %lu for rows.",
+ error(EXIT_FAILURE, 0, "can't create thread %lu for rows",
i);
}
@@ -606,7 +606,7 @@ twodimensionfft(struct convolveparams *p, struct
fftonthreadparams *fp,
fp[i].forward1backwardn1=forward1backwardn1;
err=pthread_create(&t, &attr, onedimensionfft, &fp[i]);
if(err)
- error(EXIT_FAILURE, 0, "Can't create thread %lu for columns.",
+ error(EXIT_FAILURE, 0, "can't create thread %lu for columns",
i);
}
pthread_barrier_wait(&b);
diff --git a/src/convolve/ui.c b/src/convolve/ui.c
index e2c9863..b2343dc 100644
--- a/src/convolve/ui.c
+++ b/src/convolve/ui.c
@@ -358,7 +358,7 @@ sanitycheck(struct convolveparams *p)
if(p->cp.outputset)
{
if( gal_checkset_dir_0_file_1(p->cp.output, p->cp.dontdelete) == 0 )
- error(EXIT_FAILURE, 0, "Your output name (%s) is a directory.",
+ error(EXIT_FAILURE, 0, "your output name (%s) is a directory",
p->cp.output);
}
else
@@ -390,7 +390,7 @@ sanitycheck(struct convolveparams *p)
"or change your nearest configuration file so Convolve defaults "
"to the frequency domain. Please see the Gnuastro for more "
"information. On the command line, the manual can be seen with "
- "the `info gnuastro' command.");
+ "the `info gnuastro' command");
}
@@ -453,12 +453,12 @@ preparearrays(struct convolveparams *p)
&p->kernel, &bitpix, &anyblank,
&p->ks0, &p->ks1);
if(p->ks0!=p->is0 || p->ks1!=p->is1)
- error(EXIT_FAILURE, 0, "With the `--makekernel' (`-m') option, "
+ error(EXIT_FAILURE, 0, "with the `--makekernel' (`-m') option, "
"the input image and the image specified with the kernel "
"option should have the same size. The lower resolution "
"input image (%s) has %lux%lu pixels while the higher "
"resolution image (%s) specified with the kernel option has "
- "%lux%lu pixels.", up->inputname, p->is1, p->is0,
+ "%lux%lu pixels", up->inputname, p->is1, p->is0,
up->kernelname, p->ks1, p->ks0);
/* Divide both images by their sum so their lowest frequency
@@ -487,9 +487,9 @@ preparearrays(struct convolveparams *p)
kernel=p->kernel;
if(p->ks0%2==0 || p->ks1%2==0)
- error(EXIT_FAILURE, 0, "The kernel image has to have an odd "
+ error(EXIT_FAILURE, 0, "the kernel image has to have an odd "
"number of pixels on both sides (there has to be on pixel "
- "in the center). %s (hdu: %s) is %lu by %lu.",
+ "in the center). %s (hdu: %s) is %lu by %lu",
p->up.kernelname, p->up.khdu, p->ks1, p->ks0);
/* Convert all the NaN pixels to zero if the kernel contains
@@ -560,7 +560,7 @@ setparams(int argc, char *argv[], struct convolveparams *p)
/* Read the arguments. */
errno=0;
if(argp_parse(&thisargp, argc, argv, 0, 0, p))
- error(EXIT_FAILURE, errno, "Parsing arguments");
+ error(EXIT_FAILURE, errno, "parsing arguments");
/* Add the user default values and save them if asked. */
GAL_CONFIGFILES_CHECK_SET_CONFIG;
diff --git a/src/cosmiccal/args.h b/src/cosmiccal/args.h
index 991fc25..0e927af 100644
--- a/src/cosmiccal/args.h
+++ b/src/cosmiccal/args.h
@@ -183,10 +183,10 @@ parse_opt(int key, char *arg, struct argp_state *state)
check if the first character of arg is the equal sign, then the
user is warned and the program is stopped: */
if(arg && arg[0]=='=')
- argp_error(state, "Incorrect use of the equal sign (`=`). For short "
+ argp_error(state, "incorrect use of the equal sign (`=`). For short "
"options, `=` should not be used and for long options, "
"there should be no space between the option, equal sign "
- "and value.");
+ "and value");
switch(key)
{
@@ -252,9 +252,9 @@ parse_opt(int key, char *arg, struct argp_state *state)
&& p->cp.printparams==0)
{
if(state->arg_num==0)
- argp_error(state, "No argument given!");
+ argp_error(state, "no argument given");
if(p->up.inputname==NULL)
- argp_error(state, "No input FITS image(s) provided!");
+ argp_error(state, "no input FITS image(s) provided");
}
*/
break;
diff --git a/src/cosmiccal/ui.c b/src/cosmiccal/ui.c
index 7f01995..b516cba 100644
--- a/src/cosmiccal/ui.c
+++ b/src/cosmiccal/ui.c
@@ -269,8 +269,8 @@ sanitycheck(struct cosmiccalparams *p)
if more than one is called, check will be larger than one. So in
this case, report an error. */
if(check>1)
- error(EXIT_FAILURE, 0, "Only a single option starting with `--only' "
- "can be called.");
+ error(EXIT_FAILURE, 0, "only a single option starting with `--only' "
+ "can be called");
}
@@ -345,7 +345,7 @@ setparams(int argc, char *argv[], struct cosmiccalparams *p)
/* Read the arguments. */
errno=0;
if(argp_parse(&thisargp, argc, argv, 0, 0, p))
- error(EXIT_FAILURE, errno, "Parsing arguments");
+ error(EXIT_FAILURE, errno, "parsing arguments");
/* Add the user default values and save them if asked. */
GAL_CONFIGFILES_CHECK_SET_CONFIG;
diff --git a/src/header/args.h b/src/header/args.h
index 23c33b1..020831a 100644
--- a/src/header/args.h
+++ b/src/header/args.h
@@ -203,10 +203,10 @@ parse_opt(int key, char *arg, struct argp_state *state)
check if the first character of arg is the equal sign, then the
user is warned and the program is stopped: */
if(arg && arg[0]=='=')
- argp_error(state, "Incorrect use of the equal sign (`=`). For short "
+ argp_error(state, "incorrect use of the equal sign (`=`). For short "
"options, `=` should not be used and for long options, "
"there should be no space between the option, equal sign "
- "and value.");
+ "and value");
switch(key)
{
@@ -254,12 +254,12 @@ parse_opt(int key, char *arg, struct argp_state *state)
if( gal_fitsarray_name_is_fits(arg) )
{
if(p->up.inputname)
- argp_error(state, "Only one input image should be given.");
+ argp_error(state, "only one input image should be given");
else
p->up.inputname=arg;
}
else
- argp_error(state, "%s is not a valid file type.", arg);
+ argp_error(state, "%s is not a valid file type", arg);
break;
@@ -272,9 +272,9 @@ parse_opt(int key, char *arg, struct argp_state *state)
&& p->cp.printparams==0)
{
if(state->arg_num==0)
- argp_error(state, "No argument given!");
+ argp_error(state, "no argument given");
if(p->up.inputname==NULL)
- argp_error(state, "No input FITS image(s) provided!");
+ argp_error(state, "no input FITS image(s) provided");
}
break;
diff --git a/src/header/header.c b/src/header/header.c
index f258b93..4f2b889 100644
--- a/src/header/header.c
+++ b/src/header/header.c
@@ -56,15 +56,15 @@ haserror(struct headerparams *p, int actionid, char
*string, int status)
strcpy(action, "written");
break;
default:
- error(EXIT_FAILURE, 0, "A bug! Please contact us at `%s' so we can fix "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at `%s' so we can fix "
"this problem. In `header.c'. The value of actionid in "
- "`haserror' must not be %d.", PACKAGE_BUGREPORT, actionid);
+ "`haserror' must not be %d", PACKAGE_BUGREPORT, actionid);
}
if(p->quitonerror)
{
fits_report_error(stderr, status);
- error(EXIT_FAILURE, 0, "Not deleted: %s\n", string);
+ error(EXIT_FAILURE, 0, "not deleted: %s\n", string);
}
else
{
@@ -124,9 +124,9 @@ writeupdatekeys(fitsfile *fptr, struct
gal_fitsarray_header_ll **keylist,
gal_fitsarray_io_error(status, NULL);
}
else
- error(EXIT_FAILURE, 0, "A bug! Please contact us at `%s' so we can "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at `%s' so we can "
"fix this problem. In `header.c'. The value of u1w2 in "
- "writeupdatekeys must not be %d.\n", PACKAGE_BUGREPORT, u1w2);
+ "writeupdatekeys must not be %d\n", PACKAGE_BUGREPORT, u1w2);
/* Add the unit: */
if(tmp->unit
@@ -181,8 +181,8 @@ header(struct headerparams *p)
printf("\n");
if (fits_free_memory(fullheader, &status) )
- gal_fitsarray_io_error(status, "Problem in header.c for freeing "
- "the memory used to keep all the headers.");
+ gal_fitsarray_io_error(status, "problem in header.c for freeing "
+ "the memory used to keep all the headers");
}
else
{
diff --git a/src/header/ui.c b/src/header/ui.c
index 4c814b2..3f8e265 100644
--- a/src/header/ui.c
+++ b/src/header/ui.c
@@ -107,7 +107,7 @@ readconfig(char *filename, struct headerparams *p)
errno=0;
cp->hdu=malloc(strlen(value)+1);
if(cp->hdu==NULL)
- error(EXIT_FAILURE, errno, "Space for HDU.");
+ error(EXIT_FAILURE, errno, "space for HDU");
strcpy(cp->hdu, value);
cp->hduset=1;
}
@@ -244,7 +244,7 @@ setuprename(struct headerparams *p)
reported. */
errno=0;
c=malloc(strlen(tmp->v));
- if(c==NULL) error(EXIT_FAILURE, errno, "space for c in setuprename.");
+ if(c==NULL) error(EXIT_FAILURE, errno, "space for c in setuprename");
strcpy(c, tmp->v);
/* Tokenize the input. */
@@ -255,7 +255,7 @@ setuprename(struct headerparams *p)
"complete rename. There should be a space character "
"or a comma (,) between the two keyword names. If you have "
"used the space character, be sure to enclose the value to "
- "the `--rename' option in double quotation marks.", c);
+ "the `--rename' option in double quotation marks", c);
free(c);
}
/*
@@ -296,7 +296,7 @@ fillfitsheaderll(struct gal_linkedlist_stll *input,
errno=0;
original=malloc(strlen(tmp->v)+1);
if(original==NULL)
- error(EXIT_FAILURE, errno, "space for c in setuprename.");
+ error(EXIT_FAILURE, errno, "space for c in setuprename");
strcpy(original, tmp->v);
/* Tokenize the input. Note that strlen does not include the \0
@@ -325,7 +325,7 @@ fillfitsheaderll(struct gal_linkedlist_stll *input,
unit=start;
break;
default:
- error(EXIT_FAILURE, 0, "%s: Only three commas should be "
+ error(EXIT_FAILURE, 0, "%s: only three commas should be "
"given in the write or update keyword options. "
"The general expected format is:\n"
" KEYWORD,value,\"a comment string\",unit\n",
@@ -341,11 +341,11 @@ fillfitsheaderll(struct gal_linkedlist_stll *input,
}
while(++c<cf);
if(keyname==NULL)
- error(EXIT_FAILURE, 0, "The keyword in %s was not readable. "
+ error(EXIT_FAILURE, 0, "the keyword in %s was not readable. "
"The general expected format is:\n"
" KEYWORD,value,\"a comment string\",unit\n"
"Any space characters around the the comma (,) characters "
- "will be seen as part of the respective token.", original);
+ "will be seen as part of the respective token", original);
/*
printf("\n\n-%s-\n-%s-\n-%s-\n-%s-\n", keyname, value, comment, unit);
*/
@@ -360,7 +360,7 @@ fillfitsheaderll(struct gal_linkedlist_stll *input,
errno=0;
fvalue=lp=malloc(sizeof *lp);
if(lp==NULL)
- error(EXIT_FAILURE, errno, "%lu bytes for long integer.",
+ error(EXIT_FAILURE, errno, "%lu bytes for long integer",
sizeof *lp);
*lp=l;
}
@@ -375,7 +375,7 @@ fillfitsheaderll(struct gal_linkedlist_stll *input,
errno=0;
fvalue=dp=malloc(sizeof *dp);
if(dp==NULL)
- error(EXIT_FAILURE, errno, "%lu bytes for double.",
+ error(EXIT_FAILURE, errno, "%lu bytes for double",
sizeof *dp);
*dp=d;
}
@@ -415,7 +415,7 @@ preparearrays(struct headerparams *p)
else
iomode=READWRITE;
if( fits_open_file(&p->fptr, ffname, iomode, &status) )
- gal_fitsarray_io_error(status, "Reading file.");
+ gal_fitsarray_io_error(status, "reading file");
free(ffname);
/* Separate the comma-separated values: */
@@ -464,7 +464,7 @@ setparams(int argc, char *argv[], struct headerparams *p)
/* Read the arguments. */
errno=0;
if(argp_parse(&thisargp, argc, argv, 0, 0, p))
- error(EXIT_FAILURE, errno, "Parsing arguments");
+ error(EXIT_FAILURE, errno, "parsing arguments");
/* Add the user default values and save them if asked. */
GAL_CONFIGFILES_CHECK_SET_CONFIG;
diff --git a/src/imgcrop/args.h b/src/imgcrop/args.h
index da39f03..f721f52 100644
--- a/src/imgcrop/args.h
+++ b/src/imgcrop/args.h
@@ -326,10 +326,10 @@ parse_opt(int key, char *arg, struct argp_state *state)
check if the first character of arg is the equal sign, then the
user is warned and the program is stopped: */
if(arg && arg[0]=='=')
- argp_error(state, "Incorrect use of the equal sign (`=`). For short "
+ argp_error(state, "incorrect use of the equal sign (`=`). For short "
"options, `=` should not be used and for long options, "
"there should be no space between the option, equal sign "
- "and value.");
+ "and value");
switch(key)
{
@@ -337,14 +337,14 @@ parse_opt(int key, char *arg, struct argp_state *state)
/* Operating modes: */
case 'I':
if(p->up.imgmodeset)
- argp_error(state, "Only one of Image or WCS modes can be chosen.");
+ argp_error(state, "only one of Image or WCS modes can be chosen");
p->imgmode=1;
p->wcsmode=0;
p->up.imgmodeset=p->up.wcsmodeset=1;
break;
case 'W':
if(p->up.wcsmodeset)
- argp_error(state, "Only one of Image or WCS modes can be chosen.");
+ argp_error(state, "only one of Image or WCS modes can be chosen");
p->imgmode=0;
p->wcsmode=1;
p->up.imgmodeset=p->up.wcsmodeset=1;
@@ -466,7 +466,7 @@ parse_opt(int key, char *arg, struct argp_state *state)
else
{
if(p->up.catname)
- argp_error(state, "Only one catalog file can be given.");
+ argp_error(state, "only one catalog file can be given");
else
{
p->up.catname=arg;
@@ -485,14 +485,14 @@ parse_opt(int key, char *arg, struct argp_state *state)
&& p->cp.printparams==0)
{
if(state->arg_num==0)
- argp_error(state, "No argument given!");
+ argp_error(state, "no argument given");
if(p->up.catname==NULL && !(p->up.xcset || p->up.ycset
|| p->up.raset || p->up.decset
|| p->up.sectionset
|| p->up.polygonset))
- argp_error(state, "No catalog provided!");
+ argp_error(state, "no catalog provided");
if(p->up.gal_linkedlist_stll==NULL)
- argp_error(state, "No FITS image(s) provided!");
+ argp_error(state, "no FITS image(s) provided");
}
break;
diff --git a/src/imgcrop/crop.c b/src/imgcrop/crop.c
index 8037db9..fa84a2b 100644
--- a/src/imgcrop/crop.c
+++ b/src/imgcrop/crop.c
@@ -93,7 +93,7 @@ sectionparser(char *section, long *naxes, long *fpixel, long
*lpixel)
case ',':
++dim;
if(dim==2)
- error(EXIT_FAILURE, 0, "Extra `,` in `%s`.", section);
+ error(EXIT_FAILURE, 0, "Extra `,` in `%s`", section);
forl='f';
++pt;
break;
@@ -102,9 +102,9 @@ sectionparser(char *section, long *naxes, long *fpixel,
long *lpixel)
++pt;
break;
case '.':
- error(EXIT_FAILURE, 0, "The numbers in the argument to "
+ error(EXIT_FAILURE, 0, "the numbers in the argument to "
"`--section` (`-s') have to be integers. You input "
- "includes a float number: %s.",
+ "includes a float number: %s",
section);
break;
case ' ': case '\t':
@@ -151,10 +151,10 @@ sectionparser(char *section, long *naxes, long *fpixel,
long *lpixel)
}
if(fpixel[0]>=lpixel[0] || fpixel[1]>=lpixel[1])
- error(EXIT_FAILURE, 0, "The bottom left corner coordinates "
+ error(EXIT_FAILURE, 0, "the bottom left corner coordinates "
"cannot be larger or equal to the top right's! Your section "
"string (%s) has been read as: bottom left coordinate "
- "(%ld, %ld) to top right coordinate (%ld, %ld).",
+ "(%ld, %ld) to top right coordinate (%ld, %ld)",
section, fpixel[0], fpixel[1], lpixel[0], lpixel[1]);
/*
@@ -186,13 +186,13 @@ polygonparser(struct imgcropparams *p)
case ',':
++dim;
if(dim==2)
- error(EXIT_FAILURE, 0, "Extra `,` in `%s`.", p->up.polygon);
+ error(EXIT_FAILURE, 0, "Extra `,` in `%s`", p->up.polygon);
++pt;
break;
case ':':
if(dim==0)
- error(EXIT_FAILURE, 0, "Not enough coordinates for at least "
- "one polygon vertex (in %s).", p->up.polygon);
+ error(EXIT_FAILURE, 0, "not enough coordinates for at least "
+ "one polygon vertex (in %s)", p->up.polygon);
dim=0;
++pt;
break;
@@ -219,7 +219,7 @@ polygonparser(struct imgcropparams *p)
/* Make sure if a number was read at all? */
if(tailptr==pt) /* No number was read! */
error(EXIT_FAILURE, 0, "%s could not be parsed as a floating "
- "point number.", tailptr);
+ "point number", tailptr);
/* If this was the second dimension, then put the values
into the linked list: */
@@ -380,9 +380,9 @@ polygonmask(struct cropparams *crp, void *array, long
*fpixel_i,
free(db);
break;
default:
- error(EXIT_FAILURE, 0, "A bug! Please contact us at %s, so we "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at %s, so we "
"can fix the problem. For some reason, an unrecognized "
- "bitpix value (%d) has been seen in polygonmask (crop.c).",
+ "bitpix value (%d) has been seen in polygonmask (crop.c)",
PACKAGE_BUGREPORT, bitpix);
}
@@ -435,9 +435,9 @@ changezerotonan(void *array, size_t size, int bitpix)
break;
default:
- error(EXIT_FAILURE, 0, "In changezerotonan, bitpix is not "
+ error(EXIT_FAILURE, 0, "in changezerotonan, bitpix is not "
"recognized! This is out of the users control and is a bug, "
- "please report it to us so we see how it was caused and fix it.");
+ "please report it to us so we see how it was caused and fix it");
}
}
@@ -512,12 +512,12 @@ cropflpixel(struct cropparams *crp)
imgpolygonflpixel(p->ipolygon, p->nvertices, fpixel, lpixel);
}
else
- error(EXIT_FAILURE, 0, "A bug! In image mode, neither of the "
+ error(EXIT_FAILURE, 0, "a bug! In image mode, neither of the "
"following has been set: a catalog, a central pixel, "
"a section or a polygon in the image. Please contact us "
"to see how it got to this impossible place! You should "
"have been warned of this condition long before ImageCrop "
- "reaches this point.");
+ "reaches this point");
}
else if(p->wcsmode) /* In wcsmode, crp->world is already filled. */
{ /* Note that p->iwidth was set based on p->wwidth. */
@@ -543,9 +543,9 @@ cropflpixel(struct cropparams *crp)
}
}
else
- error(EXIT_FAILURE, 0, "A bug! in cropflpixel (crop.c), "
+ error(EXIT_FAILURE, 0, "a bug! in cropflpixel (crop.c), "
"neither imgmode or wcsmode are set. Please contact us so "
- "we can see how it got to this impossible place.");
+ "we can see how it got to this impossible place");
/* If the user only wants regions outside to the polygon, then set
the fpixel and lpixel to cover the full input image. */
@@ -611,17 +611,17 @@ firstcropmakearray(struct cropparams *crp, long *fpixel_i,
/* Create the FITS image extension and array and fill it with null
values. */
if(fits_create_file(&crp->outfits, outname, &status))
- gal_fitsarray_io_error(status, "Creating file.");
+ gal_fitsarray_io_error(status, "creating file");
ofp=crp->outfits;
if(fits_create_img(ofp, bitpix, naxis, naxes, &status))
- gal_fitsarray_io_error(status, "Creating image.");
+ gal_fitsarray_io_error(status, "creating image");
if(bitpix==BYTE_IMG || bitpix==SHORT_IMG
|| bitpix==LONG_IMG || bitpix==LONGLONG_IMG)
if(fits_write_key(ofp, crp->p->datatype, "BLANK",
- crp->p->bitnul, "Pixels with no data.", &status) )
- gal_fitsarray_io_error(status, "Adding Blank.");
+ crp->p->bitnul, "pixels with no data", &status) )
+ gal_fitsarray_io_error(status, "adding Blank");
if(fits_write_null_img(ofp, 1, naxes[0]*naxes[1], &status))
- gal_fitsarray_io_error(status, "Writing null array.");
+ gal_fitsarray_io_error(status, "writing null array");
/* Write the WCS header keywords in the output FITS image, then
@@ -863,9 +863,9 @@ iscenterfilled(struct cropparams *crp)
break;
default:
- error(EXIT_FAILURE, 0, "In iscenterfilled, the bitbix is not "
+ error(EXIT_FAILURE, 0, "in iscenterfilled, the bitbix is not "
"recognized! This is not possible by the user, so it is a "
- "a bug. Please contact us so we can correct it.");
+ "a bug. Please contact us so we can correct it");
}
free(array);
diff --git a/src/imgcrop/imgcrop.c b/src/imgcrop/imgcrop.c
index e50a5e9..3ffd8c4 100644
--- a/src/imgcrop/imgcrop.c
+++ b/src/imgcrop/imgcrop.c
@@ -87,7 +87,7 @@ imgmodecrop(void *inparam)
status=0;
if( fits_close_file(crp->outfits, &status) )
gal_fitsarray_io_error(status, "CFITSIO could not close "
- "the opened file.");
+ "the opened file");
/* Remove the output image if its center was not filled. */
if(log->centerfilled==0 && p->keepblankcenter==0)
@@ -114,7 +114,7 @@ imgmodecrop(void *inparam)
status=0;
if( fits_close_file(crp->infits, &status) )
gal_fitsarray_io_error(status, "imgmode.c: imgcroponthreads could "
- "not close FITS file.");
+ "not close FITS file");
/* Wait until all other threads finish. */
if(cp->numthreads>1)
@@ -169,7 +169,7 @@ wcsmodecrop(void *inparam)
status=0;
if( fits_close_file(crp->infits, &status) )
gal_fitsarray_io_error(status, "imgmode.c: imgcroponthreads "
- "could not close FITS file.");
+ "could not close FITS file");
}
while ( ++(crp->imgindex) < p->numimg );
@@ -183,7 +183,7 @@ wcsmodecrop(void *inparam)
status=0;
if( fits_close_file(crp->outfits, &status) )
gal_fitsarray_io_error(status, "CFITSIO could not close the "
- "opened file.");
+ "opened file");
if(log->centerfilled==0 && p->keepblankcenter==0)
{
@@ -261,9 +261,9 @@ imgcrop(struct imgcropparams *p)
size_t nt=p->cp.numthreads, nb;
if(!p->imgmode && !p->wcsmode)
- error(EXIT_FAILURE, 0, "A bug! Somehow in imgcrop (imgcrop.c), "
+ error(EXIT_FAILURE, 0, "a bug! Somehow in imgcrop (imgcrop.c), "
"neither the imgmode is on or the wcsmode! Please contact us "
- "so we can fix it, thanks.");
+ "so we can fix it, thanks");
/* Allocate the arrays to keep the thread and parameters for each
thread. */
@@ -321,7 +321,7 @@ imgcrop(struct imgcropparams *p)
else if(p->wcsmode)
err=pthread_create(&t, &attr, wcsmodecrop, &crp[i]);
if(err)
- error(EXIT_FAILURE, 0, "Can't create thread %lu.", i);
+ error(EXIT_FAILURE, 0, "can't create thread %lu", i);
}
/* Wait for all threads to finish and free the spaces. */
diff --git a/src/imgcrop/ui.c b/src/imgcrop/ui.c
index a919e41..454d765 100644
--- a/src/imgcrop/ui.c
+++ b/src/imgcrop/ui.c
@@ -222,7 +222,7 @@ readconfig(char *filename, struct imgcropparams *p)
errno=0;
cp->output=malloc(strlen(value)+1);
if(cp->output==NULL)
- error(EXIT_FAILURE, errno, "Space for output");
+ error(EXIT_FAILURE, errno, "space for output");
strcpy(cp->output, value);
cp->outputset=1;
}
@@ -232,7 +232,7 @@ readconfig(char *filename, struct imgcropparams *p)
errno=0;
p->suffix=malloc(strlen(value)+1);
if(p->suffix==NULL)
- error(EXIT_FAILURE, errno, "Space for prefix.");
+ error(EXIT_FAILURE, errno, "space for prefix");
strcpy(p->suffix, value);
up->suffixset=1;
}
@@ -384,12 +384,12 @@ sanitycheck(struct imgcropparams *p)
/* Width and checkcenter are odd */
if(p->iwidth[0]<3)
- error(EXIT_FAILURE, 0, "--iwidth has to be >3 pixels.");
+ error(EXIT_FAILURE, 0, "--iwidth has to be >3 pixels");
else if(p->iwidth[0]%2==0)
p->iwidth[0]+=1;
p->iwidth[1]=p->iwidth[0];
if(p->checkcenter<3)
- error(EXIT_FAILURE, 0, "--checkcenter has to be >3 pixels.");
+ error(EXIT_FAILURE, 0, "--checkcenter has to be >3 pixels");
else if(p->checkcenter%2==0)
p->checkcenter+=1;
@@ -397,11 +397,11 @@ sanitycheck(struct imgcropparams *p)
/* deccol!=racol and xcol!=ycol */
if(p->racol==p->deccol)
- error(EXIT_FAILURE, 0, "The columns for RA and Dec must be "
- "different.");
+ error(EXIT_FAILURE, 0, "the columns for RA and Dec must be "
+ "different");
if(p->xcol==p->ycol)
- error(EXIT_FAILURE, 0, "The columns for x and y must be "
- "different.");
+ error(EXIT_FAILURE, 0, "the columns for x and y must be "
+ "different");
@@ -410,8 +410,8 @@ sanitycheck(struct imgcropparams *p)
checksum=up->raset+up->decset;
if(checksum==2) {p->imgmode=0; p->wcsmode=1;}
else if(checksum)/* is not zero */
- error(EXIT_FAILURE, 0, "The options `--ra` and `--dec` should be "
- "called together.");
+ error(EXIT_FAILURE, 0, "the options `--ra` and `--dec` should be "
+ "called together");
@@ -420,8 +420,8 @@ sanitycheck(struct imgcropparams *p)
checksum=up->xcset+up->ycset;
if(checksum==2) {p->imgmode=1; p->wcsmode=0;}
else if(checksum)/* is not zero */
- error(EXIT_FAILURE, 0, "The options `--xc` and `--yc` should be "
- "called together.");
+ error(EXIT_FAILURE, 0, "the options `--xc` and `--yc` should be "
+ "called together");
@@ -447,9 +447,9 @@ sanitycheck(struct imgcropparams *p)
strcat(forerr, "(`--section'), ");
if(up->polygonset)
strcat(forerr, "(`--polygon'), ");
- error(EXIT_FAILURE, 0, "There are several ways to specify a crop "
+ error(EXIT_FAILURE, 0, "there are several ways to specify a crop "
"box on the command line, see `--help`. But they should not "
- "be called together. You have asked for %s simultaneously!",
+ "be called together. You have asked for %s simultaneously",
forerr);
}
@@ -466,8 +466,8 @@ sanitycheck(struct imgcropparams *p)
if(up->polygonset) strcpy(forerr, "`--polygon'");
if(up->xcset) strcpy(forerr, "`--xc' and `--yc'");
if(up->raset) strcpy(forerr, "`--ra' and `--dec'");
- error(EXIT_FAILURE, 0, "A catalog name (%s) and command line crop "
- "parameters (%s) cannot be given together.", up->catname,
+ error(EXIT_FAILURE, 0, "a catalog name (%s) and command line crop "
+ "parameters (%s) cannot be given together", up->catname,
forerr);
}
}
@@ -477,23 +477,23 @@ sanitycheck(struct imgcropparams *p)
command line, in the steps above, we set the image mode or
wcs mode.*/
if(p->imgmode && p->wcsmode)
- error(EXIT_FAILURE, 0, "Only one of imgmode or wcsmode "
- "must be called. They cannot operate together.");
+ error(EXIT_FAILURE, 0, "only one of imgmode or wcsmode "
+ "must be called. They cannot operate together");
else if(p->imgmode==0 && p->wcsmode==0)
- error(EXIT_FAILURE, 0, "At least one of imgmode or "
- "wcsmode must be called.");
+ error(EXIT_FAILURE, 0, "at least one of imgmode or "
+ "wcsmode must be called");
/* Make sure a catalog is set. */
if(up->catset)
{
if(p->numimg>1 && p->imgmode)
- error(EXIT_FAILURE, 0, "In image mode, when a catalog is "
- "specified, only one image may be provided.");
+ error(EXIT_FAILURE, 0, "in image mode, when a catalog is "
+ "specified, only one image may be provided");
}
else
- error(EXIT_FAILURE, 0, "No catalog. When no crop coordinates "
+ error(EXIT_FAILURE, 0, "no catalog. When no crop coordinates "
"are specified on the command line, a catalog must be "
- "provided.");
+ "provided");
/* Make sure the given output is a directory. */
gal_checkset_check_dir_write_add_slash(&cp->output);
@@ -516,8 +516,8 @@ sanitycheck(struct imgcropparams *p)
/* If in image mode, there should only be one input image. */
if(p->imgmode && p->numimg>1)
- error(EXIT_FAILURE, 0, "In image mode, only one input image may be "
- "specified.");
+ error(EXIT_FAILURE, 0, "in image mode, only one input image may be "
+ "specified");
@@ -525,7 +525,7 @@ sanitycheck(struct imgcropparams *p)
/* If we are in WCS mode, noblanks must be off */
if(p->wcsmode && p->noblank)
error(EXIT_FAILURE, 0, "`--noblanks` (`-b`) is only for image mode. "
- "You have called it with WCS mode.");
+ "You have called it with WCS mode");
@@ -535,14 +535,14 @@ sanitycheck(struct imgcropparams *p)
{
polygonparser(p);
if(p->nvertices<3)
- error(EXIT_FAILURE, 0, "A polygon has to have 3 or more vertices, "
- "you have only given %lu (%s).\n", p->nvertices, p->up.polygon);
+ error(EXIT_FAILURE, 0, "a polygon has to have 3 or more vertices, "
+ "you have only given %lu (%s)", p->nvertices, p->up.polygon);
if(p->outpolygon && p->numimg>1)
- error(EXIT_FAILURE, 0, "Currently in WCS mode, outpolygon can only "
+ error(EXIT_FAILURE, 0, "currently in WCS mode, outpolygon can only "
"be set to zero when there is one image, you have given %lu "
"images. For multiple images the region will be very large. "
"It is best if you first crop out the larger region you want "
- "into one image, then mask the polygon.", p->numimg);
+ "into one image, then mask the polygon", p->numimg);
}
else
p->wpolygon=p->ipolygon=NULL;
@@ -560,7 +560,7 @@ sanitycheck(struct imgcropparams *p)
"again with this flag to use multiple threads, run `info %s "
"CFITSIO` for more information. Alternatively you can set "
"the number of threads to 1 by adding the `--numthreads=1` "
- "or `-N1` options.", cp->numthreads, PACKAGE);
+ "or `-N1` options", cp->numthreads, PACKAGE);
}
@@ -628,16 +628,16 @@ preparearrays(struct imgcropparams *p)
{
status=wcshdo(0, img->wcs, &img->nwcskeys, &img->wcstxt);
if(status)
- error(EXIT_FAILURE, 0, "wcshdo ERROR %d: %s.", status,
+ error(EXIT_FAILURE, 0, "wcshdo ERROR %d: %s", status,
wcs_errmsg[status]);
}
else
if(p->wcsmode)
- error(EXIT_FAILURE, 0, "The WCS structure of %s (hdu: %s) "
+ error(EXIT_FAILURE, 0, "the WCS structure of %s (hdu: %s) "
"image is not recognized. So RA and Dec cannot be used "
"as input. You can try with pixel coordinates in the "
"Image Mode (note that the crops will lack WCS "
- "header information).", img->name, p->cp.hdu);
+ "header information)", img->name, p->cp.hdu);
fits_close_file(tmpfits, &status);
gal_fitsarray_io_error(status, NULL);
@@ -652,7 +652,7 @@ preparearrays(struct imgcropparams *p)
else if(firstbitpix!=p->bitpix)
error(EXIT_FAILURE, 0, "%s: BITPIX=%d. Previous images had a "
"BITPIX value of %d, For "SPACK_NAME" to work, all images "
- "must have the same pixel data type.",
+ "must have the same pixel data type",
img->name, p->bitpix, firstbitpix);
/* In WCS mode, Check resolution and get the first pixel
@@ -718,7 +718,7 @@ setparams(int argc, char *argv[], struct imgcropparams *p)
/* Read the arguments. */
errno=0;
if(argp_parse(&thisargp, argc, argv, 0, 0, p))
- error(EXIT_FAILURE, errno, "Parsing arguments");
+ error(EXIT_FAILURE, errno, "parsing arguments");
/* Add the user default values and save them if asked. */
GAL_CONFIGFILES_CHECK_SET_CONFIG;
@@ -741,7 +741,7 @@ setparams(int argc, char *argv[], struct imgcropparams *p)
{
p->cp.output=malloc(2+1); /* 2 is length of "./" */
if(p->cp.output==NULL)
- error(EXIT_FAILURE, errno, "Space for output");
+ error(EXIT_FAILURE, errno, "space for output");
strcpy(p->cp.output, "./");
p->cp.outputset=1;
}
@@ -806,7 +806,7 @@ freeandreport(struct imgcropparams *p, struct timeval *t1)
free(p->imgs[i].wcstxt);
status=wcsvfree(&p->imgs[i].nwcs, &p->imgs[i].wcs);
if(status)
- error(EXIT_FAILURE, 0, "wcsvfree ERROR %d: %s.", status,
+ error(EXIT_FAILURE, 0, "wcsvfree ERROR %d: %s", status,
wcs_errmsg[status]);
}
free(p->imgs);
diff --git a/src/imgcrop/wcsmode.c b/src/imgcrop/wcsmode.c
index 3d9934f..9134e4e 100644
--- a/src/imgcrop/wcsmode.c
+++ b/src/imgcrop/wcsmode.c
@@ -62,18 +62,18 @@ wcscheckprepare(struct imgcropparams *p, struct inputimgs
*img)
"celestial coordinates. The first FITS axis should be "
"along the Right Ascension and the second FITS axis "
"should be along the declination. You should rotate "
- "(interpolate) the images with other software.",
+ "(interpolate) the images with other software",
img->name, p->cp.hdu);
if(wcs->pc[0]>0)
error(EXIT_FAILURE, 0, "%s: HDU %s: An increase in the first "
"FITS axis pixel coordinates should be a decrese in the "
"RA. You have to flip the image along the second axis "
- "before running ImageCrop.", img->name, p->cp.hdu);
+ "before running ImageCrop", img->name, p->cp.hdu);
if(wcs->pc[3]<0)
error(EXIT_FAILURE, 0, "%s: HDU %s: An increase in the second "
"FITS axis pixel coordinates should translate to an "
"increase in the declination. You have to flip the "
- "image along the first axis before running ImageCrop.",
+ "image along the first axis before running ImageCrop",
img->name, p->cp.hdu);
/* Since we are dealing with very accurate values, a multiplication
by -1 might cause a floating point error. So we have to account
@@ -81,7 +81,7 @@ wcscheckprepare(struct imgcropparams *p, struct inputimgs
*img)
if(-1.0f*wcs->pc[0]<wcs->pc[3]-1e-15 || -1.0f*wcs->pc[0]>wcs->pc[3]+1e-15)
error(EXIT_FAILURE, 0, "%s: HDU %s: The pixel scale along "
"the two image axises is not the same. The first axis "
- "is %f arcseconds/pixel, while the second is %f.",
+ "is %f arcseconds/pixel, while the second is %f",
img->name, p->cp.hdu, 3600*-1.0f*wcs->pc[0],
3600*wcs->pc[3]);
if(p->res==0.0f)
@@ -98,7 +98,7 @@ wcscheckprepare(struct imgcropparams *p, struct inputimgs
*img)
if(twidth<3)
error(EXIT_FAILURE, 0, "--wwidth = %f (arcseconds) translates "
"to %.0f pixels in scale of input image(s). This is probably "
- "not what you want!", p->wwidth*3600, twidth);
+ "not what you want", p->wwidth*3600, twidth);
p->iwidth[0] = (twidth-(long)twidth)>0.5 ? twidth+1 : twidth;
if(p->iwidth[0]%2==0)
{
@@ -112,7 +112,7 @@ wcscheckprepare(struct imgcropparams *p, struct inputimgs
*img)
error(EXIT_FAILURE, 0, "%s: HDU %s: The resolution of "
"this image is %f arcseconds/pixel while the "
"previously checked input image(s) had a resolution "
- "of %f.", img->name, p->cp.hdu, 3600*wcs->pc[3],
+ "of %f", img->name, p->cp.hdu, 3600*wcs->pc[3],
3600*p->res);
@@ -124,7 +124,7 @@ wcscheckprepare(struct imgcropparams *p, struct inputimgs
*img)
wcsp2s(wcs, ncoord, nelem, pixcrd, imgcrd, phi, theta,
img->corners, &status);
if(status)
- error(EXIT_FAILURE, 0, "wcsp2s ERROR %d: %s.", status,
+ error(EXIT_FAILURE, 0, "wcsp2s ERROR %d: %s", status,
wcs_errmsg[status]);
diff --git a/src/imgstat/args.h b/src/imgstat/args.h
index cc6cf32..3c845e2 100644
--- a/src/imgstat/args.h
+++ b/src/imgstat/args.h
@@ -396,10 +396,10 @@ parse_opt(int key, char *arg, struct argp_state *state)
check if the first character of arg is the equal sign, then the
user is warned and the program is stopped: */
if(arg && arg[0]=='=')
- argp_error(state, "Incorrect use of the equal sign (`=`). For short "
+ argp_error(state, "incorrect use of the equal sign (`=`). For short "
"options, `=` should not be used and for long options, "
"there should be no space between the option, equal sign "
- "and value.");
+ "and value");
switch(key)
{
@@ -540,12 +540,12 @@ parse_opt(int key, char *arg, struct argp_state *state)
if( gal_fitsarray_name_is_fits(arg) )
{
if(p->up.inputname)
- argp_error(state, "Only one input image should be given.");
+ argp_error(state, "only one input image should be given");
else
p->up.inputname=arg;
}
else
- argp_error(state, "%s is not a valid file type.", arg);
+ argp_error(state, "%s is not a valid file type", arg);
break;
@@ -558,9 +558,9 @@ parse_opt(int key, char *arg, struct argp_state *state)
&& p->cp.printparams==0)
{
if(state->arg_num==0)
- argp_error(state, "No argument given!");
+ argp_error(state, "no argument given");
if(p->up.inputname==NULL)
- argp_error(state, "No input FITS image(s) provided!");
+ argp_error(state, "no input FITS image(s) provided");
}
break;
diff --git a/src/imgstat/imgstat.c b/src/imgstat/imgstat.c
index c9e43c8..09099d2 100644
--- a/src/imgstat/imgstat.c
+++ b/src/imgstat/imgstat.c
@@ -145,7 +145,7 @@ printhistcfp(struct imgstatparams *p, float *bins, size_t
numbins,
errno=0;
out=fopen(filename, "w");
if(out==NULL)
- error(EXIT_FAILURE, errno, "Couldn't open file %s", filename);
+ error(EXIT_FAILURE, errno, "couldn't open file %s", filename);
/* Get the time to print on the report. */
time(&rawtime);
diff --git a/src/imgstat/ui.c b/src/imgstat/ui.c
index 44273fa..3faab03 100644
--- a/src/imgstat/ui.c
+++ b/src/imgstat/ui.c
@@ -427,23 +427,23 @@ sanitycheck(struct imgstatparams *p)
if(p->cfpname && p->histname==NULL)
{
if(p->cfpsimhist)
- error(EXIT_FAILURE, 0, "Without a histogram, `--cfpsimhist` is "
- "meaningless.");
+ error(EXIT_FAILURE, 0, "without a histogram, `--cfpsimhist` is "
+ "meaningless");
if (p->maxcfpeqmaxhist)
- error(EXIT_FAILURE, 0, "Without a histogram, `--maxcfpeqmaxhist` "
- "is meaningless.\n");
+ error(EXIT_FAILURE, 0, "without a histogram, `--maxcfpeqmaxhist` "
+ "is meaningless");
}
/* Check if `--maxcfpeqmaxhist` and `--normcfp` are not called
together: */
if(p->normcfp && p->maxcfpeqmaxhist)
error(EXIT_FAILURE, 0, "`--normcfp` and `--maxcfpeqmaxhist` "
- "cannot be called together.\n");
+ "cannot be called together\n");
/* Check if `normhist` and `maxhistone` are not called together: */
if(p->normhist && p->maxhistone)
error(EXIT_FAILURE, 0, "`--normhist` and `--histnumbins` cannot be "
- "called together.\n");
+ "called together\n");
}
@@ -500,9 +500,9 @@ preparearrays(struct imgstatparams *p)
if(up->histquantset)
{
if(p->histquant>=0.5)
- error(EXIT_FAILURE, 0, "The value to `--histquant' (-Q) must "
+ error(EXIT_FAILURE, 0, "the value to `--histquant' (-Q) must "
"Be smaller than 0.5, because it sets the lower limit of "
- "the value range. The higher limit will be 1-Q.");
+ "the value range. The higher limit will be 1-Q");
p->histmin=
p->sorted[gal_statistics_index_from_quantile(p->size,
p->histquant)];
@@ -519,29 +519,29 @@ preparearrays(struct imgstatparams *p)
p->histmax=p->sorted[p->size-1];
break;
case 1:
- error(EXIT_FAILURE, 0, "The options `--histmin' (-i) and "
+ error(EXIT_FAILURE, 0, "the options `--histmin' (-i) and "
"`--histmax' (-x) should both be specified. You have "
- "only given the %s."GAL_STRINGS_HOW_TO_CHECK_VALUES,
+ "only given the %s"GAL_STRINGS_HOW_TO_CHECK_VALUES,
up->histminset==1 ? "former" : "latter");
break;
case 2:
if(p->histmin>=p->histmax)
- error(EXIT_FAILURE, 0, "The value to `--histmin' (-i) (%f) "
- "is larger or equal to that of `--histmax' (-x) (%f)."
+ error(EXIT_FAILURE, 0, "the value to `--histmin' (-i) (%f) "
+ "is larger or equal to that of `--histmax' (-x) (%f)"
GAL_STRINGS_HOW_TO_CHECK_VALUES, p->histmin, p->histmax);
if(p->histmin>p->sorted[p->size-1] || p->histmax<p->sorted[0])
- error(EXIT_FAILURE, 0, "The range of data is %.5f to %.5f. "
+ error(EXIT_FAILURE, 0, "the range of data is %.5f to %.5f. "
"However, you have set `--histmin' (-i) and "
"`--histmax' (-x) to %.5f and %.5f respectively. "
- "They do not overlap!"GAL_STRINGS_HOW_TO_CHECK_VALUES,
+ "They do not overlap"GAL_STRINGS_HOW_TO_CHECK_VALUES,
p->sorted[0], p->sorted[p->size-1], p->histmin,
p->histmax);
break;
default:
- error(EXIT_FAILURE, 0, "A bug! Please contact us at "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at "
PACKAGE_BUGREPORT" So we can solve the problem. the "
"value of up->histminset+up->histmaxset is not 0, 1 or "
- "2.");
+ "2");
}
}
}
@@ -556,9 +556,9 @@ preparearrays(struct imgstatparams *p)
if(up->cfpquantset)
{
if(p->cfpquant>=0.5)
- error(EXIT_FAILURE, 0, "The value to `--cfpquant' (-U) must "
+ error(EXIT_FAILURE, 0, "the value to `--cfpquant' (-U) must "
"Be smaller than 0.5, because it sets the lower limit of "
- "the value range. The higher limit will be 1-U.");
+ "the value range. The higher limit will be 1-U");
p->cfpmin=p->sorted[gal_statistics_index_from_quantile(p->size,
p->cfpquant)];
p->cfpmax=
@@ -574,29 +574,29 @@ preparearrays(struct imgstatparams *p)
p->cfpmax=p->sorted[p->size-1];
break;
case 1:
- error(EXIT_FAILURE, 0, "The options `--cfpmin' (-a) and "
+ error(EXIT_FAILURE, 0, "the options `--cfpmin' (-a) and "
"`--cfpmax' (-b) should both be specified. You have "
- "only given the %s."GAL_STRINGS_HOW_TO_CHECK_VALUES,
+ "only given the %s"GAL_STRINGS_HOW_TO_CHECK_VALUES,
up->cfpminset==1 ? "former" : "latter");
break;
case 2:
if(p->cfpmin>p->cfpmax)
- error(EXIT_FAILURE, 0, "The value to `--cfpmin' (-a) (%.f) "
- "is larger than that of `--cfpmax' (-b) (%f)."
+ error(EXIT_FAILURE, 0, "the value to `--cfpmin' (-a) (%.f) "
+ "is larger than that of `--cfpmax' (-b) (%f)"
GAL_STRINGS_HOW_TO_CHECK_VALUES, p->cfpmin, p->cfpmax);
if(p->cfpmin>p->sorted[p->size-1] || p->cfpmax<p->sorted[0])
- error(EXIT_FAILURE, 0, "The range of data is %.5f to %.5f. "
+ error(EXIT_FAILURE, 0, "the range of data is %.5f to %.5f. "
"However, you have set `--cfpmin' (-a) and "
"`--cfpmax' (-b) to %.5f and %.5f respectively. "
- "They do not overlap!"GAL_STRINGS_HOW_TO_CHECK_VALUES,
+ "They do not overlap"GAL_STRINGS_HOW_TO_CHECK_VALUES,
p->sorted[0], p->sorted[p->size-1], p->cfpmin,
p->cfpmax);
break;
default:
- error(EXIT_FAILURE, 0, "A bug! Please contact us at "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at "
PACKAGE_BUGREPORT" So we can solve the problem. the "
"value of up->cfpminset+up->cfpmaxset is not 0, 1 or "
- "2.");
+ "2");
}
}
}
@@ -644,7 +644,7 @@ setparams(int argc, char *argv[], struct imgstatparams *p)
/* Read the arguments. */
errno=0;
if(argp_parse(&thisargp, argc, argv, 0, 0, p))
- error(EXIT_FAILURE, errno, "Parsing arguments");
+ error(EXIT_FAILURE, errno, "parsing arguments");
/* Add the user default values and save them if asked. */
GAL_CONFIGFILES_CHECK_SET_CONFIG;
diff --git a/src/imgwarp/args.h b/src/imgwarp/args.h
index 2e53ce8..95d31f6 100644
--- a/src/imgwarp/args.h
+++ b/src/imgwarp/args.h
@@ -187,10 +187,10 @@ parse_opt(int key, char *arg, struct argp_state *state)
check if the first character of arg is the equal sign, then the
user is warned and the program is stopped: */
if(arg && arg[0]=='=')
- argp_error(state, "Incorrect use of the equal sign (`=`). For short "
+ argp_error(state, "incorrect use of the equal sign (`=`). For short "
"options, `=` should not be used and for long options, "
"there should be no space between the option, equal sign "
- "and value.");
+ "and value");
switch(key)
{
@@ -238,15 +238,15 @@ parse_opt(int key, char *arg, struct argp_state *state)
if( gal_fitsarray_name_is_fits(arg) )
{
if(p->up.inputname)
- argp_error(state, "Only one input image should be given.");
+ argp_error(state, "only one input image should be given");
else
p->up.inputname=arg;
}
else
{
if(p->up.matrixname)
- argp_error(state, "Only one warp/transformation matrix "
- "should be given.");
+ argp_error(state, "only one warp/transformation matrix "
+ "should be given");
else
p->up.matrixname=arg;
}
@@ -262,9 +262,9 @@ parse_opt(int key, char *arg, struct argp_state *state)
&& p->cp.printparams==0)
{
if(state->arg_num==0)
- argp_error(state, "No argument given!");
+ argp_error(state, "no argument given");
if(p->up.inputname==NULL)
- argp_error(state, "No input FITS image(s) provided!");
+ argp_error(state, "no input FITS image(s) provided");
}
break;
diff --git a/src/imgwarp/imgwarp.c b/src/imgwarp/imgwarp.c
index 53cb223..a9dfdc3 100644
--- a/src/imgwarp/imgwarp.c
+++ b/src/imgwarp/imgwarp.c
@@ -561,7 +561,7 @@ imgwarp(struct imgwarpparams *p)
iwp[i].indexs=&indexs[i*thrdcols];
err=pthread_create(&t, &attr, imgwarponthread, &iwp[i]);
if(err)
- error(EXIT_FAILURE, 0, "Can't create thread %lu.", i);
+ error(EXIT_FAILURE, 0, "can't create thread %lu", i);
}
/* Wait for all threads to finish and free the spaces. */
diff --git a/src/imgwarp/ui.c b/src/imgwarp/ui.c
index 4d8cd11..145a66a 100644
--- a/src/imgwarp/ui.c
+++ b/src/imgwarp/ui.c
@@ -248,7 +248,7 @@ readmatrixoption(struct imgwarpparams *p)
p->matrix=malloc(9*sizeof *p->matrix);
if(p->matrix==NULL)
error(EXIT_FAILURE, errno, "%lu bytes for temporary array to keep "
- "the matrix option.", 9*sizeof *p->matrix);
+ "the matrix option", 9*sizeof *p->matrix);
t=p->up.matrixstring;
while(*t!='\0')
@@ -263,12 +263,12 @@ readmatrixoption(struct imgwarpparams *p)
p->matrix[counter++]=strtod(t, &tailptr);
if(errno) error(EXIT_FAILURE, errno, "In reading `%s`", t);
if(tailptr==t)
- error(EXIT_FAILURE, 0, "The provided string `%s' for matrix "
- "could not be read as a number.", t);
+ error(EXIT_FAILURE, 0, "the provided string `%s' for matrix "
+ "could not be read as a number", t);
t=tailptr;
if(counter>9) /* Note that it was ++'d! */
- error(EXIT_FAILURE, 0, "There are %lu elements in `%s', there "
- "should be 4 or 9.", counter, p->up.matrixstring);
+ error(EXIT_FAILURE, 0, "there are %lu elements in `%s', there "
+ "should be 4 or 9", counter, p->up.matrixstring);
/*printf("%f, %s\n", p->matrix[counter-1], t);*/
}
}
@@ -282,9 +282,9 @@ readmatrixoption(struct imgwarpparams *p)
p->ms1=p->ms0=3;
break;
default:
- error(EXIT_FAILURE, 0, "There are %lu numbers in the string `%s'! "
+ error(EXIT_FAILURE, 0, "there are %lu numbers in the string `%s'! "
"It should contain 4 or 9 numbers (for a 2 by 2 or 3 by 3 "
- "matrix).", counter, p->up.matrixstring);
+ "matrix)", counter, p->up.matrixstring);
}
}
@@ -331,15 +331,15 @@ sanitycheck(struct imgwarpparams *p)
the wrong numbers when it is read from a file. */
if(p->up.matrixname
&& (p->ms0!=2 || p->ms0!=3 || p->ms1!=2 || p->ms1!=3))
- error(EXIT_FAILURE, 0, "The given matrix in %s has %lu rows and %lu "
- "columns. Its size must be either 2x2 or 3x3.", p->up.matrixname,
+ error(EXIT_FAILURE, 0, "the given matrix in %s has %lu rows and %lu "
+ "columns. Its size must be either 2x2 or 3x3", p->up.matrixname,
p->ms0, p->ms1);
/* Check if there are any non-normal numbers in the matrix: */
df=(d=m)+p->ms0*p->ms1;
do
if(!isfinite(*d++))
- error(EXIT_FAILURE, 0, "%f is not a `normal' number!", *(d-1));
+ error(EXIT_FAILURE, 0, "%f is not a `normal' number", *(d-1));
while(d<df);
/* Check if the determinant is not zero: */
@@ -348,8 +348,8 @@ sanitycheck(struct imgwarpparams *p)
( p->ms0==3 &&
(m[0]*m[4]*m[8] + m[1]*m[5]*m[6] + m[2]*m[3]*m[7]
- m[2]*m[4]*m[6] - m[1]*m[3]*m[8] - m[0]*m[5]*m[7] == 0) ) )
- error(EXIT_FAILURE, 0, "The determinant of the given matrix "
- "is zero!");
+ error(EXIT_FAILURE, 0, "the determinant of the given matrix "
+ "is zero");
/* If the matrix only has two components, then convert it to
three. */
@@ -423,7 +423,7 @@ preparearrays(struct imgwarpparams *p)
errno=0;
p->inverse=inv=malloc(9*sizeof *inv);
if(inv==NULL)
- error(EXIT_FAILURE, errno, "%lu bytes for the inverse array.",
+ error(EXIT_FAILURE, errno, "%lu bytes for the inverse array",
9*sizeof *inv);
inv[0]=m[4]*m[8]-m[5]*m[7];
inv[1]=m[2]*m[7]-m[1]*m[8];
@@ -484,7 +484,7 @@ setparams(int argc, char *argv[], struct imgwarpparams *p)
/* Read the arguments. */
errno=0;
if(argp_parse(&thisargp, argc, argv, 0, 0, p))
- error(EXIT_FAILURE, errno, "Parsing arguments");
+ error(EXIT_FAILURE, errno, "parsing arguments");
/* Add the user default values and save them if asked. */
GAL_CONFIGFILES_CHECK_SET_CONFIG;
diff --git a/src/mkcatalog/args.h b/src/mkcatalog/args.h
index 89ec73d..5db091f 100644
--- a/src/mkcatalog/args.h
+++ b/src/mkcatalog/args.h
@@ -595,10 +595,10 @@ parse_opt(int key, char *arg, struct argp_state *state)
check if the first character of arg is the equal sign, then the
user is warned and the program is stopped: */
if(arg && arg[0]=='=')
- argp_error(state, "Incorrect use of the equal sign (`=`). For short "
+ argp_error(state, "incorrect use of the equal sign (`=`). For short "
"options, `=` should not be used and for long options, "
"there should be no space between the option, equal sign "
- "and value.");
+ "and value");
switch(key)
{
@@ -852,12 +852,12 @@ parse_opt(int key, char *arg, struct argp_state *state)
if( gal_fitsarray_name_is_fits(arg) )
{
if(p->up.inputname)
- argp_error(state, "Only one input image should be given.");
+ argp_error(state, "only one input image should be given");
else
p->up.inputname=arg;
}
else
- argp_error(state, "%s is not a valid file type.", arg);
+ argp_error(state, "%s is not a valid file type", arg);
break;
@@ -870,9 +870,9 @@ parse_opt(int key, char *arg, struct argp_state *state)
&& p->cp.printparams==0)
{
if(state->arg_num==0)
- argp_error(state, "No argument given!");
+ argp_error(state, "no argument given");
if(p->up.inputname==NULL)
- argp_error(state, "No input FITS image(s) provided!");
+ argp_error(state, "no input FITS image(s) provided");
}
break;
diff --git a/src/mkcatalog/columns.c b/src/mkcatalog/columns.c
index 9e7d9a9..7ca3637 100644
--- a/src/mkcatalog/columns.c
+++ b/src/mkcatalog/columns.c
@@ -187,10 +187,10 @@ geoxy(struct mkcatalogparams *p, size_t col)
if (col==OGeoX || col==OGeoY) ac=OAREA;
else if (col==OGeoCX || col==OGeoCY) ac=OAREAC;
else
- error(EXIT_FAILURE, 0, "A bug! Please contact us at %s so we "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at %s so we "
"can fix this. The given column in the --OBJECTS-- "
"information table was not recognized for calculating the "
- "geometric X and/or Y.", PACKAGE_BUGREPORT);
+ "geometric X and/or Y", PACKAGE_BUGREPORT);
}
/* Go over all the rows and correct this column. */
@@ -241,10 +241,10 @@ flxwhtimg(struct mkcatalogparams *p, size_t col)
if (col==CFlxWhtX) gc=CGeoX;
else if(col==CFlxWhtY) gc=CGeoY;
else
- error(EXIT_FAILURE, 0, "A bug! Please contact us at %s so we "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at %s so we "
"can fix this. The given column in the --CLUMPS-- "
"information table was not recognized for calculating the "
- "final flux weighted X and/or Y.", PACKAGE_BUGREPORT);
+ "final flux weighted X and/or Y", PACKAGE_BUGREPORT);
}
else
{
@@ -259,10 +259,10 @@ flxwhtimg(struct mkcatalogparams *p, size_t col)
gc = col==OFlxWhtCX ? OGeoCX : OGeoCY;
}
else
- error(EXIT_FAILURE, 0, "A bug! Please contact us at %s so we "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at %s so we "
"can fix this. The given column in the --OBJECTS-- "
"information table was not recognized for calculating the "
- "final flux weighted X and/or Y.", PACKAGE_BUGREPORT);
+ "final flux weighted X and/or Y", PACKAGE_BUGREPORT);
}
@@ -349,10 +349,10 @@ setsecondmoment(struct mkcatalogparams *p, size_t col)
sfc=CPOSSHIFTX; ssc=CPOSSHIFTY; break;
default:
- error(EXIT_FAILURE, 0, "A bug! Please contact us at %s so we "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at %s so we "
"can fix this. The given column in setsecondmoment's "
"--CLUMP-- information table (%lu) was not recognized for "
- "correcting the second moment.", PACKAGE_BUGREPORT, col);
+ "correcting the second moment", PACKAGE_BUGREPORT, col);
}
else
switch(col)
@@ -403,10 +403,10 @@ setsecondmoment(struct mkcatalogparams *p, size_t col)
wc=OAREAC; geoxy(p, fc=OGeoCX); geoxy(p, sc=OGeoCY);
sfc=OPOSSHIFTX; ssc=OPOSSHIFTY; break;
default:
- error(EXIT_FAILURE, 0, "A bug! Please contact us at %s so we "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at %s so we "
"can fix this. The given column in setsecondmoment's "
"--OBJECT-- information table (%lu) was not recognized for "
- "correcting the second moment.", PACKAGE_BUGREPORT, col);
+ "correcting the second moment", PACKAGE_BUGREPORT, col);
}
/* Go over all the rows and correct this column. */
@@ -470,10 +470,10 @@ preparewcs(struct mkcatalogparams *p, size_t col)
wht0geo1=1;
}
else
- error(EXIT_FAILURE, 0, "A bug! Please contact us at %s so we "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at %s so we "
"can fix this. The given column in the --CLUMPS-- "
"information table was not recognized for calculating the "
- "RA and Dec.", PACKAGE_BUGREPORT);
+ "RA and Dec", PACKAGE_BUGREPORT);
}
else
{
@@ -506,10 +506,10 @@ preparewcs(struct mkcatalogparams *p, size_t col)
wht0geo1=1;
}
else
- error(EXIT_FAILURE, 0, "A bug! Please contact us at %s so we "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at %s so we "
"can fix this. The given column in the --OBJECT-- "
"information table was not recognized for calculating the "
- "RA and Dec.", PACKAGE_BUGREPORT);
+ "RA and Dec", PACKAGE_BUGREPORT);
}
@@ -529,9 +529,9 @@ preparewcs(struct mkcatalogparams *p, size_t col)
geoxy(p, yc);
break;
default:
- error(EXIT_FAILURE, 0, "A bug! Please contact us at %s so we "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at %s so we "
"can fix this. The value of the wht0geo1 variable (%d) is "
- "not recognized.", PACKAGE_BUGREPORT, wht0geo1);
+ "not recognized", PACKAGE_BUGREPORT, wht0geo1);
}
@@ -725,9 +725,9 @@ position(struct mkcatalogparams *p, size_t col, char
*target,
else if(!strcmp(type, MKCATWHTC))
flxwhtimg(p, col);
else
- error(EXIT_FAILURE, 0, "A bug! Please contact us at %s so we can "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at %s so we can "
"solve this problem. The value to `type' (%s) is not "
- "recognized in position (image mode).", PACKAGE_BUGREPORT,
+ "recognized in position (image mode)", PACKAGE_BUGREPORT,
type);
/* Set the units. */
@@ -770,9 +770,9 @@ secondordermoment(struct mkcatalogparams *p, size_t ocol,
char *target)
/* Output column not recognized */
default:
- error(EXIT_FAILURE, 0, "A bug! Please contact us at %s so we can "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at %s so we can "
"solve this problem. The value to `ocol' (%lu) is not "
- "recognized in secondordermoment (first).", PACKAGE_BUGREPORT,
+ "recognized in secondordermoment (first)", PACKAGE_BUGREPORT,
ocol);
}
@@ -818,9 +818,9 @@ secondordermoment(struct mkcatalogparams *p, size_t ocol,
char *target)
}
break;
default:
- error(EXIT_FAILURE, 0, "A bug! Please contact us at %s so we can "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at %s so we can "
"solve this problem. The value to `ocol' (%lu) is not "
- "recognized in secondordermoment (second).", PACKAGE_BUGREPORT,
+ "recognized in secondordermoment (second)", PACKAGE_BUGREPORT,
ocol);
}
@@ -861,10 +861,10 @@ brightnessmag(struct mkcatalogparams *p, size_t col, char
*target,
else if(!strcmp(MKCATBRIGHT, scale))
*value = bright;
else
- error(EXIT_FAILURE, 0, "A bug! Please contact us at %s so we can "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at %s so we can "
"fix this issue. For some reason, the value to `scale' in"
"brightnessfluxmag (columns.c) is `%s', which is not "
- "recognized.", PACKAGE_BUGREPORT, scale);
+ "recognized", PACKAGE_BUGREPORT, scale);
}
/* Make final preparations for output. When dealing with the average
diff --git a/src/mkcatalog/mkcatalog.c b/src/mkcatalog/mkcatalog.c
index abf3880..178dbdf 100644
--- a/src/mkcatalog/mkcatalog.c
+++ b/src/mkcatalog/mkcatalog.c
@@ -671,9 +671,9 @@ makeoutput(struct mkcatalogparams *p)
break;
default:
- error(EXIT_FAILURE, 0, "A bug! Please contact us at %s so we "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at %s so we "
"can fix the problem. The value to cols[%lu] (%lu), is "
- "not recognized in makeoutput (mkcatalog.c).",
+ "not recognized in makeoutput (mkcatalog.c)",
PACKAGE_BUGREPORT, p->curcol, cols[p->curcol]);
}
diff --git a/src/mkcatalog/ui.c b/src/mkcatalog/ui.c
index f235bab..60e9ecd 100644
--- a/src/mkcatalog/ui.c
+++ b/src/mkcatalog/ui.c
@@ -739,10 +739,10 @@ printvalues(FILE *fp, struct mkcatalogparams *p)
fprintf(fp, CONF_SHOWFMT"%d\n", "geopositionangle", 1);
break;
default:
- error(EXIT_FAILURE, 0, "A bug! Please contact us at %s so we can "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at %s so we can "
"fix the problem. For some reason p->allcols[%d] is given "
"the value %lu which is not recognized in preparearrays "
- "(ui.c).", PACKAGE_BUGREPORT, i, p->allcols[i]);
+ "(ui.c)", PACKAGE_BUGREPORT, i, p->allcols[i]);
}
/* For the operating mode, first put the macro to print the common
@@ -881,10 +881,10 @@ sanitycheck(struct mkcatalogparams *p)
if(p->up.raset || p->up.decset)
{
if( OFlxWhtX!=OFlxWhtY-1 || OFlxWhtRA!=OFlxWhtDec-1 )
- error(EXIT_FAILURE, 0, "A bug! Please contact us at %s so we can "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at %s so we can "
"fix the problem. X(%d) and Y(%d), or Ra(%d) and Dec(%d) "
"columns in the information array are not immediately after "
- "each other.", PACKAGE_BUGREPORT, OFlxWhtX, OFlxWhtY,
+ "each other", PACKAGE_BUGREPORT, OFlxWhtX, OFlxWhtY,
OFlxWhtRA, OFlxWhtDec);
}
@@ -939,16 +939,16 @@ checksetlong(struct mkcatalogparams *p, char *filename,
char *hdu,
/* Make sure it has an integer type. */
if(bitpix==FLOAT_IMG || bitpix==DOUBLE_IMG)
- error(EXIT_FAILURE, 0, "The labels image can be any integer type "
+ error(EXIT_FAILURE, 0, "the labels image can be any integer type "
"(BITPIX). However, %s (hdu: %s) is a %s precision floating "
- "point image.", filename, hdu,
+ "point image", filename, hdu,
bitpix==FLOAT_IMG ? "single" : "double");
/* Make sure it is the same size as the input image. */
if(s0!=p->s0 || s1!=p->s1)
error(EXIT_FAILURE, 0, "%s (hdu: %s) is %lu x %lu pixels while the "
"%s (hdu: %s) is %lu x %lu. The images should have the same "
- "size.", filename, hdu, s1, s0, p->up.inputname,
+ "size", filename, hdu, s1, s0, p->up.inputname,
p->cp.hdu, p->s1, p->s0);
}
@@ -969,15 +969,15 @@ checksetfloat(struct mkcatalogparams *p, char *filename,
char *hdu,
/* Make sure it has no blank pixels. */
if(anyblank)
- error(EXIT_FAILURE, 0, "The Sky and Sky standard deviation images "
- "should not have any blank values. %s (hdu: %s) has blank pixels.",
+ error(EXIT_FAILURE, 0, "the Sky and Sky standard deviation images "
+ "should not have any blank values. %s (hdu: %s) has blank pixels",
filename, hdu);
/* Make sure it has the same size as the image. */
if(s0!=p->s0 || s1!=p->s1)
error(EXIT_FAILURE, 0, "%s (hdu: %s) is %lu x %lu pixels while the "
"%s (hdu: %s) is %lu x %lu. The images should have the same "
- "size.", filename, hdu, s1, s0, p->up.inputname,
+ "size", filename, hdu, s1, s0, p->up.inputname,
p->cp.hdu, p->s1, p->s0);
}
@@ -997,7 +997,7 @@ preparearrays(struct mkcatalogparams *p)
arrays to keep the macros of what output they should keep. */
gal_linkedlist_sll_to_array(p->allcolsll, &p->allcols, &p->allncols);
if(p->allncols==0)
- error(EXIT_FAILURE, 0, "No columns specified for output.");
+ error(EXIT_FAILURE, 0, "no columns specified for output");
errno=0; p->objcols=malloc(p->allncols*sizeof *p->objcols);
if(p->objcols==NULL)
error(EXIT_FAILURE, errno, "%lu bytes for p->objcols in "
@@ -1151,10 +1151,10 @@ preparearrays(struct mkcatalogparams *p)
p->clumpcols[p->clumpncols++] = p->allcols[i];
break;
default:
- error(EXIT_FAILURE, 0, "A bug! Please contact us at %s so we can "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at %s so we can "
"fix the problem. For some reason p->allcols[%lu] is given "
"the value %lu which is not recognized in preparearrays "
- "(ui.c).", PACKAGE_BUGREPORT, i, p->allcols[i]);
+ "(ui.c)", PACKAGE_BUGREPORT, i, p->allcols[i]);
}
}
@@ -1264,7 +1264,7 @@ setparams(int argc, char *argv[], struct mkcatalogparams
*p)
/* Read the arguments. */
errno=0;
if(argp_parse(&thisargp, argc, argv, 0, 0, p))
- error(EXIT_FAILURE, errno, "Parsing arguments");
+ error(EXIT_FAILURE, errno, "aarsing arguments");
/* Add the user default values and save them if asked. */
diff --git a/src/mknoise/args.h b/src/mknoise/args.h
index f93fbf8..041af23 100644
--- a/src/mknoise/args.h
+++ b/src/mknoise/args.h
@@ -168,10 +168,10 @@ parse_opt(int key, char *arg, struct argp_state *state)
check if the first character of arg is the equal sign, then the
user is warned and the program is stopped: */
if(arg && arg[0]=='=')
- argp_error(state, "Incorrect use of the equal sign (`=`). For short "
+ argp_error(state, "incorrect use of the equal sign (`=`). For short "
"options, `=` should not be used and for long options, "
"there should be no space between the option, equal sign "
- "and value.");
+ "and value");
switch(key)
{
@@ -211,12 +211,12 @@ parse_opt(int key, char *arg, struct argp_state *state)
if( gal_fitsarray_name_is_fits(arg) )
{
if(p->up.inputname)
- argp_error(state, "Only one input image should be given.");
+ argp_error(state, "only one input image should be given");
else
p->up.inputname=arg;
}
else
- argp_error(state, "%s is not a valid file type.", arg);
+ argp_error(state, "%s is not a valid file type", arg);
break;
@@ -229,9 +229,9 @@ parse_opt(int key, char *arg, struct argp_state *state)
&& p->cp.printparams==0)
{
if(state->arg_num==0)
- argp_error(state, "No argument given!");
+ argp_error(state, "no argument given");
if(p->up.inputname==NULL)
- argp_error(state, "No input FITS image(s) provided!");
+ argp_error(state, "no input FITS image(s) provided");
}
break;
diff --git a/src/mknoise/ui.c b/src/mknoise/ui.c
index f2a6f2a..6529dd2 100644
--- a/src/mknoise/ui.c
+++ b/src/mknoise/ui.c
@@ -347,7 +347,7 @@ setparams(int argc, char *argv[], struct mknoiseparams *p)
/* Read the arguments. */
errno=0;
if(argp_parse(&thisargp, argc, argv, 0, 0, p))
- error(EXIT_FAILURE, errno, "Parsing arguments");
+ error(EXIT_FAILURE, errno, "parsing arguments");
/* Add the user default values and save them if asked. */
GAL_CONFIGFILES_CHECK_SET_CONFIG;
diff --git a/src/mkprof/args.h b/src/mkprof/args.h
index 645af95..5ff7bb6 100644
--- a/src/mkprof/args.h
+++ b/src/mkprof/args.h
@@ -428,10 +428,10 @@ parse_opt(int key, char *arg, struct argp_state *state)
check if the first character of arg is the equal sign, then the
user is warned and the program is stopped: */
if(arg && arg[0]=='=')
- argp_error(state, "Incorrect use of the equal sign (`=`). For short "
+ argp_error(state, "incorrect use of the equal sign (`=`). For short "
"options, `=` should not be used and for long options, "
"there should be no space between the option, equal sign "
- "and value.");
+ "and value");
switch(key)
{
@@ -609,15 +609,15 @@ parse_opt(int key, char *arg, struct argp_state *state)
if( gal_fitsarray_name_is_fits(arg) )
{
if(p->up.backname)
- argp_error(state, "Only one input FITS image (the background) "
- "should be input. You have given more.");
+ argp_error(state, "only one input FITS image (the background) "
+ "should be input. You have given more");
else
p->up.backname=arg;
}
else
{
if(p->up.catname)
- argp_error(state, "Only one catalog file can be given.");
+ argp_error(state, "only one catalog file can be given");
else
p->up.catname=arg;
}
@@ -634,9 +634,9 @@ parse_opt(int key, char *arg, struct argp_state *state)
&& p->cp.printparams==0)
{
if(state->arg_num==0)
- argp_error(state, "No argument given!");
+ argp_error(state, "no argument given");
if(p->up.catname==NULL)
- argp_error(state, "No catalog provided!");
+ argp_error(state, "no catalog provided");
}
break;
diff --git a/src/mkprof/mkprof.c b/src/mkprof/mkprof.c
index e22bc72..1acb6d0 100644
--- a/src/mkprof/mkprof.c
+++ b/src/mkprof/mkprof.c
@@ -72,7 +72,7 @@ preparewcs(struct mkprofparams *p)
/* Initialize the structure (allocate all the arrays). */
wcs.flag=-1;
if( (status=wcsini(1, 2, &wcs)) )
- error(EXIT_FAILURE, 0, "wcsinit error %d: %s.",
+ error(EXIT_FAILURE, 0, "wcsinit error %d: %s",
status, wcs_errmsg[status]);
/* Correct the CRPIX values. */
@@ -96,17 +96,17 @@ preparewcs(struct mkprofparams *p)
/* Set up the wcs structure: */
if( (status=wcsset(&wcs)) )
- error(EXIT_FAILURE, 0, "wcsset error %d: %s.", status,
+ error(EXIT_FAILURE, 0, "wcsset error %d: %s", status,
wcs_errmsg[status]);
/* Write the WCS structure to a header string. */
if( (status=wcshdo(WCSHDO_safe, &wcs, &p->wcsnkeyrec, &p->wcsheader)) )
- error(EXIT_FAILURE, 0, "wcshdo error %d: %s.", status,
+ error(EXIT_FAILURE, 0, "wcshdo error %d: %s", status,
wcs_errmsg[status]);
/* Free the allocated spaces by wcsini/wcsset: */
if( (status=wcsfree(&wcs)) )
- error(EXIT_FAILURE, 0, "wcsfree error %d: %s.", status,
+ error(EXIT_FAILURE, 0, "wcsfree error %d: %s", status,
wcs_errmsg[status]);
}
@@ -142,7 +142,7 @@ builtqueue_addempty(struct builtqueue **bq)
errno=0;
tbq=malloc(sizeof *tbq);
if(tbq==NULL)
- error(EXIT_FAILURE, 0, "%lu byte element in builtqueue_addempty.",
+ error(EXIT_FAILURE, 0, "%lu byte element in builtqueue_addempty",
sizeof *tbq);
/* Initialize some of the values. */
@@ -596,7 +596,7 @@ write(struct mkprofparams *p)
jobname=malloc(100*sizeof *jobname);
if(jobname==NULL)
error(EXIT_FAILURE, errno, "jobname in mkprof.c");
- sprintf(jobname, "Row %lu complete, %lu left to go.",
+ sprintf(jobname, "row %lu complete, %lu left to go",
ibq->id, cs0-complete);
gal_timing_report(NULL, jobname, 2);
free(jobname);
@@ -725,9 +725,9 @@ mkprof(struct mkprofparams *p)
/* Initialize the condition variable and mutex. */
err=pthread_mutex_init(&p->qlock, NULL);
- if(err) error(EXIT_FAILURE, 0, "Mutex not initialized.");
+ if(err) error(EXIT_FAILURE, 0, "mutex not initialized");
err=pthread_cond_init(&p->qready, NULL);
- if(err) error(EXIT_FAILURE, 0, "Condition variable not initialized.");
+ if(err) error(EXIT_FAILURE, 0, "condition variable not initialized");
/* Spin off the threads: */
for(i=0;i<nt;++i)
@@ -741,7 +741,7 @@ mkprof(struct mkprofparams *p)
mkp[i].indexs=&indexs[i*thrdcols];
err=pthread_create(&t, &attr, build, &mkp[i]);
if(err)
- error(EXIT_FAILURE, 0, "Can't create thread %lu.", i);
+ error(EXIT_FAILURE, 0, "can't create thread %lu", i);
}
}
diff --git a/src/mkprof/oneprofile.c b/src/mkprof/oneprofile.c
index 28b825e..d621f15 100644
--- a/src/mkprof/oneprofile.c
+++ b/src/mkprof/oneprofile.c
@@ -254,7 +254,7 @@ makepixbypix(struct mkonthread *mkp)
byt=calloc(is0*is1, sizeof *byt);
if(byt==NULL)
error(EXIT_FAILURE, 0, "%lu bytes for map of object in row %lu of "
- "data in %s.", is0*is1*sizeof *byt, ibq->id,
+ "data in %s", is0*is1*sizeof *byt, ibq->id,
mkp->p->up.catname);
/* Start the queue: */
@@ -484,10 +484,10 @@ setprofparams(struct mkonthread *mkp)
break;
default:
- error(EXIT_FAILURE, 0, "A bug in setprofparams (oneprofile.c)! "
+ error(EXIT_FAILURE, 0, "a bug in setprofparams (oneprofile.c)! "
"The profile code is not recognized. This should have been "
"seen and reported prior to this step. Please contact us so "
- "we can correct this.");
+ "we can correct this");
}
}
@@ -551,7 +551,7 @@ makeoneprofile(struct mkonthread *mkp)
size=mkp->width[0]*mkp->width[1];
mkp->ibq->img=malloc(size*sizeof *mkp->ibq->img);
if(mkp->ibq->img==NULL)
- error(EXIT_FAILURE, 0, "%lu bytes for object in row %lu of data in %s.",
+ error(EXIT_FAILURE, 0, "%lu bytes for object in row %lu of data in %s",
size*sizeof *mkp->ibq->img, mkp->ibq->id, mkp->p->up.catname);
gal_arraymanip_fset_const(mkp->ibq->img, size, NAN);
diff --git a/src/mkprof/profiles.c b/src/mkprof/profiles.c
index b0ab67e..60b6eb4 100644
--- a/src/mkprof/profiles.c
+++ b/src/mkprof/profiles.c
@@ -117,8 +117,8 @@ double
sersic_b(double n)
{
if(n<=0.35f)
- error(EXIT_FAILURE, 0, "The Sersic index cannot be smaller "
- "than 0.35. It is %.3f.", n);
+ error(EXIT_FAILURE, 0, "the Sersic index cannot be smaller "
+ "than 0.35. It is %.3f", n);
return 2*n-(1/3)+(4/(405*n))+(46/(25515*n*n))+
(131/(1148175*n*n*n)-(2194697/(30690717750*n*n*n*n)));
}
diff --git a/src/mkprof/ui.c b/src/mkprof/ui.c
index 7e39541..9dec861 100644
--- a/src/mkprof/ui.c
+++ b/src/mkprof/ui.c
@@ -499,7 +499,7 @@ sanitycheck(struct mkprofparams *p)
if(p->setconsttomin && p->setconsttonan)
error(EXIT_FAILURE, 0, "`--setconsttomin' and `--setconsttonan' have "
"been called together! The constant profile values can only have "
- "one value. So these two options cannot be called together.");
+ "one value. So these two options cannot be called together");
/* If the column numbers are not equal. */
@@ -509,10 +509,10 @@ sanitycheck(struct mkprofparams *p)
for(i=0;i<9;++i)
for(j=0;j<9;++j)
if(i!=j && columns[i]==columns[j])
- error(EXIT_FAILURE, 0, "At least two of the specified columns "
+ error(EXIT_FAILURE, 0, "at least two of the specified columns "
"are set to %lu! By adding the `-P` or `--printparams` "
"option you can check the final column numbers. They "
- "all have to be different.", columns[i]);
+ "all have to be different", columns[i]);
/* If all the columns are within the catalog: */
@@ -531,7 +531,7 @@ sanitycheck(struct mkprofparams *p)
for(i=0;i<p->cs0;++i)
if(cat[i*cs1+p->fcol]<0 || cat[i*cs1+p->fcol]>MAXIMUMCODE)
error(EXIT_FAILURE, 0, "%s: In row %lu, the function code should"
- "be positive and smaller or equal to %d.",
+ "be positive and smaller or equal to %d",
p->up.catname, i+1, MAXIMUMCODE);
@@ -577,8 +577,8 @@ sanitycheck(struct mkprofparams *p)
break;
case 1:
- error(EXIT_FAILURE, 0, "At least one of `--xshift` (`-X`) or "
- "`--yshift` (`-Y`) are zero! ");
+ error(EXIT_FAILURE, 0, "at least one of `--xshift` (`-X`) or "
+ "`--yshift` (`-Y`) are zero");
break;
case 2:
@@ -587,8 +587,8 @@ sanitycheck(struct mkprofparams *p)
break;
default:
- error(EXIT_FAILURE, 0, "A bug in sanitycheck (ui.c)! In checks "
- "for shifts. Please contact us so we can fix it.");
+ error(EXIT_FAILURE, 0, "a bug in sanitycheck (ui.c)! In checks "
+ "for shifts. Please contact us so we can fix it");
}
p->naxes[0] += 2*p->shift[0];
p->naxes[1] += 2*p->shift[1];
@@ -649,7 +649,7 @@ preparearrays(struct mkprofparams *p)
/* Allocate space for the log file: */
p->log=malloc(p->cs0*LOGNUMCOLS*sizeof *p->log);
if(p->log==NULL)
- error(EXIT_FAILURE, 0, "Allocating %lu bytes for log file.",
+ error(EXIT_FAILURE, 0, "Allocating %lu bytes for log file",
p->cs0*LOGNUMCOLS*sizeof *p->log);
@@ -685,8 +685,8 @@ preparearrays(struct mkprofparams *p)
{
p->bitpix=FLOAT_IMG;
if(p->setconsttomin)
- error(EXIT_FAILURE, 0, "The `--setconsttomin' option can only be "
- "called when an input background image is also provided.");
+ error(EXIT_FAILURE, 0, "the `--setconsttomin' option can only be "
+ "called when an input background image is also provided");
}
@@ -739,7 +739,7 @@ setparams(int argc, char *argv[], struct mkprofparams *p)
/* Read the arguments. */
errno=0;
if(argp_parse(&thisargp, argc, argv, 0, 0, p))
- error(EXIT_FAILURE, errno, "Parsing arguments");
+ error(EXIT_FAILURE, errno, "parsing arguments");
/* Add the user default values and save them if asked. */
GAL_CONFIGFILES_CHECK_SET_CONFIG;
@@ -761,7 +761,7 @@ setparams(int argc, char *argv[], struct mkprofparams *p)
{
p->cp.output=malloc(2+1); /* 2 is length of "./" */
if(p->cp.output==NULL)
- error(EXIT_FAILURE, errno, "Space for output");
+ error(EXIT_FAILURE, errno, "space for output");
strcpy(p->cp.output, "./");
p->cp.outputset=1;
}
diff --git a/src/noisechisel/args.h b/src/noisechisel/args.h
index 282c9eb..ce9ff53 100644
--- a/src/noisechisel/args.h
+++ b/src/noisechisel/args.h
@@ -548,10 +548,10 @@ parse_opt(int key, char *arg, struct argp_state *state)
check if the first character of arg is the equal sign, then the
user is warned and the program is stopped: */
if(arg && arg[0]=='=')
- argp_error(state, "Incorrect use of the equal sign (`=`). For short "
+ argp_error(state, "incorrect use of the equal sign (`=`). For short "
"options, `=` should not be used and for long options, "
"there should be no space between the option, equal sign "
- "and value.");
+ "and value");
switch(key)
{
@@ -792,12 +792,12 @@ parse_opt(int key, char *arg, struct argp_state *state)
if( gal_fitsarray_name_is_fits(arg) )
{
if(p->up.inputname)
- argp_error(state, "Only one input image should be given.");
+ argp_error(state, "only one input image should be given");
else
p->up.inputname=arg;
}
else
- argp_error(state, "%s is not a valid file type.", arg);
+ argp_error(state, "%s is not a valid file type", arg);
break;
@@ -810,9 +810,9 @@ parse_opt(int key, char *arg, struct argp_state *state)
&& p->cp.printparams==0)
{
if(state->arg_num==0)
- argp_error(state, "No argument given!");
+ argp_error(state, "no argument given");
if(p->up.inputname==NULL)
- argp_error(state, "No input FITS image(s) provided!");
+ argp_error(state, "no input FITS image(s) provided");
}
break;
diff --git a/src/noisechisel/binary.c b/src/noisechisel/binary.c
index 87e4301..18693dd 100644
--- a/src/noisechisel/binary.c
+++ b/src/noisechisel/binary.c
@@ -163,9 +163,9 @@ dilate0_erode1_4con(unsigned char *byt, size_t nr, size_t
nc,
/* Do a sanity check: */
if(b0_f1!=1 && b0_f1!=0)
- error(EXIT_FAILURE, 0, "A bug! Please contact us at %s so we can fix "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at %s so we can fix "
"this problem. In dilate0_erode1_4con (binary.c), the value to "
- "b0_f1 is %u while it should be 0 or 1.", PACKAGE_BUGREPORT, b0_f1);
+ "b0_f1 is %u while it should be 0 or 1", PACKAGE_BUGREPORT, b0_f1);
/* Set the foreground and background values. */
if(b0_f1==0) {f=1; b=0;}
@@ -247,9 +247,9 @@ dilate0_erode1_8con(unsigned char *byt, size_t nr, size_t
nc,
/* Do a sanity check: */
if(b0_f1!=1 && b0_f1!=0)
- error(EXIT_FAILURE, 0, "A bug! Please contact us at %s so we can fix "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at %s so we can fix "
"this problem. In dilate0_erode1_4con (binary.c), the value to "
- "b0_f1 is %u while it should be 0 or 1.", PACKAGE_BUGREPORT, b0_f1);
+ "b0_f1 is %u while it should be 0 or 1", PACKAGE_BUGREPORT, b0_f1);
/* Set the foreground and background values: */
if(b0_f1==0) {f=1; b=0;}
@@ -342,9 +342,9 @@ opening(unsigned char *byt, size_t s0, size_t s1,
/* Sanity check: */
if(con_type!=4 && con_type!=8)
- error(EXIT_FAILURE, 0, "A bug! Please contact us at %s so we can fix "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at %s so we can fix "
"this problem. For some reason, the value to con_type in opening "
- "(binary.c) is %d while it should be 4 or 8.", PACKAGE_BUGREPORT,
+ "(binary.c) is %d while it should be 4 or 8", PACKAGE_BUGREPORT,
con_type);
/* Do the opening: */
diff --git a/src/noisechisel/clumps.c b/src/noisechisel/clumps.c
index 28210d9..7275ecc 100644
--- a/src/noisechisel/clumps.c
+++ b/src/noisechisel/clumps.c
@@ -164,10 +164,10 @@ oversegment(struct clumpsthreadparams *ctp)
{
n1=0;
if(Q!=NULL || cleanup!=NULL)
- error(EXIT_FAILURE, 0, "A bug! Please contact us at %s so we "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at %s so we "
"can fix this problem. In oversegment (clumps.c) Q and "
"cleanup should be NULL but while checking the equal "
- "flux regions they aren't.", PACKAGE_BUGREPORT);
+ "flux regions they aren't", PACKAGE_BUGREPORT);
add_to_sll(&Q, *pind);
add_to_sll(&cleanup, *pind);
clab[*pind]=SEGMENTTMPCHECK;
@@ -271,10 +271,10 @@ oversegment(struct clumpsthreadparams *ctp)
/* Set the first neighbour's label to zero. */
n1=0;
if(Q!=NULL || cleanup!=NULL)
- error(EXIT_FAILURE, 0, "A bug! Please contact us at %s "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at %s "
"so we can fix this problem. In oversegment "
"(clumps.c) Q and cleanup should be NULL but while "
- "checking the equal flux regions they aren't.",
+ "checking the equal flux regions they aren't",
PACKAGE_BUGREPORT);
/* Go over all the 8 neighbors of this pixel and see
@@ -499,9 +499,9 @@ getclumpinfo(struct clumpsthreadparams *ctp, double
**outclumpinfo)
/* Just make sure that the box size is not only around one pixel! */
if(x1-x0<=1 || y1-y0<=1)
- error(EXIT_FAILURE, 0, "A bug! Please contact us at %s so we can find "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at %s so we can find "
"and fix the problem in clumpinfo (clumps.c). For some reason, "
- "the specified input region is %lu by %lu wide.",
+ "the specified input region is %lu by %lu wide",
PACKAGE_BUGREPORT, y1-y0, x1-x0);
/* Allocate the clump information array. */
diff --git a/src/noisechisel/detection.c b/src/noisechisel/detection.c
index 341f326..d358b1e 100644
--- a/src/noisechisel/detection.c
+++ b/src/noisechisel/detection.c
@@ -214,7 +214,7 @@ detlabelsn(struct noisechiselparams *p, size_t *numlabs,
float **outsntable)
}
if(isnan(*f))
- error(EXIT_FAILURE, 0, "*f was nan!!!");
+ error(EXIT_FAILURE, 0, "*f was nan");
++areas[*lab];
brightnesses[*lab] += *f;
@@ -552,10 +552,10 @@ detsnthresh(struct noisechiselparams *p)
case 3:
extname="Opened"; break;
default:
- error(EXIT_FAILURE, 0, "A bug! Please contact us at %s so we "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at %s so we "
"can find the solution. For some reason, the value to "
"p->stepnum (%d) is not recognized in detsnthresh "
- "(detection.c).", PACKAGE_BUGREPORT, p->stepnum);
+ "(detection.c)", PACKAGE_BUGREPORT, p->stepnum);
}
gal_fitsarray_array_to_fits_img(p->detectionname, extname, BYTE_IMG,
p->dbyt, s0, s1, p->anyblank, p->wcs,
diff --git a/src/noisechisel/label.c b/src/noisechisel/label.c
index 94aab94..986768f 100644
--- a/src/noisechisel/label.c
+++ b/src/noisechisel/label.c
@@ -67,9 +67,9 @@ BF_concmp(unsigned char *byt, long *lab, size_t s0, size_t s1,
/* A simple sanity check. */
if(connectivity!=4 && connectivity!=8)
- error(EXIT_FAILURE, 0, "A bug! Please contact us at %s so we can fix "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at %s so we can fix "
"the problem. For some reason, the value to connectivity in "
- "BF_concmp (label.c) is %lu which is not recognized.",
+ "BF_concmp (label.c) is %lu which is not recognized",
PACKAGE_BUGREPORT, connectivity);
diff --git a/src/noisechisel/segmentation.c b/src/noisechisel/segmentation.c
index 63f8d56..abf31f3 100644
--- a/src/noisechisel/segmentation.c
+++ b/src/noisechisel/segmentation.c
@@ -366,12 +366,12 @@ newclumplabels(struct clumpsthreadparams *ctp)
/* A simple sanity check. */
if(ctp->numclumps<=2 || ctp->numobjects<=2)
- error(EXIT_FAILURE, 0, "A bug! Please contact us at %s so we can fix it. "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at %s so we can fix it. "
"For some reason, the newclumplabels function (in segmentation.c) "
"was called for the %lu detected region, even though this region "
"has ctp->numclumps=%lu and ctp->numobjects=%lu! This function "
"should only be used when there is more than one object and "
- "clump over a detected region.", PACKAGE_BUGREPORT,
+ "clump over a detected region", PACKAGE_BUGREPORT,
ctp->thislabel, ctp->numclumps, ctp->numobjects);
/* 'numclumpsinobj' will keep the number of clumps in each object.
@@ -685,7 +685,7 @@ segmentdetections(struct noisechiselparams *p, size_t
numobjsinit,
ctp[i].totalnummtx=&totalnummtx;
ctp[i].indexs=&indexs[i*thrdcols];
err=pthread_create(&t, &attr, segmentonthread, &ctp[i]);
- if(err) error(EXIT_FAILURE, 0, "Can't create thread %lu.", i);
+ if(err) error(EXIT_FAILURE, 0, "can't create thread %lu", i);
}
/* Wait for all threads to finish and free the spaces. */
@@ -867,10 +867,10 @@ segmentation(struct noisechiselparams *p)
case 7:
extname="Final object labels"; forfits=p->olab; break;
default:
- error(EXIT_FAILURE, 0, "A bug! Please contact us at %s to "
+ error(EXIT_FAILURE, 0, "a bug! Please contact us at %s to "
"fix the problem. For some reason, the variable "
"p->stepnum in segmenation (segmentation.c) has the "
- "unrecognized value of %d.", PACKAGE_BUGREPORT,
+ "unrecognized value of %d", PACKAGE_BUGREPORT,
p->stepnum);
}
gal_fitsarray_array_to_fits_img(p->segmentationname, extname,
diff --git a/src/noisechisel/thresh.c b/src/noisechisel/thresh.c
index 200374c..2e2b531 100644
--- a/src/noisechisel/thresh.c
+++ b/src/noisechisel/thresh.c
@@ -320,13 +320,13 @@ snthresh(struct noisechiselparams *p, float *sntable,
size_t size,
/* Check if the number is acceptable to the user. */
if(size<p->minnumfalse)
- error(EXIT_FAILURE, 0, "There are only %lu %s in the sky region of "
+ error(EXIT_FAILURE, 0, "there are only %lu %s in the sky region of "
"the image. This is smaller than the minimum number you "
"specified: %lu. You can decrease this minimum with the "
"`--minnumfalse' (`-F') option or you can decrease the other "
"parameters that determine the %s. See the GNU Astronomy "
"Utilities manual (section on NoiseChisel) or Akhlaghi and "
- "Ichikawa (2015) for more information.", size, name,
+ "Ichikawa (2015) for more information", size, name,
p->minnumfalse, name);
diff --git a/src/noisechisel/ui.c b/src/noisechisel/ui.c
index c7050b7..73a6387 100644
--- a/src/noisechisel/ui.c
+++ b/src/noisechisel/ui.c
@@ -107,7 +107,7 @@ readconfig(char *filename, struct noisechiselparams *p)
errno=0;
cp->hdu=malloc(strlen(value)+1);
if(cp->hdu==NULL)
- error(EXIT_FAILURE, errno, "Space for HDU.");
+ error(EXIT_FAILURE, errno, "space for HDU");
strcpy(cp->hdu, value);
cp->hduset=1;
}
@@ -117,7 +117,7 @@ readconfig(char *filename, struct noisechiselparams *p)
errno=0;
up->maskname=malloc(strlen(value)+1);
if(up->maskname==NULL)
- error(EXIT_FAILURE, errno, "Space for mask name.");
+ error(EXIT_FAILURE, errno, "space for mask name");
strcpy(up->maskname, value);
up->masknameset=1;
}
@@ -127,7 +127,7 @@ readconfig(char *filename, struct noisechiselparams *p)
errno=0;
up->mhdu=malloc(strlen(value)+1);
if(up->mhdu==NULL)
- error(EXIT_FAILURE, errno, "Space for mask HDU.");
+ error(EXIT_FAILURE, errno, "space for mask HDU");
strcpy(up->mhdu, value);
up->mhduset=1;
}
@@ -137,7 +137,7 @@ readconfig(char *filename, struct noisechiselparams *p)
errno=0;
up->kernelname=malloc(strlen(value)+1);
if(up->kernelname==NULL)
- error(EXIT_FAILURE, errno, "Space for kernel name.");
+ error(EXIT_FAILURE, errno, "space for kernel name");
strcpy(up->kernelname, value);
up->kernelnameset=1;
}
@@ -147,7 +147,7 @@ readconfig(char *filename, struct noisechiselparams *p)
errno=0;
up->khdu=malloc(strlen(value)+1);
if(up->khdu==NULL)
- error(EXIT_FAILURE, errno, "Space for kernel HDU.");
+ error(EXIT_FAILURE, errno, "space for kernel HDU");
strcpy(up->khdu, value);
up->khduset=1;
}
@@ -182,7 +182,7 @@ readconfig(char *filename, struct noisechiselparams *p)
errno=0;
cp->output=malloc(strlen(value)+1);
if(cp->output==NULL)
- error(EXIT_FAILURE, errno, "Space for output");
+ error(EXIT_FAILURE, errno, "space for output");
strcpy(cp->output, value);
cp->outputset=1;
}
@@ -773,8 +773,8 @@ sanitycheck(struct noisechiselparams *p)
/* Other checks: */
if(smp->numnearest<GAL_MESH_MIN_ACCEPTABLE_NEAREST)
- error(EXIT_FAILURE, 0, "The smallest possible number for `--numnearest' "
- "(`-n') is %d. You have asked for: %lu.",
+ error(EXIT_FAILURE, 0, "the smallest possible number for `--numnearest' "
+ "(`-n') is %d. You have asked for: %lu",
GAL_MESH_MIN_ACCEPTABLE_NEAREST, smp->numnearest);
}
@@ -878,9 +878,9 @@ preparearrays(struct noisechiselparams *p)
/* make sure the channel sizes fit the channel sizes. */
if( s0%smp->nch2 || s1%smp->nch1 )
- error(EXIT_FAILURE, 0, "The input image size (%lu x %lu) is not an "
+ error(EXIT_FAILURE, 0, "the input image size (%lu x %lu) is not an "
"exact multiple of the number of the given channels (%lu, %lu) "
- "in the respective axis.", s1, s0, smp->nch1, smp->nch2);
+ "in the respective axis", s1, s0, smp->nch1, smp->nch2);
/* p->imgss (image-sky-subtracted) is the sky subtracted input
image. For both the removal of false detections and also the
@@ -1032,7 +1032,7 @@ setparams(int argc, char *argv[], struct
noisechiselparams *p)
/* Read the arguments. */
errno=0;
if(argp_parse(&thisargp, argc, argv, 0, 0, p))
- error(EXIT_FAILURE, errno, "Parsing arguments");
+ error(EXIT_FAILURE, errno, "parsing arguments");
/* Add the user default values and save them if asked. */
GAL_CONFIGFILES_CHECK_SET_CONFIG;
diff --git a/src/subtractsky/args.h b/src/subtractsky/args.h
index ef87011..860f46e 100644
--- a/src/subtractsky/args.h
+++ b/src/subtractsky/args.h
@@ -329,10 +329,10 @@ parse_opt(int key, char *arg, struct argp_state *state)
check if the first character of arg is the equal sign, then the
user is warned and the program is stopped: */
if(arg && arg[0]=='=')
- argp_error(state, "Incorrect use of the equal sign (`=`). For short "
+ argp_error(state, "incorrect use of the equal sign (`=`). For short "
"options, `=` should not be used and for long options, "
"there should be no space between the option, equal sign "
- "and value.");
+ "and value");
switch(key)
{
@@ -449,12 +449,12 @@ parse_opt(int key, char *arg, struct argp_state *state)
if( gal_fitsarray_name_is_fits(arg) )
{
if(p->up.inputname)
- argp_error(state, "Only one input image should be given.");
+ argp_error(state, "only one input image should be given");
else
p->up.inputname=arg;
}
else
- argp_error(state, "%s is not a valid file type.", arg);
+ argp_error(state, "%s is not a valid file type", arg);
break;
@@ -467,9 +467,9 @@ parse_opt(int key, char *arg, struct argp_state *state)
&& p->cp.printparams==0)
{
if(state->arg_num==0)
- argp_error(state, "No argument given!");
+ argp_error(state, "no argument given");
if(p->up.inputname==NULL)
- argp_error(state, "No input FITS image(s) provided!");
+ argp_error(state, "no input FITS image(s) provided");
}
break;
diff --git a/src/subtractsky/subtractsky.c b/src/subtractsky/subtractsky.c
index a104852..040dca5 100644
--- a/src/subtractsky/subtractsky.c
+++ b/src/subtractsky/subtractsky.c
@@ -64,8 +64,8 @@ avestdonthread(void *inparam)
{
errno=0; cofa=malloc(mp->maxs0*mp->maxs1*sizeof *oneforall);
if(cofa==NULL)
- error(EXIT_FAILURE, errno, "Unable to allocate %lu bytes for"
- "cofa in avestdonthread of subtractsky.c.",
+ error(EXIT_FAILURE, errno, "unable to allocate %lu bytes for"
+ "cofa in avestdonthread of subtractsky.c",
mp->maxs0*mp->maxs1*sizeof *mp->img);
}
else cofa=NULL;
diff --git a/src/subtractsky/ui.c b/src/subtractsky/ui.c
index cf63e40..72c5943 100644
--- a/src/subtractsky/ui.c
+++ b/src/subtractsky/ui.c
@@ -107,7 +107,7 @@ readconfig(char *filename, struct subtractskyparams *p)
errno=0;
cp->hdu=malloc(strlen(value)+1);
if(cp->hdu==NULL)
- error(EXIT_FAILURE, errno, "Space for HDU.");
+ error(EXIT_FAILURE, errno, "space for HDU");
strcpy(cp->hdu, value);
cp->hduset=1;
}
@@ -117,7 +117,7 @@ readconfig(char *filename, struct subtractskyparams *p)
errno=0;
up->maskname=malloc(strlen(value)+1);
if(up->maskname==NULL)
- error(EXIT_FAILURE, errno, "Space for mask name.");
+ error(EXIT_FAILURE, errno, "space for mask name");
strcpy(up->maskname, value);
up->masknameset=1;
}
@@ -127,7 +127,7 @@ readconfig(char *filename, struct subtractskyparams *p)
errno=0;
up->mhdu=malloc(strlen(value)+1);
if(up->mhdu==NULL)
- error(EXIT_FAILURE, errno, "Space for mask HDU.");
+ error(EXIT_FAILURE, errno, "space for mask HDU");
strcpy(up->mhdu, value);
up->mhduset=1;
}
@@ -137,7 +137,7 @@ readconfig(char *filename, struct subtractskyparams *p)
errno=0;
up->kernelname=malloc(strlen(value)+1);
if(up->kernelname==NULL)
- error(EXIT_FAILURE, errno, "Space for kernel name.");
+ error(EXIT_FAILURE, errno, "space for kernel name");
strcpy(up->kernelname, value);
up->kernelnameset=1;
}
@@ -147,7 +147,7 @@ readconfig(char *filename, struct subtractskyparams *p)
errno=0;
up->khdu=malloc(strlen(value)+1);
if(up->khdu==NULL)
- error(EXIT_FAILURE, errno, "Space for kernel HDU.");
+ error(EXIT_FAILURE, errno, "mpace for kernel HDU");
strcpy(up->khdu, value);
up->khduset=1;
}
@@ -161,7 +161,7 @@ readconfig(char *filename, struct subtractskyparams *p)
errno=0;
cp->output=malloc(strlen(value)+1);
if(cp->output==NULL)
- error(EXIT_FAILURE, errno, "Space for output");
+ error(EXIT_FAILURE, errno, "space for output");
strcpy(cp->output, value);
cp->outputset=1;
}
@@ -497,8 +497,8 @@ sanitycheck(struct subtractskyparams *p)
/* Other checks: */
if(p->mp.numnearest<GAL_MESH_MIN_ACCEPTABLE_NEAREST)
- error(EXIT_FAILURE, 0, "The smallest possible number for `--numnearest' "
- "(`-n') is %d. You have asked for: %lu.",
+ error(EXIT_FAILURE, 0, "the smallest possible number for `--numnearest' "
+ "(`-n') is %d. You have asked for: %lu",
GAL_MESH_MIN_ACCEPTABLE_NEAREST, p->mp.numnearest);
/* Set the constants in the gal_mesh_params structure. */
@@ -547,9 +547,9 @@ preparearrays(struct subtractskyparams *p)
/* Check if the input sizes and channel sizes are exact
multiples. */
if( mp->s0%mp->nch2 || mp->s1%mp->nch1 )
- error(EXIT_FAILURE, 0, "The input image size (%lu x %lu) is not an "
+ error(EXIT_FAILURE, 0, "the input image size (%lu x %lu) is not an "
"exact multiple of the number of the given channels (%lu, %lu) "
- "in the respective axis.", mp->s1, mp->s0, mp->nch1, mp->nch2);
+ "in the respective axis", mp->s1, mp->s0, mp->nch1, mp->nch2);
}
@@ -588,7 +588,7 @@ setparams(int argc, char *argv[], struct subtractskyparams
*p)
/* Read the arguments. */
errno=0;
if(argp_parse(&thisargp, argc, argv, 0, 0, p))
- error(EXIT_FAILURE, errno, "Parsing arguments");
+ error(EXIT_FAILURE, errno, "parsing arguments");
/* Add the user default values and save them if asked. */
GAL_CONFIGFILES_CHECK_SET_CONFIG;