[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master 1775c254: Fits: renamed the newly added option
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master 1775c254: Fits: renamed the newly added option to --arguments |
Date: |
Fri, 12 Jan 2024 15:07:23 -0500 (EST) |
branch: master
commit 1775c254ec75a664f72b22282da40b60d69645bc
Author: Mohammad Akhlaghi <mohammad@akhlaghi.org>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>
Fits: renamed the newly added option to --arguments
Until now, the newly added option to specify the list of input files was
called '--infilelist'. But this option is going to be necessary later in
other programs too: Arithmetic in particular. And in that case, the
arguments are not necessarily file names, but can also contain operators.
With this commit, the option name has been renamed to '--arguments' to be
usable in Arithmetic also later.
---
NEWS | 10 +++++-----
bin/fits/args.h | 6 +++---
bin/fits/main.h | 2 +-
bin/fits/ui.c | 6 +++---
bin/fits/ui.h | 2 +-
5 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/NEWS b/NEWS
index b87a1dbc..82a5bf48 100644
--- a/NEWS
+++ b/NEWS
@@ -74,11 +74,11 @@ See the end of the file for license conditions.
- collapse-sigclip-fill-number: Collapse dim. by filled sigma-clipped num.
*** Fits
- --infilelist: plain-text file name that contains the list of input
- files. Currently this only works with '--keyvalue' and is necessary
- when you want to get the keywords of a very long list of files (for
- example thousands!). Without this option, the shell is going to abort
- with an "Argument list too long" error message.
+ --arguments: takes the name of plain-text file that contains the list of
+ arguments to the program. Currently this only works with '--keyvalue'
+ and is necessary when you want to get the keywords of a very long list
+ of files (~thousands!). Without this option, the shell is going to
+ abort with an "Argument list too long" error message.
--datasum-encoded: new option that will return an ASCII encoded
16-character string for the value of the 'DATASUM' concept in FITS data
verification.
diff --git a/bin/fits/args.h b/bin/fits/args.h
index ee8fb5c1..ffefc9eb 100644
--- a/bin/fits/args.h
+++ b/bin/fits/args.h
@@ -33,13 +33,13 @@ along with Gnuastro. If not, see
<http://www.gnu.org/licenses/>.
struct argp_option program_options[] =
{
{
- "infilelist",
- UI_KEY_INFILELIST,
+ "arguments",
+ UI_KEY_ARGUMENTS,
"STR",
0,
"plain-text file with list of input files.",
GAL_OPTIONS_GROUP_INPUT,
- &p->infilelist,
+ &p->arguments,
GAL_TYPE_STRING,
GAL_OPTIONS_RANGE_ANY,
GAL_OPTIONS_NOT_MANDATORY,
diff --git a/bin/fits/main.h b/bin/fits/main.h
index d28b4a22..33af6bab 100644
--- a/bin/fits/main.h
+++ b/bin/fits/main.h
@@ -59,7 +59,7 @@ struct fitsparams
int hdu_in_commandline; /* HDU wasn't given in config. file. */
gal_list_str_t *input; /* Name of input file. */
char *outhdu; /* HDU of output (only when necessary). */
- char *infilelist; /* List of input files. */
+ char *arguments; /* List of input files. */
gal_list_str_t *remove; /* Remove extensions from a file. */
gal_list_str_t *copy; /* Copy extensions to output. */
gal_list_str_t *cut; /* Copy ext. to output and remove. */
diff --git a/bin/fits/ui.c b/bin/fits/ui.c
index c0f408c5..1d363364 100644
--- a/bin/fits/ui.c
+++ b/bin/fits/ui.c
@@ -569,13 +569,13 @@ ui_check_options_and_arguments(struct fitsparams *p)
require a single file. */
if(p->keyvalue)
{
- /* If '--infilelist' is given and there is no input files, read the
+ /* If '--arguments' is given and there is no input files, read the
names of the inputs from that. Otherwose, complain about not
having any input.*/
if(p->input==NULL)
{
- if(p->infilelist)
- p->input=gal_txt_read_to_list(p->infilelist);
+ if(p->arguments)
+ p->input=gal_txt_read_to_list(p->arguments);
else
error(EXIT_FAILURE, 0, "no input file(s) specified");
}
diff --git a/bin/fits/ui.h b/bin/fits/ui.h
index 1ad3b9ee..3952cdf9 100644
--- a/bin/fits/ui.h
+++ b/bin/fits/ui.h
@@ -75,7 +75,7 @@ enum option_keys_enum
automatically). */
UI_KEY_TITLE = 1000,
UI_KEY_DATASUM,
- UI_KEY_INFILELIST,
+ UI_KEY_ARGUMENTS,
UI_KEY_DATASUMENCODED,
UI_KEY_PIXELSCALE,
UI_KEY_PIXELAREAONWCS,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnuastro-commits] master 1775c254: Fits: renamed the newly added option to --arguments,
Mohammad Akhlaghi <=