@@ -104,6 +104,7 @@ CMD_DECLARE (cmd_spec_htmlify);
104104CMD_DECLARE (cmd_spec_mirror );
105105CMD_DECLARE (cmd_spec_prefer_family );
106106CMD_DECLARE (cmd_spec_progress );
107+ CMD_DECLARE (cmd_spec_queue_type );
107108CMD_DECLARE (cmd_spec_recursive );
108109CMD_DECLARE (cmd_spec_regex_type );
109110CMD_DECLARE (cmd_spec_restrict_file_names );
@@ -247,6 +248,7 @@ static const struct {
247248 { "proxypasswd" , & opt .proxy_passwd , cmd_string }, /* deprecated */
248249 { "proxypassword" , & opt .proxy_passwd , cmd_string },
249250 { "proxyuser" , & opt .proxy_user , cmd_string },
251+ { "queuetype" , & opt .queue_type , cmd_spec_queue_type },
250252 { "quiet" , & opt .quiet , cmd_boolean },
251253 { "quota" , & opt .quota , cmd_bytes_sum },
252254#ifdef HAVE_SSL
@@ -403,6 +405,8 @@ defaults (void)
403405 opt .restrict_files_nonascii = false;
404406 opt .restrict_files_case = restrict_no_case_restriction ;
405407
408+ opt .queue_type = queue_type_fifo ;
409+
406410 opt .regex_type = regex_type_posix ;
407411
408412 opt .max_redirect = 20 ;
@@ -1441,6 +1445,23 @@ cmd_spec_recursive (const char *com, const char *val, void *place_ignored _GL_UN
14411445 return true;
14421446}
14431447
1448+ /* Validate --queue-type and set the choice. */
1449+
1450+ static bool
1451+ cmd_spec_queue_type (const char * com , const char * val , void * place_ignored _GL_UNUSED )
1452+ {
1453+ static const struct decode_item choices [] = {
1454+ { "fifo" , queue_type_fifo },
1455+ { "browser" , queue_type_browser },
1456+ };
1457+ int queue_type = queue_type_fifo ;
1458+ int ok = decode_string (val , choices , countof (choices ), & queue_type );
1459+ if (!ok )
1460+ fprintf (stderr , _ ("%s: %s: Invalid value %s.\n" ), exec_name , com , quote (val ));
1461+ opt .queue_type = queue_type ;
1462+ return ok ;
1463+ }
1464+
14441465/* Validate --regex-type and set the choice. */
14451466
14461467static bool
0 commit comments