2011-10-05 06:03:20 +08:00
|
|
|
#ifndef HEADER_CURL_TOOL_PARAMHLP_H
|
|
|
|
#define HEADER_CURL_TOOL_PARAMHLP_H
|
2011-09-18 07:58:18 +08:00
|
|
|
/***************************************************************************
|
|
|
|
* _ _ ____ _
|
|
|
|
* Project ___| | | | _ \| |
|
|
|
|
* / __| | | | |_) | |
|
|
|
|
* | (__| |_| | _ <| |___
|
|
|
|
* \___|\___/|_| \_\_____|
|
|
|
|
*
|
2020-11-05 15:22:10 +08:00
|
|
|
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
2011-09-18 07:58:18 +08:00
|
|
|
*
|
|
|
|
* This software is licensed as described in the file COPYING, which
|
|
|
|
* you should have received as part of this distribution. The terms
|
2020-11-04 21:02:01 +08:00
|
|
|
* are also available at https://curl.se/docs/copyright.html.
|
2011-09-18 07:58:18 +08:00
|
|
|
*
|
|
|
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
|
|
|
* copies of the Software, and permit persons to whom the Software is
|
|
|
|
* furnished to do so, under the terms of the COPYING file.
|
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
***************************************************************************/
|
2012-04-07 05:35:15 +08:00
|
|
|
#include "tool_setup.h"
|
2011-09-18 07:58:18 +08:00
|
|
|
|
2014-02-23 20:59:59 +08:00
|
|
|
struct getout *new_getout(struct OperationConfig *config);
|
2011-09-18 07:58:18 +08:00
|
|
|
|
2011-10-05 06:03:20 +08:00
|
|
|
ParameterError file2string(char **bufp, FILE *file);
|
2011-09-18 07:58:18 +08:00
|
|
|
|
2011-10-05 06:03:20 +08:00
|
|
|
ParameterError file2memory(char **bufp, size_t *size, FILE *file);
|
2011-09-18 07:58:18 +08:00
|
|
|
|
2011-10-05 06:03:20 +08:00
|
|
|
void cleanarg(char *str);
|
2011-09-18 07:58:18 +08:00
|
|
|
|
2012-11-26 23:23:02 +08:00
|
|
|
ParameterError str2num(long *val, const char *str);
|
|
|
|
ParameterError str2unum(long *val, const char *str);
|
2020-12-21 01:44:20 +08:00
|
|
|
ParameterError oct2nummax(long *val, const char *str, long max);
|
2019-07-30 04:10:13 +08:00
|
|
|
ParameterError str2unummax(long *val, const char *str, long max);
|
2017-08-07 02:10:40 +08:00
|
|
|
ParameterError str2udouble(double *val, const char *str, long max);
|
2011-09-18 07:58:18 +08:00
|
|
|
|
2014-02-23 20:59:59 +08:00
|
|
|
long proto2num(struct OperationConfig *config, long *val, const char *str);
|
2011-09-18 07:58:18 +08:00
|
|
|
|
2015-08-23 09:49:26 +08:00
|
|
|
int check_protocol(const char *str);
|
|
|
|
|
2012-11-26 23:23:02 +08:00
|
|
|
ParameterError str2offset(curl_off_t *val, const char *str);
|
2011-09-18 07:58:18 +08:00
|
|
|
|
2014-02-23 20:59:59 +08:00
|
|
|
CURLcode get_args(struct OperationConfig *config, const size_t i);
|
2011-10-05 06:03:20 +08:00
|
|
|
|
|
|
|
ParameterError add2list(struct curl_slist **list, const char *ptr);
|
|
|
|
|
2014-02-23 20:59:59 +08:00
|
|
|
int ftpfilemethod(struct OperationConfig *config, const char *str);
|
2011-10-05 06:03:20 +08:00
|
|
|
|
2014-02-23 20:59:59 +08:00
|
|
|
int ftpcccmethod(struct OperationConfig *config, const char *str);
|
2011-10-05 06:03:20 +08:00
|
|
|
|
2019-04-14 05:00:45 +08:00
|
|
|
long delegation(struct OperationConfig *config, const char *str);
|
2011-10-05 06:03:20 +08:00
|
|
|
|
2016-12-14 04:10:00 +08:00
|
|
|
ParameterError str2tls_max(long *val, const char *str);
|
|
|
|
|
2011-10-05 06:03:20 +08:00
|
|
|
#endif /* HEADER_CURL_TOOL_PARAMHLP_H */
|