[Top][All Lists]

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

urlread and urlwrite

From: John W. Eaton
Subject: urlread and urlwrite
Date: Mon, 9 Oct 2006 15:48:53 -0400

On  8-Oct-2006, Alexander Barth wrote:

| I implemented matlab's urlwrite and urlread functions. I think that
| those octave functions support all features of the matlab functions
| except for the support of proxies (I'm not behind a proxy so I won't
| be able to test proxy support).
| In addition, the octave functions return an optional 3rd output
| argument which contains the error message. Matlab's functions only
| indicate if an error occurred but without telling you what when
| wrong. Also, octave's urlwrite and urlread show the progress of the
| download (but this can be disabled).
| For compiling the attached source code you need libcurl, its
| development package and curl-config in your path. A small makefile
| is also included in the attached tar file.

I added your urlwrite file to Octave, along with a configure check for
libcurl and the curl/curl.h header file.  I also made a few changes.
For example, instead of writing

 if (!args(0).is_string())
      error (...);
      return retval;

  std::string foo = args(0).string_value ();

the Octave sources usually just attempt the conversion and then check
to see if an error has occurred:

  std::string foo = args(0).string_value ();

  if (error_state)
      error (...);
      return retval;



reply via email to

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