gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master b186ca8: getprogname used in TEMPLATE utility


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master b186ca8: getprogname used in TEMPLATE utility
Date: Sun, 11 Sep 2016 14:29:10 +0000 (UTC)

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

    getprogname used in TEMPLATE utility
    
    In commit 118de44 (Gnulib's new getprogname module adopted), the old Gnulib
    module `progname' was removed. However, the TEMPLATE utility was
    missed. The reason was that I just relied on the compilation errors to tell
    me which file to fix. To make general changes like this to all utilities,
    this is thus not a good way.
    
    For commit 25d2ec5 (bootstrapped/lib only included in libraries and
    utilities) I used this way: I just opened all the utility `Makefile.am's in
    Emacs with one command: first CTRL-F (to prompt for file names), then
    `./src/*/Makefile.am'. This opened all the files and I could switch between
    them with CTRL-x (forward-arrow) and CTRL-x (back-arrow).
---
 src/TEMPLATE/main.c |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/TEMPLATE/main.c b/src/TEMPLATE/main.c
index 7492955..3561a65 100644
--- a/src/TEMPLATE/main.c
+++ b/src/TEMPLATE/main.c
@@ -8,7 +8,7 @@ TEMPLATE - Source code for a blank utility for easy creation of 
new
            top Gnuastro source directory.
 
          - Correct these top comments in all the files, don't forget the
-           `astTEMPLATE.conf' and `Makefile.am' files.
+           `astTEMPLATE.conf' and `Makefile.am' files in this directory.
 
 TEMPLATE is part of GNU Astronomy Utilities (Gnuastro) package.
 
@@ -34,7 +34,6 @@ along with Gnuastro. If not, see 
<http://www.gnu.org/licenses/>.
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <progname.h>
 
 #include <gnuastro/timing.h>    /* Includes time.h and sys/time.h */
 
@@ -48,14 +47,13 @@ main (int argc, char *argv[])
 {
   struct TEMPLATEparams p={{0}, {0}, 0};
 
-  /* Set the program name (needed by non-gnu operating systems): */
+  /* Set the starting time. */
   time(&p.rawtime);
-  set_program_name(argv[0]);
 
   /* Read the input parameters. */
   setparams(argc, argv, &p);
 
-  /* Run MakeProfiles */
+  /* Run the program */
   TEMPLATE(&p);
 
   /* Free all non-freed allocations. */



reply via email to

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