cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: PATCH: Improve output of curl's --libcurl option

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 26 Dec 2011 00:34:46 +0100 (CET)

On Thu, 22 Dec 2011, Colin Hogben wrote:

> The attached patches improve the output of curl's --libcurl option by
> generating code to build curl_httppost and curl_slist lists, and use
> symbolic names for enum and flag values.

Wow, thanks! Now I think this is just totally awesome and I love it. If I
would point out a very minor flaw in the readability of the output it would be
that it interleaves the curl_formadd() calls within the seires of
curl_easy_setopt() calls. It would possibly look better if they were made
separate of each other.

I have a minor problem just now before I push these patches into mainline and
that is that the tests don't run clean for me because CURLOPT_SSH_KNOWNHOSTS
is used conditionally and needs to be stripped out from the test output before
comparing. I'm working on that.

> Now, it occurred to me that, as well as testing for regressions in the
> --libcurl output, I really ought to check that the generated code really
> does work the same as the curl tool with the given options.

A great idea that will certainly help us make sure that --libcurl generates
perfectly working code!

> For the moment, I have not released this but only used it within my own
> tree, as I was not sure of the best way to integrate such a tool within the
> test framework. It seems like it might be easier to have a clear mapping so
> that e.g. test15xx is generated from test14xx. However, I'm not sure how
> the makefile logic should be implemented (under two? layers of
> autoconf/automake abstraction). Maybe someone can advise.

If you post what you have this far with a basic description then I think I can
give a shot at doing the proper autotool massaging to get it used properly!

> Anyway, that is why I have grabbed a bunch of numbers in the 1400 range
> rather than continuing at 1316. But hey, numbers are cheap and plentiful
> :-)

They certainly are.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2011-12-26