Logo Search packages:      
Sourcecode: cclive version File versions

int cmdline_parser_dump ( FILE *  outfile,
struct gengetopt_args_info args_info 
)

Save the contents of the option struct into an already open FILE stream.

Parameters:
outfile the stream where to dump options
args_info the option struct to dump
Returns:
0 if everything went fine, NON 0 if an error took place

Definition at line 399 of file cmdline.cpp.

References gengetopt_args_info::agent_given, gengetopt_args_info::agent_orig, CMDLINE_PARSER_PACKAGE, gengetopt_args_info::connect_timeout_given, gengetopt_args_info::connect_timeout_orig, gengetopt_args_info::connect_timeout_socks_given, gengetopt_args_info::connect_timeout_socks_orig, gengetopt_args_info::continue_given, gengetopt_args_info::debug_given, gengetopt_args_info::emit_csv_given, gengetopt_args_info::exec_given, gengetopt_args_info::exec_orig, gengetopt_args_info::exec_run_given, gengetopt_args_info::filename_format_given, gengetopt_args_info::filename_format_orig, gengetopt_args_info::find_all_given, gengetopt_args_info::format_given, gengetopt_args_info::format_map_given, gengetopt_args_info::format_map_orig, gengetopt_args_info::format_orig, gengetopt_args_info::help_given, gengetopt_args_info::hosts_given, gengetopt_args_info::limit_rate_given, gengetopt_args_info::limit_rate_orig, gengetopt_args_info::no_extract_given, gengetopt_args_info::no_proxy_given, gengetopt_args_info::number_videos_given, gengetopt_args_info::output_video_given, gengetopt_args_info::output_video_orig, gengetopt_args_info::overwrite_given, gengetopt_args_info::print_fname_given, gengetopt_args_info::proxy_given, gengetopt_args_info::proxy_orig, gengetopt_args_info::quiet_given, gengetopt_args_info::regexp_given, gengetopt_args_info::regexp_orig, gengetopt_args_info::retry_given, gengetopt_args_info::retry_orig, gengetopt_args_info::retry_wait_given, gengetopt_args_info::retry_wait_orig, gengetopt_args_info::stream_exec_given, gengetopt_args_info::stream_exec_orig, gengetopt_args_info::stream_given, gengetopt_args_info::stream_orig, gengetopt_args_info::stream_pass_given, and gengetopt_args_info::version_given.

{
  int i = 0;

  if (!outfile)
    {
      fprintf (stderr, "%s: cannot dump options to stream\n", CMDLINE_PARSER_PACKAGE);
      return EXIT_FAILURE;
    }

  if (args_info->help_given)
    write_into_file(outfile, "help", 0, 0 );
  if (args_info->version_given)
    write_into_file(outfile, "version", 0, 0 );
  if (args_info->hosts_given)
    write_into_file(outfile, "hosts", 0, 0 );
  if (args_info->quiet_given)
    write_into_file(outfile, "quiet", 0, 0 );
  if (args_info->debug_given)
    write_into_file(outfile, "debug", 0, 0 );
  if (args_info->emit_csv_given)
    write_into_file(outfile, "emit-csv", 0, 0 );
  if (args_info->print_fname_given)
    write_into_file(outfile, "print-fname", 0, 0 );
  if (args_info->agent_given)
    write_into_file(outfile, "agent", args_info->agent_orig, 0);
  if (args_info->proxy_given)
    write_into_file(outfile, "proxy", args_info->proxy_orig, 0);
  if (args_info->no_proxy_given)
    write_into_file(outfile, "no-proxy", 0, 0 );
  if (args_info->connect_timeout_given)
    write_into_file(outfile, "connect-timeout", args_info->connect_timeout_orig, 0);
  if (args_info->connect_timeout_socks_given)
    write_into_file(outfile, "connect-timeout-socks", args_info->connect_timeout_socks_orig, 0);
  if (args_info->retry_given)
    write_into_file(outfile, "retry", args_info->retry_orig, 0);
  if (args_info->retry_wait_given)
    write_into_file(outfile, "retry-wait", args_info->retry_wait_orig, 0);
  if (args_info->output_video_given)
    write_into_file(outfile, "output-video", args_info->output_video_orig, 0);
  if (args_info->continue_given)
    write_into_file(outfile, "continue", 0, 0 );
  if (args_info->overwrite_given)
    write_into_file(outfile, "overwrite", 0, 0 );
  if (args_info->no_extract_given)
    write_into_file(outfile, "no-extract", 0, 0 );
  if (args_info->limit_rate_given)
    write_into_file(outfile, "limit-rate", args_info->limit_rate_orig, 0);
  if (args_info->format_given)
    write_into_file(outfile, "format", args_info->format_orig, cmdline_parser_format_values);
  if (args_info->format_map_given)
    write_into_file(outfile, "format-map", args_info->format_map_orig, 0);
  if (args_info->number_videos_given)
    write_into_file(outfile, "number-videos", 0, 0 );
  if (args_info->regexp_given)
    write_into_file(outfile, "regexp", args_info->regexp_orig, 0);
  if (args_info->find_all_given)
    write_into_file(outfile, "find-all", 0, 0 );
  if (args_info->filename_format_given)
    write_into_file(outfile, "filename-format", args_info->filename_format_orig, 0);
  if (args_info->exec_given)
    write_into_file(outfile, "exec", args_info->exec_orig, 0);
  if (args_info->exec_run_given)
    write_into_file(outfile, "exec-run", 0, 0 );
  if (args_info->stream_exec_given)
    write_into_file(outfile, "stream-exec", args_info->stream_exec_orig, 0);
  if (args_info->stream_pass_given)
    write_into_file(outfile, "stream-pass", 0, 0 );
  if (args_info->stream_given)
    write_into_file(outfile, "stream", args_info->stream_orig, 0);
  

  i = EXIT_SUCCESS;
  return i;
}


Generated by  Doxygen 1.6.0   Back to index