curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Adding a new --option to the tool

From: Daniel Stenberg via curl-library <>
Date: Mon, 28 Aug 2023 19:24:47 +0200 (CEST)

On Mon, 28 Aug 2023, Florents Tselai via curl-library wrote:

> For reference you could check the last commit here

You have not added code in src/tool_getparam.c:getparameter() that actually
does something when the option is provided. I'm guessing you want it something
like the patch below.

You should probably pause and reconsider if this is code for the library or
maybe in the tool only.

--- a/src/tool_getparam.c
+++ b/src/tool_getparam.c
_at__at_ -1540,10 +1540,13 _at__at_ ParameterError getparameter(const char *flag, /* f or
-long-flag */
      case ':':
        switch(subletter) {
        case 'a': /* --variable */
          err = setvariable(global, nextarg);
+ case 'b': /* --warc-file */
+ GetStr(&config->warc_file, nextarg);
+ break;
        default: /* --next */
          err = PARAM_NEXT_OPERATION;

  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
Received on 2023-08-28