gnuastro-devel
[Top][All Lists]
Advanced

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

[task #15774] Use libcurl to contact remote servers, not the curl execut


From: Mohammad Akhlaghi
Subject: [task #15774] Use libcurl to contact remote servers, not the curl executable
Date: Sun, 13 Aug 2023 18:54:20 -0400 (EDT)

Update of task #15774 (project gnuastro):

        Percent Complete:                      0% => 70%                    

    _______________________________________________________

Follow-up Comment #2:

Thanks a lot Fathma!

To further complete this task, I just added the configuration checks in
[https://codeberg.org/gnuastro/gnuastro/commit/d802230fd Commit d802230fd].
However, there is an issue with the 'tap_download' and 'tap_libcurl' functions
mentioned below, please implement that in a commit over mine and let me know
when it is done.

There were also some other points that I am listing below:
* Start the commit message title with the part of Gnuastro that it is related
to. In this case, the title should start with "Query: ". I have already
modified this on the branch.
* When you run 'git log -p -1' on your commit, you will see some parts that
Git has marked in red. These are lines that are finishing with an empty space,
this is bad practice in coding. Please ensure that your commits never have
this ;-). Advanced text editors have features to automatically remove such
trailing white-space characters at the end of the line. I have also corrected
this in my branch, but please make sure to avoid them in the future.
* Make sure that you follow the GNU Coding Standards: for example the
'tap_libcurl(p);' line should be indented by two spaces because it is within
the curly braces of 'if(p->usetap)'.
* The 'tap_libcurl' and 'tap_download' have too much in common (the start in
particular). So is better to just keep 'tap_download' (which is called from
'query.c'), and use the 'HAVE_LIBCURL' only within the loop of 'tap_download'
to call two functions, for example they can be called 'tap_download_system',
'tap_download_libcurl' (these functions should have a 'static' prefix because
they should not be used outside 'tap.c'.
* Make sure that 'tap_download_libcurl' is only visible when 'HAVE_LIBCURL' is
defined. For example see the 'tiff_read_tag' function of 'lib/tiff.c' in
Gnuastro. 
* Finally, when the host doesn't have libcurl, they will also not have the
'curl/curl.h' header! So this should also be placed within a pre-processor
check. See 'lib/tiff.c' for an example ;-).


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/task/?15774>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

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