gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master a629a33: Corrections for 32-bit systems and in


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master a629a33: Corrections for 32-bit systems and in manual
Date: Sun, 11 Jun 2017 12:13:53 -0400 (EDT)

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

    Corrections for 32-bit systems and in manual
    
    Fortunately GNU Guix was quick to update its Gnuastro image. There were a
    few compiler warnings in its log file that are corrected with this
    commit. Unfortunately, it still fails on two tests:
    `cosmiccal/simpletest.sh' and `mkcatalog/simple.sh'! I have sent a mail to
    the Guix developers to see how we can access the `tests/test-suite.log'
    file and find the cause of the problem.
    
    In the process, some parts of the manual were also edited to correct for
    typos and hard to read parts.
---
 bin/mkprof/ui.c   |  2 +-
 doc/gnuastro.texi | 51 ++++++++++++++++++++++++++++-----------------------
 lib/data.c        |  2 +-
 lib/table.c       |  2 +-
 4 files changed, 31 insertions(+), 26 deletions(-)

diff --git a/bin/mkprof/ui.c b/bin/mkprof/ui.c
index 52f2c6e..98d8e03 100644
--- a/bin/mkprof/ui.c
+++ b/bin/mkprof/ui.c
@@ -920,7 +920,7 @@ ui_print_intro(struct mkprofparams *p)
   free(jobname);
   if(p->envseed)
     {
-      asprintf(&jobname, "RNG seed for all profiles: %zu",
+      asprintf(&jobname, "RNG seed for all profiles: %lu",
                gsl_rng_default_seed);
       gal_timing_report(NULL, jobname, 1);
       free(jobname);
diff --git a/doc/gnuastro.texi b/doc/gnuastro.texi
index 51f0506..918a1a3 100644
--- a/doc/gnuastro.texi
+++ b/doc/gnuastro.texi
@@ -6703,7 +6703,7 @@ and then @option{--remove} (on all specified HDUs).
 The @option{--copy} and @option{--cut} options need an output FITS file
 (specified with the @option{--output} option). If the output file exists,
 then the specified HDU will be copied following the last extension of the
-output file (its existing in it HDUs will be untouched). Thus after Fits
+output file (the existing HDUs in it will be untouched). Thus, after Fits
 finishes, the copied HDU will be the last HDU of the output file. If no
 output file name is given, then automatic output will be used to store the
 HDUs given to this option (see @ref{Automatic output}).
@@ -6721,7 +6721,14 @@ output file, see explanations above.
 
 @item -R STR
 @itemx --remove=STR
-Remove the specified HDU from the input file.
+Remove the specified HDU from the input file. From CFITSIO: ``In the case
+of deleting the primary array (the first HDU in the file) then [it] will be
+replaced by a null primary array containing the minimum set of required
+keywords and no data.''. So in practice, any existing data (array) and
+meta-data in the first extension will be removed, but the number of
+extensions in the file won't change. This is because of the unique position
+the first FITS extension has in the FITS standard (for example it cannot be
+used to store tables).
 
 @end table
 
@@ -22410,13 +22417,13 @@ As much as order does not matter when you include the 
header of each group,
 sort them by length, as described above.
 
 @item
-All function names, variables, etc should be in lower case.  Macros,
+All function names, variables, etc should be in lower case.  Macros and
 constant global @code{enum}s should be in upper case.
 
 @item
-Naming of exported header files, functions, variables, macros, and library
-functions, we adopt similar conventions to those used by the GNU Scientific
-Library
+For the naming of exported header files, functions, variables, macros, and
+library functions, we adopt similar conventions to those used by the GNU
+Scientific Library
 (GSL)@address@hidden://www.gnu.org/software/gsl/design/gsl-design.html#SEC15}}.
 In particular, in order to avoid clashes with the names of functions and
 variables coming from other libraries the name-space address@hidden' is
@@ -22434,18 +22441,17 @@ user) source files with the same line
 # include <gnuastro/headername.h>
 @end example
 Note that the GSL convention for header file names is
address@hidden, so your include directive must be something like
address@hidden <gsl/gsl_specialname.h>}, the header file names are not
-prefixed with a address@hidden'. However, Gnuastro doesn't follow this
-guideline because of the repeated @code{gsl} in the include directive
-(which can be confusing and cause bugs). All Gnuastro (and GSL) headers must
-be located within a unique directory and will not be mixed with other
-headers. Therefore the address@hidden' prefix to the header file names is
address@hidden GSL, this prefix has an internal technical
-application: GSL's architecture mixes installed and not-installed headers
-in the same directory. This prefix is used to identify their installation
-status. Therefore this filename prefix in GSL a technical internal issue
-(for developers, not users).}.
address@hidden, so your include directive for a GSL header must
+be something like @code{#include <gsl/gsl_specialname.h>}. Gnuastro doesn't
+follow this GSL guideline because of the repeated @code{gsl} in the include
+directive. It can be confusing and cause bugs for beginners. All Gnuastro
+(and GSL) headers must be located within a unique directory and will not be
+mixed with other headers. Therefore the address@hidden' prefix to the header
+file names is address@hidden GSL, this prefix has an internal
+technical application: GSL's architecture mixes installed and not-installed
+headers in the same directory. This prefix is used to identify their
+installation status. Therefore this filename prefix in GSL a technical
+internal issue (for developers, not users).}.
 
 @item
 @cindex GNU coding standards
@@ -22460,11 +22466,10 @@ macro @code{GAL_POLYGON_MAX_CORNERS} is defined in
 @code{lib/gnuastro/polygon.h}.
 
 This is necessary to give any user (who is not familiar with the library
-structure) the ability to follow the code of a function that is not in the
-program or library they are reading. This convention does make the function
-names longer (a little harder to write), but the extra documentation it
-provides convention plays an important role in Gnuastro and is worth the
-cost.
+structure) the ability to follow the code. This convention does make the
+function names longer (a little harder to write), but the extra
+documentation it provides plays an important role in Gnuastro and is worth
+the cost.
 
 @item
 @cindex GNU Emacs
diff --git a/lib/data.c b/lib/data.c
index 97ee961..0b1589d 100644
--- a/lib/data.c
+++ b/lib/data.c
@@ -739,7 +739,7 @@ data_copy_to_string(gal_data_t *from, gal_data_t *to)
     OT ob, *restrict o=out->array;                                      \
     size_t increment=0, num_increment=1;                                \
     size_t mclen=0, contig_len=in->dsize[in->ndim-1];                   \
-    IT ib, *ist, *restrict i=in->array, *f=i+in->size;                  \
+    IT ib, *ist=NULL, *restrict i=in->array, *f=i+in->size;             \
     size_t s_e_ind[2]={0,iblock->size-1}; /* -1: this is INCLUSIVE */   \
                                                                         \
     /* If we are on a tile, the default values need to change. */       \
diff --git a/lib/table.c b/lib/table.c
index 5191722..61ace3d 100644
--- a/lib/table.c
+++ b/lib/table.c
@@ -315,7 +315,7 @@ make_list_of_indexs(gal_list_str_t *cols, gal_data_t 
*allcols,
                  counting from 1, not 0!) */
               if(tlong>numcols)
                 error(EXIT_FAILURE, 0, "%s: has %zu columns, but you "
-                      "have asked for column number %zu",
+                      "have asked for column number %ld",
                       gal_fits_name_save_as_string(filename, hdu),
                       numcols, tlong);
 



reply via email to

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