[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master 118de44 4/6: Gnulib's new getprogname module a
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master 118de44 4/6: Gnulib's new getprogname module adopted |
Date: |
Sun, 11 Sep 2016 13:46:57 +0000 (UTC) |
branch: master
commit 118de44fde04c8dd1d97d6918c8451840dc4b4c0
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>
Gnulib's new getprogname module adopted
Gnulib has recently (dated 2016-09-05 on its `NEWS' file) depreciated the
`progname' module, with a new `getprogname' module. This change has now
been implemented in Gnuastro: there is no more need to include `progname.h'
in a program's `main.c' and call the `set_program_name' function within the
`main' function. The program name is now found automatically by Gnulib's
'error' module.
Since Gnulib's `getprogname' module is a dependency of other Gnulib modules
that we include (`error' and `gendocs'), we don't need to explicity ask for
it in `bootstrap.conf' any more. So in general this Gnulib update has
helped in simplifying Gnuastro and is very welcome.
---
bootstrap.conf | 1 -
src/arithmetic/main.c | 6 +-----
src/convertt/main.c | 4 ----
src/convolve/main.c | 5 -----
src/cosmiccal/main.c | 4 +---
src/header/main.c | 4 +---
src/imgcrop/main.c | 4 ----
src/imgstat/main.c | 6 +-----
src/imgwarp/main.c | 4 ----
src/mkcatalog/main.c | 4 ----
src/mknoise/main.c | 4 ----
src/mkprof/main.c | 4 ----
src/noisechisel/main.c | 4 ----
src/subtractsky/main.c | 4 ----
src/table/main.c | 4 +---
15 files changed, 5 insertions(+), 57 deletions(-)
diff --git a/bootstrap.conf b/bootstrap.conf
index 1783522..0409677 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -166,7 +166,6 @@ gnulib_modules="
nproc
strcase
gendocs
- progname
git-version-gen
"
diff --git a/src/arithmetic/main.c b/src/arithmetic/main.c
index d82ae02..b7b86b1 100644
--- a/src/arithmetic/main.c
+++ b/src/arithmetic/main.c
@@ -24,7 +24,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 */
@@ -39,13 +38,10 @@ main (int argc, char *argv[])
struct timeval t1;
struct imgarithparams p={{0}, {0}, 0};
- /* Set the program name (needed by non-gnu operating systems): */
+ /* Set the starting time. */
time(&p.rawtime);
gettimeofday(&t1, NULL);
- /* Set the program name (needed by non-gnu operating systems): */
- set_program_name(argv[0]);
-
/* Read the input parameters. */
setparams(argc, argv, &p);
diff --git a/src/convertt/main.c b/src/convertt/main.c
index 270e112..e6b25f8 100644
--- a/src/convertt/main.c
+++ b/src/convertt/main.c
@@ -24,7 +24,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 */
@@ -41,9 +40,6 @@ main(int argc, char *argv[])
/* Set the starting time.*/
time(&p.rawtime);
- /* Set the program name (needed by non-gnu operating systems): */
- set_program_name (argv[0]);
-
/* Read the input parameters.*/
setparams(argc, argv, &p);
diff --git a/src/convolve/main.c b/src/convolve/main.c
index 56559a1..a47a177 100644
--- a/src/convolve/main.c
+++ b/src/convolve/main.c
@@ -24,8 +24,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 */
@@ -44,9 +42,6 @@ main(int argc, char *argv[])
time(&p.rawtime);
gettimeofday(&t1, NULL);
- /* Set the program name (needed by non-gnu operating systems): */
- set_program_name (argv[0]);
-
/* Read the input parameters. */
setparams(argc, argv, &p);
diff --git a/src/cosmiccal/main.c b/src/cosmiccal/main.c
index 00b9770..974cc97 100644
--- a/src/cosmiccal/main.c
+++ b/src/cosmiccal/main.c
@@ -24,7 +24,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 */
@@ -38,9 +37,8 @@ main (int argc, char *argv[])
{
struct cosmiccalparams p={{0}, {0}, 0};
- /* Set the program name (needed by non-gnu operating systems): */
+ /* Get the starting time. */
time(&p.rawtime);
- set_program_name(argv[0]);
/* Read the input parameters. */
setparams(argc, argv, &p);
diff --git a/src/header/main.c b/src/header/main.c
index 87984cf..5b084c0 100644
--- a/src/header/main.c
+++ b/src/header/main.c
@@ -24,7 +24,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 */
@@ -39,9 +38,8 @@ main (int argc, char *argv[])
int r;
struct headerparams p={{0}, {0}, 0};
- /* Set the program name (needed by non-gnu operating systems): */
+ /* Get the starting time. */
time(&p.rawtime);
- set_program_name(argv[0]);
/* Read the input parameters. */
setparams(argc, argv, &p);
diff --git a/src/imgcrop/main.c b/src/imgcrop/main.c
index c0c40fa..2a45bf6 100644
--- a/src/imgcrop/main.c
+++ b/src/imgcrop/main.c
@@ -24,7 +24,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 */
@@ -43,9 +42,6 @@ main (int argc, char *argv[])
time(&p.rawtime);
gettimeofday(&t1, NULL);
- /* Set the program name (needed by non-gnu operating systems): */
- set_program_name (argv[0]);
-
/* Read the input parameters. */
setparams(argc, argv, &p);
diff --git a/src/imgstat/main.c b/src/imgstat/main.c
index 7419fd5..ee5def2 100644
--- a/src/imgstat/main.c
+++ b/src/imgstat/main.c
@@ -24,7 +24,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 */
@@ -39,13 +38,10 @@ main (int argc, char *argv[])
struct timeval t1;
struct imgstatparams p={{0}, {0}, 0};
- /* Set the program name (needed by non-gnu operating systems): */
+ /* Set the starting time. */
time(&p.rawtime);
gettimeofday(&t1, NULL);
- /* Set the program name (needed by non-gnu operating systems): */
- set_program_name(argv[0]);
-
/* Read the input parameters. */
setparams(argc, argv, &p);
diff --git a/src/imgwarp/main.c b/src/imgwarp/main.c
index 4f15dae..8c4b918 100644
--- a/src/imgwarp/main.c
+++ b/src/imgwarp/main.c
@@ -24,7 +24,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 */
@@ -42,9 +41,6 @@ main (int argc, char *argv[])
time(&p.rawtime);
gettimeofday(&t1, NULL);
- /* Set the program name (needed by non-gnu operating systems): */
- set_program_name(argv[0]);
-
/* Read the input parameters. */
setparams(argc, argv, &p);
diff --git a/src/mkcatalog/main.c b/src/mkcatalog/main.c
index d2bba10..4733b19 100644
--- a/src/mkcatalog/main.c
+++ b/src/mkcatalog/main.c
@@ -24,7 +24,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 */
@@ -43,9 +42,6 @@ main (int argc, char *argv[])
time(&p.rawtime);
gettimeofday(&t1, NULL);
- /* Set the program name (needed by non-gnu operating systems): */
- set_program_name(argv[0]);
-
/* Read the input parameters. */
setparams(argc, argv, &p);
diff --git a/src/mknoise/main.c b/src/mknoise/main.c
index 74b8b47..32cc155 100644
--- a/src/mknoise/main.c
+++ b/src/mknoise/main.c
@@ -24,7 +24,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 */
@@ -43,9 +42,6 @@ main (int argc, char *argv[])
time(&p.rawtime);
gettimeofday(&t1, NULL);
- /* Set the program name (needed by non-gnu operating systems): */
- set_program_name(argv[0]);
-
/* Read the input parameters. */
setparams(argc, argv, &p);
diff --git a/src/mkprof/main.c b/src/mkprof/main.c
index ab2b5de..15a0aa9 100644
--- a/src/mkprof/main.c
+++ b/src/mkprof/main.c
@@ -24,7 +24,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 */
@@ -43,9 +42,6 @@ main (int argc, char *argv[])
time(&p.rawtime);
gettimeofday(&t1, NULL);
- /* Set the program name (needed by non-gnu operating systems): */
- set_program_name (argv[0]);
-
/* Read the input parameters. */
setparams(argc, argv, &p);
diff --git a/src/noisechisel/main.c b/src/noisechisel/main.c
index c3ef0fb..a0e8a80 100644
--- a/src/noisechisel/main.c
+++ b/src/noisechisel/main.c
@@ -24,7 +24,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 */
@@ -43,9 +42,6 @@ main (int argc, char *argv[])
time(&p.rawtime);
gettimeofday(&t1, NULL);
- /* Set the program name (needed by non-gnu operating systems): */
- set_program_name(argv[0]);
-
/* Read the input parameters. */
setparams(argc, argv, &p);
diff --git a/src/subtractsky/main.c b/src/subtractsky/main.c
index d4ea567..b192dac 100644
--- a/src/subtractsky/main.c
+++ b/src/subtractsky/main.c
@@ -24,7 +24,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 */
@@ -43,9 +42,6 @@ main (int argc, char *argv[])
time(&p.rawtime);
gettimeofday(&t1, NULL);
- /* Set the program name (needed by non-gnu operating systems): */
- set_program_name(argv[0]);
-
/* Read the input parameters. */
setparams(argc, argv, &p);
diff --git a/src/table/main.c b/src/table/main.c
index b2eb42a..b021bff 100644
--- a/src/table/main.c
+++ b/src/table/main.c
@@ -24,7 +24,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 */
@@ -38,9 +37,8 @@ main (int argc, char *argv[])
{
struct tableparams p={{0}, {0}, 0};
- /* Set the program name (needed by non-gnu operating systems): */
+ /* Set they starting time. */
time(&p.rawtime);
- set_program_name(argv[0]);
/* Read the input parameters. */
setparams(argc, argv, &p);
- [gnuastro-commits] master updated (d5ca7d3 -> 25d2ec5), Mohammad Akhlaghi, 2016/09/11
- [gnuastro-commits] master 2d15a91 3/6: CPP include directories overwritten, Mohammad Akhlaghi, 2016/09/11
- [gnuastro-commits] master c9f04ca 1/6: Started the new Library chapter, with basic introductions, Mohammad Akhlaghi, 2016/09/11
- [gnuastro-commits] master 118de44 4/6: Gnulib's new getprogname module adopted,
Mohammad Akhlaghi <=
- [gnuastro-commits] master 25d2ec5 6/6: bootstrapped/lib only included in libraries and utilities, Mohammad Akhlaghi, 2016/09/11
- [gnuastro-commits] master cc89d3c 2/6: Libraries are usable in C++, Mohammad Akhlaghi, 2016/09/11
- [gnuastro-commits] master cd59e52 5/6: Merged not-yet-fully-complete work on libraries, Mohammad Akhlaghi, 2016/09/11