Lines Matching refs:str
134 void cleanarg(char *str)
140 if(str) {
141 size_t len = strlen(str);
142 memset(str, ' ', len);
145 (void)str;
154 * getparameter a lot, we must check it for NULL before accessing the str
158 ParameterError str2num(long *val, const char *str)
160 if(str) {
162 long num = strtol(str, &endptr, 10);
163 if((endptr != str) && (endptr == str + strlen(str))) {
176 * getparameter a lot, we must check it for NULL before accessing the str
180 ParameterError str2unum(long *val, const char *str)
182 ParameterError result = str2num(val, str);
196 * getparameter a lot, we must check it for NULL before accessing the str
200 ParameterError str2double(double *val, const char *str)
202 if(str) {
204 double num = strtod(str, &endptr);
205 if((endptr != str) && (endptr == str + strlen(str))) {
218 * getparameter a lot, we must check it for NULL before accessing the str
222 ParameterError str2udouble(double *val, const char *str)
224 ParameterError result = str2double(val, str);
240 * getparameter a lot, we must check it for NULL before accessing the str
244 long proto2num(struct OperationConfig *config, long *val, const char *str)
278 if(!str)
281 buffer = strdup(str); /* because strtok corrupts it */
344 * @param str the buffer containing the offset
347 ParameterError str2offset(curl_off_t *val, const char *str)
350 if(str[0] == '-')
355 *val = curlx_strtoofft(str, &endptr, 0);
359 *val = strtol(str, &endptr, 0);
363 if((endptr != str) && (endptr == str + strlen(str)))
442 int ftpfilemethod(struct OperationConfig *config, const char *str)
444 if(curlx_raw_equal("singlecwd", str))
446 if(curlx_raw_equal("nocwd", str))
448 if(curlx_raw_equal("multicwd", str))
450 warnf(config, "unrecognized ftp file method '%s', using default\n", str);
454 int ftpcccmethod(struct OperationConfig *config, const char *str)
456 if(curlx_raw_equal("passive", str))
458 if(curlx_raw_equal("active", str))
460 warnf(config, "unrecognized ftp CCC method '%s', using default\n", str);
464 long delegation(struct OperationConfig *config, char *str)
466 if(curlx_raw_equal("none", str))
468 if(curlx_raw_equal("policy", str))
470 if(curlx_raw_equal("always", str))
472 warnf(config, "unrecognized delegation method '%s', using none\n", str);