gnuastro-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnuastro-commits] master 36bcedd 066/125: Fixed automatic output checki


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 36bcedd 066/125: Fixed automatic output checking in Arithmetic
Date: Sun, 23 Apr 2017 22:36:39 -0400 (EDT)

branch: master
commit 36bceddf7427c2226edac5367308578de46cc6a7
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>

    Fixed automatic output checking in Arithmetic
    
    When checking if the output name is set, a `==0' was missed! This has been
    corrected with this commit. Also, the non-quiet outputs of Arithmetic have
    been made more clear and the output filename is also now reported.
    
    Finally in `tests/during-dev.sh' the old `onlydirconf' option name was
    changed to the new `lastconfig' option.
---
 bin/arithmetic/arithmetic.c | 2 ++
 bin/arithmetic/operands.c   | 2 +-
 bin/arithmetic/ui.c         | 2 +-
 tests/during-dev.sh         | 2 +-
 4 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/bin/arithmetic/arithmetic.c b/bin/arithmetic/arithmetic.c
index d5cbd08..e5d8987 100644
--- a/bin/arithmetic/arithmetic.c
+++ b/bin/arithmetic/arithmetic.c
@@ -366,6 +366,8 @@ reversepolish(struct imgarithparams *p)
       d1->wcs=p->refdata.wcs;
       gal_fits_write_img(d1, p->cp.output, "Arithmetic", NULL,
                          PROGRAM_STRING);
+      if(!p->cp.quiet)
+        printf(" - Output written to %s\n", p->cp.output);
     }
 
 
diff --git a/bin/arithmetic/operands.c b/bin/arithmetic/operands.c
index 1ad1190..7690e54 100644
--- a/bin/arithmetic/operands.c
+++ b/bin/arithmetic/operands.c
@@ -162,7 +162,7 @@ pop_operand(struct imgarithparams *p, char *operator)
       ++p->popcounter;
 
       /* Report the read image if desired: */
-      if(!p->cp.quiet) printf("%s is read.\n", filename);
+      if(!p->cp.quiet) printf(" - %s is read.\n", filename);
     }
   else
     data=operands->data;
diff --git a/bin/arithmetic/ui.c b/bin/arithmetic/ui.c
index 5b7cdfa..c2ccd96 100644
--- a/bin/arithmetic/ui.c
+++ b/bin/arithmetic/ui.c
@@ -125,7 +125,7 @@ ui_check_options_and_arguments(struct imgarithparams *p)
           ++numfits;
 
           /* If the output filename isn't set yet, then set it. */
-          if(output_checked)
+          if(output_checked==0)
             {
               if(p->cp.output)
                 gal_checkset_check_remove_file(p->cp.output,
diff --git a/tests/during-dev.sh b/tests/during-dev.sh
index bd8eea6..012caa1 100755
--- a/tests/during-dev.sh
+++ b/tests/during-dev.sh
@@ -142,7 +142,7 @@ if make -C "$builddir"; then
     # of the last line).
     cp "$srcdir/bin/$utilname/ast$utilname.conf" .gnuastro/
     echo ""               >> .gnuastro/ast$utilname.conf
-    echo " onlydirconf 1" >> .gnuastro/ast$utilname.conf
+    echo " lastconfig 1"  >> .gnuastro/ast$utilname.conf
 
     # Run the built utility with the given arguments and options.
     "$utility" $arguments $options



reply via email to

[Prev in Thread] Current Thread [Next in Thread]